Hello.
I have a number of workflows that require parameters to be passed to them. I do not want to pass them through user input, but, through a text file (like a configuration .ini file). The content would be similar to what you can see below.
The parameters in the file are to be recombined to locate the files in a directory structure (eg. c:\20220100\CERT 02 GAM.xlsx) and also serve as input parameters when selecting data (eg reporting_period=20200100).
[general]
reporting_year = 2022
reporting_month = 01
reporting_version = 00
[files]
certification = CERT 02 GAM.xlsx
gcap_taxearn = gcap_taxearn_01.xls
gcap_90202 = gcap_90202_01a.xls
gcap_taxbalsht = gcap_taxbalsht_01.xls
I am reading the file as a "=" delimited text file, and I end up with these key value pairs.
Now, how can I connect these key combinations to update input tools, filter tools etc?
Maybe this approach feels somewhat awkward, but, this exercise is part of a migration from python to alteryx, where I want to be able to continue to use the python tool chain (which makes use of the configuration files) whilst certain aspects are converted to alteryx. Also, I would like to control the workflow outside of alteryx, not from within.
Many thanks in advance for any insights you can share.
Francis
Hi @franc1s
Usage of an external config file (can be a normal excel) is a common method which is used across to build flexible workflow so they can make workflows adapt with no code changes.
Now the question to you is what do you want to do with this config how do you want to control your workflow? based on that logic can be built.
Hope this helps : )
Hi @atcodedog05 , The input type has to be a text file. I believe that in excel, I would be able to come up with something with less steps.
First step is to format the table such that it would look something like this.
So, I need to convert my initial structure to a row based one I believe. I havent been able to do this with the crosstab tool.
I can then join this with another dataset to filter for a specific reporting_period.
I also cant see how I can use this structure to provide the input filenames to the Input tool.
Thanks!
I just got the crosstab tool to do what I wanted!! So, my remaining question is, how to connect to the input data tool. Thanks for helping me focus @atcodedog05 !