Alteryx Designer Desktop Discussions

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

Input fixed width file (Using Python or any other tool?)

ShantanuDagar
8 - Asteroid

Hello,

 

I am looking to input a fixed width file format into workflow. Earlier I was using a .asc file format to give field settings and inputting, but it seems to collapse after every flow/usage so looking for a better solution using a python tool or any other tool.

 

Thanks

2 REPLIES 2
geraldo
13 - Pulsar

@ShantanuDagar 

 

Have you already tried to generate the flat file via alteryx and use the file structure book. flat file offers you the resource to create the structure of the file that you are importing and use later when reading the file. Now, if you use python, you don't need alteryx... develop in python I always try to give an option in alteryx but people want pythone naçoi I understand why they pay alteryx

Yoshiro_Fujimori
15 - Aurora
15 - Aurora

Hi @ShantanuDagar ,

 

When you configure Input Data tool for text files (.txt .asc, .log, .dat), Designer asks the format as below.

FixedWidthTextInput_1.png

 

Select "fixed width text file" and you can configure the field width on the next dialog, just like MS Excel.

FixedWidthTextInput_2.png

 

If you have a field definition file described in XML, you can specify it in "Use Field Settings from File".

I've never tred this method, but if you want to try, this page might help to generate the field definition file.

https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Knowledge-Base/How-to-read-in-fixed-width-...

 

Good luck.

Labels
Top Solution Authors