Centos7下cratedb数据导入导出copy to copy from

crate 创建表结构:

查看表:

  show tables;

创建表结构:

  create table tablename (k1 type,k2 type,k3 type);

  (type = int string ...)

插入数据:

  insert into tablename (k1,k2 ,k3) values (v1,v2,v3);

  select * from tablename;

注意:先建立表才能够copy!

copy to

  COPY test to DIRECTORY '/nfs/crate/test-a';

copy from

  COPY test from '/nfs/crate/test-a/test_0_.json';

猜你喜欢

转载自www.cnblogs.com/jackyzm/p/10285864.html