Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a script that loads CSV files from a directory like:
Load '' as TmpField AutoGenerate 0;
Concatenate Load
Price,
Date,
Retailer,
...
From \\FilePath\*.CSV
Drop Field TmpField;
If a new CSV file comes with an additional field that is not present in any of the existing files and I add that in the code above, it fails because that field does not exist in current CSV files.
Is there a way to have that additioanl field in the script and avoid it from failing?
I know Load * could be an option but I was seeing if there's another alternative.
I don't think there's a practical alternative. I'd use load * and if that pulls in some unwanted fields, well those can be dropped afterwards with drop field x,y, etc;.
Thanks.