Created on 11-29-2018 02:19 PM - edited 08-17-2019 04:23 PM
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 (,)
TEXT1 | TEXT2 | FILLER1 | FILLER2 |
abcdef | ghijkl | 1234 | 5678 |
instead I would like to upload the table like below:
TEXT1 | TEXT2 | FILLER1 | FILLER2 |
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)
Created 12-13-2018 09:11 AM
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,,,
Created 08-19-2019 12:33 AM
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.