'move data from local to HDFS - data shift
I have comma separated file in .csv format
name,address,zip
Ram,"123,ave st",1234
While moving the data to hdfs and creating hive table in comma separated, facing column shift. What properties in Hive will fix this issue?
name - Ram
address - "123
zip - ave st"
Solution 1:[1]
ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde'
WITH SERDEPROPERTIES (
"SEPARATORCHAR" = ",",
"QUOTECHAR" = "\"",
"ESCAPECHAR" = "\""
)
STORED AS TEXTFILE
LOCATION
'hdfs://path'
It works..
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Shan |
