Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How can we upload a table using hive view(ambari) with comma(,) in the value of the column

Highlighted

How can we upload a table using hive view(ambari) with comma(,) in the value of the column

Explorer

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)

93746-capture.png

2 REPLIES 2

Re: How can we upload a table using hive view(ambari) with comma(,) in the value of the column

New Contributor

Please, in the UI, choose | as Field Delimiter character and , as Escape Character and you'll be fine OR use the escape character for what it is designed for by rewriting your text file:

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

Re: How can we upload a table using hive view(ambari) with comma(,) in the value of the column

New Contributor

Please note that the file upload size is limited by the /var/lib/ambary-server/resources and you'll definitely need USE permissions on 'default' as the procedure relies on 'create table as select' from an intermediate table stored in.