Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with added columns in CSV

Our developers have added more columns to our CSV files. This cause the script to crash due to the fact that the new columns are missing in older csv files.

Is there a way to check if the column exist or can I ignore columns before a certain date somehow?

I need the data in the new columns, but I want to load the old data as well.

Niklas

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

Niklas

You may be able to solve your problem using column numbers rather than headings in your script.

Something like:

LOAD
@1 AS Id,
@2 AS Name,
@3 AS Date
FROM DataFile.csv;

This should get nulls for columns that do not exist. This does assume that the columns were added to the end of the csv. If they were added in the middle, then you will need a more complex approach.

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein