Alteryx Designer Desktop Discussions

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

how to change field size on multiple CSV Inputs from zip files

JKFoil
7 - Meteor

Hello

I have multiple ZIPs in a folder that I'm trying to open.

 

I have used a workflow from the community, (sorry I can't find the original post again)  using ZIP metadata Macro and Multiple Zips extract Macro. That appears to work perfectly except the CSV files I'm trying to extract have more than the 254 fields Limit that is applied and I get "Too many fields ERRORs" for all files. I can change the limit when importing a CSV file on its own but cant when importing multiple as part of a Macro workflow extracting the CSV files from Zips.

Any help will be greatly received. Workflow below.

 

JKFoil_0-1620636684269.png

 

 

 

 

 

 

JKFoil

7 REPLIES 7
ENix
8 - Asteroid

Can you upload the workflow including the macro you are having an issue with?

apathetichell
18 - Pollux

If you bundle the .csv call in a macro you can edit the field-len with an interface/action. I can't give you specifics without seeing how your specific workflow is laid out but I can tell you that FieldLen-value is the part of the input data tool you will want to highlight in your action tool. I might use a batch macro with a directory tool and a separate column for what I want fieldlen to be set at.  Or you can have a numeric dropdown set field-len.

apathetichell
18 - Pollux

This is the base strategy - it's going to take some work to adjust for your specific macros and if the .csv have differing formats output can be a mess. but the core strategy works. fieldlen is set for 1000... You can just adjust that to a smaller value  or larger value in the action tool in the macro.

JKFoil
7 - Meteor

Thank you to both of you that replied.

 

The Macro was kindly donated by a member of the community and I cant find the original post sadly. 

Can I amend the code? I could just overwrite the 254 with 1000 but I don't seem to have the option.

 

JKFoil_0-1620721283169.png

 

 

JKFoil_1-1620721387782.png

 

danilang
19 - Altair
19 - Altair

Hi @JKFoil 

 

In the MulitpleZips macro, just change the Field Length option of the Input tool to be a larger value

 

danilang_0-1620733650520.png

 

Original post 

 

Dan

apathetichell
18 - Pollux

@danilangis obviously correct - if you didn't have that option for some reason - you could attach a second action tool from the control parameter and then highlight the fieldlen section and hardcode 1000 via replace value with formula. Your formula is just the number for the the fieldlen.

JKFoil
7 - Meteor

Thank you I did have ability to change it and once I knew I could edit the macro I did below and all is perfect now.

 

What a great source of help this community is. Thanks again all.

 

 

JKFoil

Labels