Fwd: MODERATE for dev@carbondata.apache.org

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Fwd: MODERATE for dev@carbondata.apache.org

Liang Chen-2
First please send one mail to [hidden email]
<[hidden email]> for joining mailing list
group.

After you join mailing list group, please send your question again to
[hidden email] <[hidden email]>

Regards

Liang

---------- Forwarded message ----------
From: <[hidden email]
>
Date: 2017-05-16 8:39 GMT-04:00
Subject: MODERATE for [hidden email]
To:
Cc: dev-allow-tc.1494938369.fmjhmojidcndippkammh-vinod=
[hidden email]



To approve:
   [hidden email]
To reject:
   [hidden email]
To give a reason to reject:
%%% Start comment
%%% End comment



---------- 已转发邮件 ----------
From: vin7149 <[hidden email]>
To: [hidden email]
Cc:
Bcc:
Date: Tue, 16 May 2017 05:39:27 -0700 (MST)
Subject: White Space does not trim in CarbonData
Hi Community,

I have a create a table in hive and same in CarbonData, In my CSV there is
whitespace after the data which is working fine in hive table whereas it
shows null in CarbonData table.

*In Hive*

1: Table created in Hive

create table my_user(id int, name string, address1 string, address2
string,salary double, incentive int)ROW FORMAT DELIMITED FIELDS TERMINATED
BY ",";

2: Load Data in table

LOAD DATA LOCAL INPATH '/home/vinod/Downloads/my_user2.csv' OVERWRITE INTO
TABLE my_user;

3: Select Query on hive

0: jdbc:hive2://localhost:10000> select * from my_user;
+-----+-----------+-----------+-----------+----------+------------+--+
| id  |   name    | address1  | address2  |  salary  | incentive  |
+-----+-----------+-----------+-----------+----------+------------+--+
| 1   | 'katy'    | 'london'  | 'UK'      | 5000.0   | 5000       |
| 2   | 'John'    | 'goa'     | 'goa'     | 12000.0  | 500        |
| 3   | 'Rachel'  | 'goa'     | 'goa'     | 10000.0  | 1000       |
+-----+-----------+-----------+-----------+----------+------------+--+
3 rows selected (0.122 seconds)

*In Carbon*

1: Create Table in Carbon

create table my_user_c(id int, name string, address1 string, address2
string,salary double, incentive int) stored by 'carbondata';

2: Load Data in table

load data inpath 'hdfs://localhost:54310/my_user2.csv' into table my_user_c;

3: Select Query on carbon

0: jdbc:hive2://localhost:10000> select * from my_user_c;
+-----+-----------+-----------+-----------+----------+------------+--+
| id  |   name    | address1  | address2  |  salary  | incentive  |
+-----+-----------+-----------+-----------+----------+------------+--+
| 2   | 'John'    | 'goa'     | 'goa'     | 12000.0  | 500        |
| 3   | 'Rachel'  | 'goa'     | 'goa'     | 10000.0  | NULL      |
| 1   | 'katy'    | 'london'  | 'UK'      | 5000.0   | 5000       |
+-----+-----------+-----------+-----------+----------+------------+--+
3 rows selected (0.193 seconds)


it should display 1000 instead of NULL value in CarbonData.




--
View this message in context: http://apache-carbondata-dev-
mailing-list-archive.1130556.n5.nabble.com/White-Space-
does-not-trim-in-CarbonData-tp12736.html
Sent from the Apache CarbonData Dev Mailing List archive mailing list
archive at Nabble.com.