mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-01-14 17:23:09 +00:00
* refactor: refactor copy from executor * feat: support to copy from CSV and JSON format files * feat: support to copy table to the CSV and JSON format file * test: add tests copy from/to * chore: apply suggestions from CR
12 lines
388 B
SQL
12 lines
388 B
SQL
CREATE TABLE demo(host string, cpu double, memory double, ts TIMESTAMP time index);
|
|
|
|
insert into demo(host, cpu, memory, ts) values ('host1', 66.6, 1024, 1655276557000), ('host2', 88.8, 333.3, 1655276558000);
|
|
|
|
Copy demo TO '/tmp/export/demo.parquet';
|
|
|
|
Copy demo TO '/tmp/export/demo.csv' with (format='csv');
|
|
|
|
Copy demo TO '/tmp/export/demo.json' with (format='json');
|
|
|
|
drop table demo;
|