Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Macro To Help filter the data based on Month and Year Field in DataSource

Puneet13
8 - Asteroid

I need and help where in i have data from 2020 Jan and need to upload into SQL database, Due to heavy load unable to load it in a one go, So I need help to create a macro which help to Filter the data based on "Year" and "Month" field and one by one upload the data based on filter into data source. Help me to provide workflow with example.

5 REPLIES 5
rzdodson
12 - Quasar

@Puneet13 please attach a sample of your data so we can assist in constructing the workflow for you.

Puneet13
8 - Asteroid
Prod_Year_Of_AuditProd_Month_of_AuditProd_BusinessProd_Manager_NameProd_Employee_NameProd_Audit_CountProd_Critical_ErrorsProd_Procedural_ErrorsProd_UniqueID
2022SeptemberCCCDABCABC100ABC
2022AprilCCCDDEFDEF200DSN
2022JanCCCDIJKIJK300PWD
2022FebCCCDLMNLMN407SST
2022MarchCCCDOPGOPG500KOT
2022MayCCCDRSTRST600MNA
2022JunCCCDUVWUVW700DDD
2022JulyCCCDXYSXYS800SSS
2022NovemberCCCDMNOMNO900KKK
2022OctoberCCCDMNOMNO1000KKK
2022DecemberCCCDMNOMNO1100KKK
2023SeptemberCCCDABCABC1200ABC
2023AprilCCCDDEFDEF1300DSN
2023JanCCCDIJKIJK1400PWD
2023FebCCCDLMNLMN1507SST
2023MarchCCCDOPGOPG1600KOT
2023MayCCCDRSTRST1700MNA
2023JunCCCDUVWUVW1800DDD
2023JulyCCCDXYSXYS1900SSS
2023NovemberCCCDMNOMNO2000KKK
2023OctoberCCCDMNOMNO2100KKK
2023DecemberCCCDMNOMNO2200KKK
rzdodson
12 - Quasar

@Puneet13 there are two solutions that are in the attached file. The first is a batch macro solution, while the other is an iterative macro solution. For both, they end with creating an xlsx-based output. Hopefully that gets you pretty close to what you are needing to have accomplished.

 

If you are needing to stream this data in to a database instead, will likely need some more information (e.g. name of the database) so the workflows can be augmented to fit your specific need.

 

 

Puneet13
8 - Asteroid

It is showing no value. Correct me if i missed something.

No Values.PNG

 

 

rzdodson
12 - Quasar

@Puneet13 that specific anchor is to show if there are any records that did not pass through the iterative macro - it is a requirement for iterative macro construction. If we told the iterative macro to run 50 times but we have 100 unique dates, then you'll see 50 records in that L anchor since they did not pass through the macro. Since the output creation is contained inside the iterative macro itself, you will only see one output-style anchor in the main workflow.

Labels
Top Solution Authors