I am trying to input a CSV file with the Dynamic input tool that has a file name format of Sev5 [mm-dd-yy].csv. This file is placed there everyday and do not wish to have to select the file by using the Input Data tool. Every time I run the workflow I get the error of too many fields in record #1
Text Input is -- FilePath = C:\Users\rneerhout\Documents\Vulnerability Management\Weekly Sev Files\
Formula is -- FilePatch = [FilePath]+"Sev5 "+DateTimeFormat(DateTimeToday(),"%m-%d-%y")+".csv"
Dynamic Input is -- Input Source Template = C:\Users\rneerhout\Documents\Vulnerability Management\Weekly Sev Files\Sev5 9-18-17.csv (previously used csv file)
Modify SQL Query = [Text to Replace] C:\Users\rneerhout\Documents\Vulnerability Management\Weekly Sev Files\SEV5 9-18-17.csv
[Replacement Field] FilePath
I was wondering what I am doing wrong. If some one could help it would be great.
Thanks
Solved! Go to Solution.
That error suggests a malformed CSV file with extra columns in the first data line (assuming CSV has header then on line 2).
I get the same error if I try to read a file like:
A,B,C 1,2,3,4
The set up you have for the dynamic input looks correct.
The error message is not telling you there's an issue with the dynamic input specifications, it is telling you there's a problem with the CSV file. If you were to open the file with a regular Input Data tool, you would/should get the same error.
I would check for an unquoted comma in the first row text as an initial check.
Also, you can use a simple wildcard in the regular Input Data tool instead of using Dynamic Input (e.g. C:\Users...\Sev5*.csv). This shouldn't change the error message you're getting below, but it is an alternative approach to your process where you don't have to worry about the date/time.
@jdunkerley
The CSV file comes from Qualys.
From my understanding they use an lite version of the CSV formatting for their reports. I have had issues in the past.
The same file works fine through the Data Input tool, where you actually have to select the file.
Thanks
Rich
@tom_montpool
The CSV file comes from Qualys.
From my understanding they use an lite version of the CSV formatting for their reports. I have had issues in the past.
The same file works fine through the Data Input tool, where you actually have to select the file.
Thanks
Rich