Created 12-14-2015 06:59 AM
Hi, I am trying to write a query to create a table which will have more than one delimiter (comman and semi colon for example). I am using MultiDelimitSerde with field.delim serdeproperties. But When I give more than one character it is giving me error. Please help. Below is the command I am writing
Below command is working
create table txns(txnid int, custid int, amount double) row format serde(org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe) with serdeproperites ("field.delim" "[,]") stored as text file;
Below is not working
create table txns(txnid int, custid int, amount double) row format serde(org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe) with serdeproperites ("field.delim" "[,;]") stored as text file;
Created 12-19-2015 10:13 AM
Created 12-19-2015 10:52 AM
Hi, Thanks for your reply. THe query worked fine now but I am facing different issue. Please find below
Queries executed
create table test1 (f1 int, f2 int, f3 int) row format serde 'org.apache.hadoop.hive.contrib.serde2.MultiDelimitSerDe' with serdeproperties ("field.delim" = "[,\;]") stored as textfile;
load data local inpath '/home/cloudera/Desktop/Ram/test1' overwrite into table test1;
data in test1 file
1,2;3
When I run select * from test1; I am getting only NULLS
hive> select * from test1;
OK
NULL NULL NULL
Time taken: 0.056 seconds, Fetched: 1 row(s)
Can you please help me fixing this?
Created 01-11-2016 05:16 AM
Hi,
Did anyone had a chance to look at my question above?