I have a .dat file which is delimited by a pipe (|). Now my columns can have | in the data. I am facing issues while reading this file and loading it column by column.
DML used:
record
string("|") col1,
string("|") col2,
string("|") col3,
string("|") col4,
end
Source value:
"Col1"|"col2"|"col3"|"col4"
"units of the price | currency used" | "ABC" | "20210831" | ""
So col1 = units of the price | currency used, col2 = ABC , col3 = 20210831 , col4 = null
As per my dml it is breaking first col in 2 and hence failing. How can I read the file and load it with the correct values.