Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Expand Delimited Files Macro


Hello, community,


This is more of a contribution than an issue.

My job role includes having to expand (parse) delimited files to a fixed format and creating a layout for that new fixed file. We've done that in the past with a CMD program that's very effective but not that efficient since it takes hours to expand large files, sometimes days. I'm talking about tens of millions of records. The issue I've run into using Alteryx it's it assigns a predetermined length to all fields when loading delimited files, and I know you can change that in the input, but again it affects all columns. I also know I can change each column manually with a Select tool, but again that's not very efficient when running 50 files a day. Using an Autofield tool doesn't help either since it changes the field types, and I need them all to be strings. 

So I came up with a solution I've created in a macro, which reads the file and expands each field to the max data length, keeps the data as a string and writes a layout. In my case, I need the files in txt format, but if you need a different format then you can tweak the macro to meet your needs. I added the option to round up the length of the fields to the nearest fifth also. 

Pretty sure you might have better solutions for this. I hear any comments.

Alteryx Partner

Oh! Nice. I am checking this sucker out now. Sounds amazing. 


Cool! Let me know what you think.