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.
@largychen Connect the input tool to a browse tool and try again?
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.
>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
Thanks for quick replies
@binus I tried but it didn't work
@Yoshiro_Fujimori
here is my configuration
@largychen Can you try to increase the field length to 9999 and try again?
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
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
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
To be clear, I have 8 CSV like this, and I will need my output like this
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
User | Count |
---|---|
19 | |
14 | |
13 | |
9 | |
8 |