Support Questions

Find answers, ask questions, and share your expertise
Announcements
Check out our newest addition to the community, the Cloudera Data Analytics (CDA) group hub.

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

New Contributor

I think you can use regex to load data .

 

 

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.