Alteryx Designer Desktop Discussions

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

Reading and Writing Files Dynamically

vinayak_naidu
5 - Atom

I have a shared folder which has files which are manually created in a shared folder like below, I need to read the COB file and compare it with previous file and create reconciliation exception output with today's date.. Could you help me?

I tried using input tool using *, remembered this from my core exam and dynamic input tool but it gave an error and skipped file, what do I need to do in dyanmic input tool?

vinayak_naidu_0-1626504854361.png

 

2 REPLIES 2
atcodedog05
22 - Nova
22 - Nova

Hi @vinayak_naidu 

 

Its a known issue. Sadly there is nothing that done about that a slight format difference skips the file. You can refer the below post to build a batch macro to read the files.

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/The-Ultimate-Input-Data-Flowchart/t...

 

Hope this helps : )

 

 

dhavaldoshi
8 - Asteroid

Hi Vinayak,

 

You would need to create a batch macro for your input files if the schema keeps changing, I would advise this especially in cases when someone is creating these files and they are not coming from a system. How do you read multiple files with varying schema is available here below:

 

https://community.alteryx.com/t5/Alteryx-Designer-Knowledge-Base/CS-Macro-Dev-Reading-in-Multiple-Fi...

 

In your case you'll need a date formatting on file name and finding latest and latest-1 file details before passing the output of directory tool to the macro shown in the post above. Something like this should help

dhavaldoshi_0-1626505849810.png

 

Once you are done with all your functions, configure your output tool to create a new sheet using a field, create that field using formula tool

dhavaldoshi_1-1626505910023.png  dhavaldoshi_2-1626505965268.png

Look at the configuration shown above on how output tool is configured. Hope this helps! 🙂

 

 

Labels