Login  Register

Re: Load data command Quote character unexpected behavior.

Posted by on Oct 25, 2016; 1:32pm
URL: http://apache-carbondata-dev-mailing-list-archive.168.s1.nabble.com/Load-data-command-Quote-character-unexpected-behavior-tp2145p2297.html

hi, harmeet
   
  i checked your csv file, i think that's because there is space between comma,
   which cause that $ not the start of filed, so the actual value is parsed as space+$my name$+space
   so this is not a problem. remove the space, it will be fine.


regards
Jay
------------------ Original ------------------
From:  "Harmeet";<[hidden email]>;
Date:  Fri, Oct 21, 2016 03:07 PM
To:  "dev"<[hidden email]>;

Subject:  Load data command Quote character unexpected behavior.



Hey Team,

I am using load data command with specific Quote character. But after
loading the data, the behavior of quote character is not working. Below is
my example:

*create table one (name string, description string, salary double, age int,
dob timestamp) stored by 'carbondata';*

csf File >>

name, description, salary, age, dob
tammy, $my name$, 900000, 22, 19/10/2019

0: jdbc:hive2://127.0.0.1:10000> load data local inpath
'hdfs://localhost:54310/home/harmeet/dollarquote.csv' into table one
OPTIONS('QUOTECHAR'="$");

Results >>
0: jdbc:hive2://127.0.0.1:10000> select * from one;
+-------------------------------------------+--------------+-------+-----------+-------+--+
|                   name                    | description  |  dob  |  salary  
|  age  |
+-------------------------------------------+--------------+-------+-----------+-------+--+
| tammy                                     |  $my name$   | NULL  |
900000.0  | 22    |
+-------------------------------------------+--------------+-------+-----------+-------+--+

I am assuming, in description column only "my name" data is loaded and
dollars was exclude, but this is not working. The same behavior, if we are
using ' (Single Quote) with data.



--
View this message in context: http://apache-carbondata-mailing-list-archive.1130556.n5.nabble.com/Load-data-command-Quote-character-unexpected-behavior-tp2145.html
Sent from the Apache CarbonData Mailing List archive mailing list archive at Nabble.com.