eKuiper 表命令行工具允许您管理表,例如创建、描述、显示和删除。
该命令用于创建表。更详细的表定义信息请参考 tables。
create table $table_name $table_def | create table -f $table_def_file
my_table
的表。# bin/kuiper create table my_table '(id bigint, name string, score float) WITH ( datasource = "lookup.json", FORMAT = "json", KEY = "id");'
table my_table created
# bin/kuiper create table -f /tmp/my_table.txt
table my_table created
以下是 my_table.txt
的内容.
my_table(id bigint, name string, score float)
WITH ( datasource = "lookup.json", FORMAT = "json", KEY = "id");
该命令用于显示 eKuiper 中定义的所有表。
show tables
例如:
# bin/kuiper show tables
my_table
该命令用于打印表的详细定义。
describe table $table_name
例如:
# bin/kuiper describe table my_table
Fields
--------------------------------------------------------------------------------
id bigint
name string
score float
FORMAT: json
KEY: id
DATASOURCE: lookup.json
*注意*: 目前 eKuiper 不支持查看表的内容,用户可直接将表与流 join 查看结果。
该命令用于删除表
drop table $table_name
例如:
# bin/kuiper drop table my_table
table my_table dropped