Alteryx Designer Desktop Discussions

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

Input Batch Macro - AKA the Extra Dynamic, Dynamic Input

JoeS
Alteryx
Alteryx

It’s about time I release my “Input Batch” macro, so here we go......

 Meme.jpg

 

 

For those of you familiar with the Dynamic Input, you will know how much of a life saver it can be, but from time to time, you may be frustrated by the need for the file formats to be the same. Both the type of file (Excel, CSV, TXT etc) and also schema (field types, size and number/name of columns).

This can often cause a few issues, as Alteryx reads in the template and will then use that as the type of file, and then the first file it reads in dictates the schema.

 

Well, if you want the ability to read in many different types and many different schemas at once, you are in luck!

 

I have built a macro (with a sub-macro) that will be able to read in: ".yxdb",".cydb",".sz",".avro",".csv",".dbf",".mdb",".xls",".xlsx",".xlsm",".sas7bdat",".sav",".sqlite",".xml”

 

The input required is the full path with extension. This enables you to use the directory tool, apply any logic to filter the list (AKA get todays files) and then input that in.

 

After that it will go through all the files and read them in. Then using the power of Union it will align all columns named the same, any extra columns get added to the end.

 

There is also some extra stuff when it comes to Excel, it will actually loop through all the sheets and read them in one by one.

 

Hopefully some of you will find this useful.

 

If you provide it file types that it is not able to read, it will through a warning.

 

Feel free to add comments about future enhancements and I’ll look to see if I can add them in.

 

Attached is a zip file (.7z), with the installer (.yxi) and some sample data with a sample workflow.

31 REPLIES 31
jknutzen
5 - Atom

Hi @JoeS, thanks for this great macro! I've been using it in 2022.1 and am in the process of upgrading to 2023.1 when I found your update that some modifications were needed for this tool. I've downloaded the .zip file, changed the extension to .yxi, and run it in Alteryx. I get an error message that it's missing a configuration file.

 

MacroError.png

JoeS
Alteryx
Alteryx

@jknutzen wrote:

Hi @JoeS, thanks for this great macro! I've been using it in 2022.1 and am in the process of upgrading to 2023.1 when I found your update that some modifications were needed for this tool. I've downloaded the .zip file, changed the extension to .yxi, and run it in Alteryx. I get an error message that it's missing a configuration file.

 

MacroError.png


Sorry, if you downloaded the latest upload a couple posts above, that's just the macros and not a full Alteryx installer - as it was intended to just be dropped in the folder after bing installed :)

so if you extra the two files like a normal zip you can then paste them in your install location 

Labels