Files
greptimedb/tests/cases/standalone/common/copy/copy_to_fs.sql
Weny Xu c471007edd feat: support to copy table from/to CSV and JSON format file (#1475)
* 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
2023-05-04 17:20:28 +08:00

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;