Page 1 of 1

Importing sequential file with double quotes in data

Posted: Mon Nov 28, 2016 8:28 am
by giucar
I'm trying to import a file csv using parallel job but there is a problem with a String field. It contains "somevalue" inside, but every field is delimited with " (double) and separated with ;.

For example, if i have, as value of a String field, this value delimited:

;"abcd ""somevalue"";

This outputs a warning and the record is filtered.

Is there a solution with Parallel job without changing delimited value?

Thanks.

Posted: Mon Nov 28, 2016 10:48 am
by boxtoby
Hi Guicar,

I have seen this sort of problem before, even to the extent that there were 4, 5 or even 6 double characters in the data!

I solved the problem by using the sed command:

sed s/'"";'/'";'/g input file1 > output file2
sed s/'""'/' '/g input file2 > output file3

This worked for me, even repeating the process several times.

Other may have more elegant solutions, but until then ........

Regards,

Bob.

Posted: Thu Dec 01, 2016 5:27 am
by giucar
Thanks boxtoby,
I prefered to use Server Job and I solved the problem.

Regards.