Assume having the following csv:
a,b,c
1,2,3
where a,b,c are column names and 1,2,3 are values. Is it possible to load only columns a,b?
<loadUpdateData tableName="TABLE"
file="file.csv"
primaryKey="a">
<column name="a" header="a"/>
<column name="b" header="b"/>
</loadUpdateData>
This will generate an SQL error, because it will try to insert column c. I am using MySQL.
Haven't tried it myself but looking at the code (for
LoadDataChange
) there seems to be an option to "skip" a column config:So maybe you can add a column config for '
c
' and set its type to "skip":