neelamanikandan
3 years agoNew Contributor II
Dynamically change the Delimiter in CSV parser
I’m designing ah pipeline that will handle multiple delimiters in a single CSV parser. I’m using a expression library that has the delimiter details of the respective files as below.
[
{
“src_file”: “aab”,
“Delimit”: “PIPE”,
“tgt_table”: “T_STG_AAB”
}
},
{
“src_file”: “abc”,
“Delimit”: “TAB”,
“tgt_table”: “T_STG_ABC”
}
},
{
“src_file”: “efg”,
“Delimit”: “COMMA”,
“tgt_table”: “T_STG_EFG”
}
}
]
On the mapper snap I can write expression to refer this expression library lib.sample.find(x => x.src_file==“incoming_filename”).get(‘Delimit’).
But when I try to use the same in CSV parser it doesnt accept.
can we really do this.