Re: I loaded the data with the timestamp field unsuccessful

2017-03-08 Thread kex
This problem has been solved. I run the same sql to another cluster  is
normal, may be the cluster of carbon.properties have problems.




--
View this message in context: 
http://apache-carbondata-mailing-list-archive.1130556.n5.nabble.com/I-loaded-the-data-with-the-timestamp-field-unsuccessful-tp8417p8499.html
Sent from the Apache CarbonData Mailing List archive mailing list archive at 
Nabble.com.


Re: I loaded the data with the timestamp field unsuccessful

2017-03-08 Thread Liang Chen
Hi

If the issue has be fixed?
BTW, you don't need add date column to DICTIONARY_INCLUDE, it do index for
date/timestamp columns.

Regards
Liang

kex wrote
> I loaded the data with the timestamp field unsuccessful,and timestamp
> field is null.
> 
> my sql:
> carbon.sql("create TABLE IF NOT EXISTS test1 (date timestamp,id string)
> STORED BY 'carbondata' TBLPROPERTIES
> ('DICTIONARY_INCLUDE'='date','DATEFORMAT'='date:/MM/dd')")
> 
> carbon.sql("LOAD DATA inpath 'hdfs://myha/user/carbon/testdata/test4.csv'
> INTO TABLE test1 options('FILEHEADER'='date,id')")
> 
> my data test4.csv:
> 2017/3/23,2
> 2017/1/11,1
> 2017/9/17,3
> 
> when i select:
> ++---+
> |date| id|
> ++---+
> |null|  1|
> |null|  2|
> |null|  3|
> ++---+
> 
> i print time format is correct:
> println(CarbonProperties.getInstance().getProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT))
> yyyy/MM/dd
> 
> What could be the reason for it?
> thx.





--
View this message in context: 
http://apache-carbondata-mailing-list-archive.1130556.n5.nabble.com/I-loaded-the-data-with-the-timestamp-field-unsuccessful-tp8417p8472.html
Sent from the Apache CarbonData Mailing List archive mailing list archive at 
Nabble.com.


Re: I loaded the data with the timestamp field unsuccessful

2017-03-08 Thread QiangCai
try /M/dd

Best Regards
David CaiQiang



--
View this message in context: 
http://apache-carbondata-mailing-list-archive.1130556.n5.nabble.com/I-loaded-the-data-with-the-timestamp-field-unsuccessful-tp8417p8419.html
Sent from the Apache CarbonData Mailing List archive mailing list archive at 
Nabble.com.


I loaded the data with the timestamp field unsuccessful

2017-03-07 Thread kex
I loaded the data with the timestamp field unsuccessful,and timestamp field
is null.

my sql:
carbon.sql("create TABLE IF NOT EXISTS test1 (date timestamp,id string)
STORED BY 'carbondata' TBLPROPERTIES
('DICTIONARY_INCLUDE'='date','DATEFORMAT'='date:/MM/dd')")

carbon.sql("LOAD DATA inpath 'hdfs://myha/user/carbon/testdata/test4.csv'
INTO TABLE test1 options('FILEHEADER'='date,id')")

my data test4.csv:
2017/3/23,2
2017/1/11,1
2017/9/17,3

when i select:
++---+
|date| id|
++---+
|null|  1|
|null|  2|
|null|  3|
++---+

i print time format is correct:
println(CarbonProperties.getInstance().getProperty(CarbonCommonConstants.CARBON_TIMESTAMP_FORMAT))
/MM/dd

What could be the reason for it?
thx.




--
View this message in context: 
http://apache-carbondata-mailing-list-archive.1130556.n5.nabble.com/I-loaded-the-data-with-the-timestamp-field-unsuccessful-tp8417.html
Sent from the Apache CarbonData Mailing List archive mailing list archive at 
Nabble.com.