Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
release 0.12.0
cli构造数据:
构造数据:
CREATE TIMESERIES root.db1.tab1.id WITH DATATYPE=INT32, ENCODING=PLAIN
CREATE TIMESERIES root.db1.tab1.name WITH DATATYPE=text, ENCODING=PLAIN
CREATE TIMESERIES root.db1.tab1.age WITH DATATYPE=INT32, ENCODING=PLAIN
CREATE TIMESERIES root.db1.tab1.country WITH DATATYPE=text, ENCODING=PLAIN
CREATE TIMESERIES root.db1.tab1.salary WITH DATATYPE=float, ENCODING=PLAIN
CREATE TIMESERIES root.db1.tab1.other WITH DATATYPE=double, ENCODING=PLAIN
CREATE TIMESERIES root.db1.tab1.student WITH DATATYPE=boolean, ENCODING=PLAIN
insert into root.db1.tab1(time,id,name,age,country,salary,other ,student ) values(now(),1,'lily',25,'usa',5678.34,7.777777,false);
insert into root.db1.tab1(time,id,name,age,country,salary,other ,student ) values(now(),0,'lily0',25,'usa',5678.34,7.777777,false);
insert into root.db1.tab1(time,id,name,age,country,salary,other ,student ) values(now(),1,'lily1',25,'usa',5678.34,7.777777,false);
insert into root.db1.tab1(time,id,name,age,country,salary,other ,student ) values(now(),2,'lily2',25,'usa',5678.34,7.777777,false);
insert into root.db1.tab1(time,id,name,age,country,salary,other ,student ) values(now(),3,'lily3',25,'usa',5678.34,7.777777,false);
先export:
select文件的内容:select * from root.db1.*
./export-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -tf yyyy-MM-dd\'T\'HH:mm:ss.SSS -td ./ -f dump_ts2.csv -s select
导出文件指定tf包含毫秒。导出结果:
Time,root.db1.tab1.country,root.db1.tab1.other,root.db1.tab1.student,root.db1.tab1.name,root.db1.tab1.id,root.db1.tab1.salary,root.db1.tab1.age
2021-04-19T16:28:49.810,usa,7.777777,false,lily,1.0,5678.34,25.0
2021-04-19T16:28:49.818,usa,7.777777,false,lily0,0.0,5678.34,25.0
2021-04-19T16:28:49.824,usa,7.777777,false,lily1,1.0,5678.34,25.0
2021-04-19T16:28:49.828,usa,7.777777,false,lily2,2.0,5678.34,25.0
2021-04-19T16:28:49.833,usa,7.777777,false,lily3,3.0,5678.34,25.0
cli删除数据:
delete from root.db1.*;
import导入数据:
./import-csv.sh -h 127.0.0.1 -p 6667 -u root -pw root -f ./dump_ts2.csv0.csv
cli查询:
select * from root.db1.*; --毫秒被截断置为0 ,import-csv不支持指定时间戳格式。
Attachments
Attachments
Issue Links
- causes
-
IOTDB-1232 import csv,the imported data is incompletely and some imported time column is wrong.
- Closed
- is a child of
-
IOTDB-842 Better Export/Import-CSV Tool
- Closed
- links to