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

Alteryx Designer Desktop Discussions

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

Wildcard only read first file

largychen
6 - Meteoroid

Hi everyone,

 

I have 8 CSV files with same schema in the same folder. When I try to run wildcard on them, it only read one file and the warning goes "Record #2 not enough fields".

 

Then, I changed delimiters to "\n", but this time it still read one file but the warning is gone. I am confused. Thanks for help.

15 REPLIES 15
binuacs
21 - Polaris

@largychen Connect the input tool to a browse tool and try again?

Yoshiro_Fujimori
15 - Aurora

Hi @largychen ,

 

The warning 

Record #2: Not enough fields in record.

seems to occur when the number of fields in the record #2 is less than the number of fields in the first row of .csv file.

 

e.g. I got the same warning when I read the following .csv files with Input Data tool.

 

Spoiler

>type input_*.csv

Input_1.csv


Col1,Col2,Col3
Data01,Data02,Data03
Data11,Data12
Input_2.csv


Col1,Col2,Col3
Data01,Data02,Data03
Data11,Data12

 

Input Data tool configuration
Yoshiro_Fujimori_0-1683261963765.png

 

But I could read multiple files regardless of the above warnings as the log below.
Spoiler
Designer x64 Started running at 05/05/2023 13:30:18
...
Input Data (1) Record #2: Not enough fields in record.
Input Data (1) 2 records were read from "C:\Users\...\Input_1.csv"
Input Data (1) Record #2: Not enough fields in record.
Input Data (1) 2 records were read from "C:\Users\...\Input_2.csv"
Input Data (1) 2 files and 4 records read
Designer x64 Finished running in 0.4 seconds with 2 warnings
So I guess the problem is not related to the warning.
Could you share your configuration of Input Data tool, with the original delimiter ?
largychen
6 - Meteoroid

Thanks for quick replies

@binus I tried but it didn't work

 

@Yoshiro_Fujimori

here is my configuration

 

largychen_0-1683263666601.png

 

 

 
binuacs
21 - Polaris

@largychen Can you try to increase the field length to 9999 and try again?

Yoshiro_Fujimori
15 - Aurora

@largychen ,

 

You set Record Limit to '1".

Yoshiro_Fujimori_0-1683264719091.png

 

Could you delete '1' in the parameter and try again?

 

danilang
19 - Altair
19 - Altair

Hi @largychen 

 

You also have "Ignore Delimiters in  " set to none.  This means that any fields that have a "," (comma) inside them, such as "123 Main St, Sometown"  will be broken in two at the comma resulting in extra fields.  Set this to Quotes to handle these cases.

 

Dan    

largychen
6 - Meteoroid

Thank you guys.

 

@Yoshiro_Fujimori I set the record limit because all I want for that CSV is the first and second row. I need the record limit unless I will get below error and warning. I screenshot and attach my source file here

largychen_0-1683294100340.png

 

Input Data (223) Record #2: Not enough fields in record.
Input Data (223) Error reading "C:\Users\XXX\Cambium22_MidCase_hourly_p1_2024.csv": Too many fields in record #3

@danilang I tried, but it doesn't work

largychen
6 - Meteoroid

To be clear, I have 8 CSV like this, and I will need my output like this

 

largychen_0-1683294997305.png

 

danilang
19 - Altair
19 - Altair

@largychen 

 

Can you post an image of the first few rows of "C:\Users\XXX\Cambium22_MidCase_hourly_p1_2024.csv": Too many fields in record #3.  The error references the 3rd record in this file

 

Dan

Labels
Top Solution Authors