Alteryx Designer Desktop Discussions

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

Macro to Process One week at a time and use the results in the next iteration

3a_aa
7 - Meteor

Hi Guys,

 

I've built a predictive algorithm which predicts missing data points. It's based off an average of the previous 10 weeks of data.

I need to run this on a file containing 5 years of history and fill in the missing points from 5 years ago.

 

Since every week, the calculation to predict the missing values is reliant upon historical data, I need to run my workflow for one week at a time, update all empty records for that week with the predicted value, then run the next week (with the previous weeks missing values filled in) and so on.

 

Capture.PNG

 

I've read up on Batch Macros but the complexity here is that I need to update the main source file after each iteration.

 

Any ideas would be appreciated

 

Thanks

 

14 REPLIES 14
bbak
9 - Comet

Correct, it could basically just be an iterative process where each run outputs to the file and the next run pulls the data from the last output. 

3a_aa
7 - Meteor
Fantastic I'll try this tomorrow

Thank you
3a_aa
7 - Meteor

This all worked a treat and is operating exactly as I wanted 

 

Thank you so much

asmagar
5 - Atom

Hi,

 

I am trying to implement very similar thing in alteryx, where I want to access just one row of a datafile at a time and update that based on my predictive python macro.

Would you please tell me which of the above approach worked for you. 

 

Thanks

BrandonB
Alteryx
Alteryx

Hi @asmagar ,

 

If you want to feed one row of data into a process at a time, I would recommend using a macro with control parameters (found in interface tools). This will feed each row of the specified control parameters through your process, one at a time. It will complete the process in the macro for each row of data being passed through. Please see the following that explains how control parameters work:

 

https://community.alteryx.com/t5/Alteryx-Knowledge-Base/Tool-Mastery-Control-Parameter/ta-p/35583

Labels