Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Limit number of csv columns imported

ppatane
8 - Asteroid

We get an invoice from one of our vendors that is rather messy at times.  The 1st 47 columns are always correct with no problems, but sometimes there are 1-3 extra columns and that causes issues with the workflow.  If I uncheck *Unknown in the Select Tool and just have the first 47 columns checked, will that ignore extra columns if they're present?

5 REPLIES 5
SPetrie
13 - Pulsar

You are correct. Unchecking that will automatically drop any new column that comes in that is not already listed in your select tool.

ppatane
8 - Asteroid

Hmm, still getting an error of too many fields

apathetichell
19 - Altair

too many fields means that you have a conflict between the numer of fields in some rows vs the first row. That usually relates to too many (or too few delimiters) in one of the rows - which may relate to if you should be ignoring delimeters in quotes and are not.

SPetrie
13 - Pulsar

Are you getting that error during the file import?

Thats different and a select by itself will not solve that issue.

Its more annoying, but you may try to import the CSV with no delimiters using \0 and no field names

Then use a text to columns and dynamic rename to finish the import.

I attached a basic example of that.

ppatane
8 - Asteroid

The number of extra columns actually got as high as 6, so I added 6 extra delimiters on the title row of my default input file and in the Select tool, I unchecked those 6 extra columns..

Labels