I have a CSV file with the following format that I'd like to load to a DB2 database with Liquibase's loadData feature:
2,92551,1,Nature of Service / Procedure,1
(Notice no quotes anywhere)
I'd like Liquibase to treat the 1st, 3rd, & 5th column as INTEGERS and the 2nd & 4th column as STRINGS.
My column definition is as follows:
columns:
- column:
name: uid
type: NUMERIC
- column:
name: hcpcs_cpt_code
type: STRING
- column:
name: mue_value
type: NUMERIC
- column:
name: mue_edit_rationale
type: STRING
- column:
name: metadata_uid
type: NUMERIC
Liquibase us wrapping all of the columns in single quotes and causing the insert to fail:
[INFO] INSERT INTO "XXXXX".MUE_NCCI_EDIT("2", "92551", "1", "Nature of Service / Procedure", "1") VALUES(?, ?, ?, ?, ?)
resulting in
Error: com.ibm.db2.jcc.am.SqlSyntaxErrorException: "2" is not valid in the context where it is used.. SQLCODE=-206, SQLSTATE=42703, DRIVER=4.22.29
Is my CSV just plain stupid or is there a Liquibase config I'm missing?
I've tried various combinations of separator
and quotechar
combinations with no luck.
quotchar
(without the 'e'). – Jens