Hellow Alteryx Folks!
I'm trying to automate a process using Alteryx, in which I want to run a program on the command line once for each row in a CSV, feeding the values from the CSVs as parameters to the command line. I think I need to be using a Batch Macro with Run Command, but I am having trouble fully understanding either concept, and need some help.
As an example, let's assume I have a CSV as follows:
Number,Person,Attribute
1,Jim,Funny
2,Sally,Sad
3,Sam,Happy
I would like to use a Run Command that will Echo each concatenation to the CMD prompt.
I'd like the completed solution to repeat the process for each item in the .CSV.
My actual application is to run TABCMD from within Alteryx to generate PDFs for push reporting. I currently do this with PowerShell, but there is an awful lot of code that I think could be replaced with Alteryx... if I could just figure out how to combine Batch Macros and Run Command... or maybe there is a better solution?
Thanks,
Toby
Solved! Go to Solution.
I went about this in a different approach than specified. I attempted to run the cmd command with an argument of "Echo 1 Mark Puzzled" and I got the command window to appear, but it didn't echo anything. While that is possibly what you need (I can help you to run a command repeatedly in that manner), the desired result was satisfied by this module.
It takes your input file and constructs a script of echo commands in a batch file called, runme.bat. At the end of the run I setup an event that will run the command: runme.bat.
Each of your commands is scripted to execute. I think that will help you.
By the way, when I execute a run command within a workflow, I generally setup a DUMMY.CSV file (contents = DUMMY) and use it as a READ source.
Thanks,
Mark
Mark,
That is a really cool approach... thanks for thinking about this.
While the resulting .bat will work for creating the PDFs using Tableau TABCMD, I was hoping to embellish the workflow with the reporting tools so it automatically sends each resulting PDF to the intended recipient. I have that covered in my current PowerShell script, but I have to believe there is an easier way.
Thanks,
Toby
If you create a FILENAME variable, you can OUTPUT the file and use the FILENAME variable as the actual filename. You could have a list of all of the filenames and construct a batch script accordingly. You're closer to an answer.
Thanks,
Mark