We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Batch Macros/Parallel Processing

Cece_01
6 - Meteoroid



I have this table which contains all the store details by each region , this table contains 65,820 records select .Region Code], [Region Name], [Store Number], [Store ID (dwh)], .[Is City Store], from NIT_Datasets.dbo.StoreDetails

and I have this table which contains only product codes which has 17,861 records select distinct [Product Code] from Interim_Reporting.PRD.vwStoreSales_Combined_2024

How do I append every product code to every store using alteryx? what is the fastest way to do this as it is taking so much time if I use the append fields tool?

2 REPLIES 2
Cece_01
6 - Meteoroid

I have another query as well regarding the same topic


 I have billions of records in my sales dataset and this is the query - How do  I use batch macros to load the data by region and store, please?

select Interim_Reporting.PRD.vwStoreSales_Combined_2024.[Country Key],
Interim_Reporting.PRD.vwStoreSales_Combined_2024.[Currency Key],
Interim_Reporting.PRD.vwStoreSales_Combined_2024.[Calendar Day],
Interim_Reporting.PRD.vwStoreSales_Combined_2024.[Generic Article Key],
Interim_Reporting.PRD.vwStoreSales_Combined_2024.[Product Code],
Interim_Reporting.PRD.vwStoreSales_Combined_2024.[Sales Office Key],
Interim_Reporting.PRD.vwStoreSales_Combined_2024.[Region Code],
Interim_Reporting.PRD.vwStoreSales_Combined_2024.[Plant Key],
Interim_Reporting.PRD.vwStoreSales_Combined_2024.[Store Number],
Interim_Reporting.PRD.vwStoreSales_Combined_2024.[Sales Quantity]

from Interim_Reporting.PRD.vwStoreSales_Combined_2024

alexnajm
18 - Pollux
18 - Pollux

Based on your description of "append every product code to every store", the Append Fields sounds like the best option. You might consider making your original query better - for example, can you do a select distinct on the first query?

 

For the batch macro, you can have the macro update a WHERE clause for each region and each store. You can use this as a reference: Solved: Batch Macro + Paramaterize SQL Statement? - Alteryx Community. Good luck!

Labels
Top Solution Authors