Support Questions
Find answers, ask questions, and share your expertise

Conversion of a file(with pipe(|), comma(,) and inverted commas(")) to avro format

Highlighted

Conversion of a file(with pipe(|), comma(,) and inverted commas(")) to avro format

I have a file with below data with 4 columns, out of it 1st column (TEXT1) is only column have data separated by comma (,) and remaining columns has no values/data.

"TEXT1","TEXT2","FILLER1","FILLER2"

|abcdef,ghijkl,1234,5678|,||,||,||

Now, when I tried to upload the table using ambari hive view, I observed as below in preview table.

data of column 1 is spitted and is moved to other three columns because I am using field delimiter as comma (,)

TEXT1TEXT2FILLER1FILLER2
abcdefghijkl12345678

instead I would like to upload the table like below:

TEXT1TEXT2FILLER1FILLER2
abcdef,ghijkl,1234,5678   

can some one suggest me how can I achieve this.

attached the screen shot of the settings (field delimiter, escape character, quote character, Is first row header)Capture.PNG

1 REPLY 1
Highlighted

Re: Conversion of a file(with pipe(|), comma(,) and inverted commas(")) to avro format

New Contributor

I think you can use regex to load data .