Pentaho | Issue with CSV file to Table output

1.7k Views Asked by At

I am working in Pentaho spoon. I have a requirement to load CSV file data into one table.

I have used , as delimter in CSV file. I can see correct data in preview of CSV file input step. But when I tried to insert data into Table Output step, I am getting data truncation error.

This is because I have below kind of values in one of my column. "2,ABC Squere".

As you see, I have "," in my column value so it is truncating and throwing error.How to solve this problem?

I want to upload data in Table with this kind of values..

2

There are 2 best solutions below

3
Srini V On BEST ANSWER

Here is one way of doing it

test.csv
--------
colA,colB,colC
ABC,"2,ABC Squere",test

See below the settings. The key is to use "" as encloser and , as delimiter.

enter image description here

0
NK0709 On

you can change the delimiter say to PIPE and also keeping data as quoted text like "1,Name" this will treat the same as 1 column