Tables management
The API is used for creating a table. For more detailed information of table definition, please refer to .
Request sample, the request is a json string with field.
{"sql":"create table my_table (id bigint, name string, score float) WITH ( datasource = \"lookup.json\", FORMAT = \"json\", KEY = \"id\")"}
This API can run any table sql statements, not only table creation.
GET http://localhost:9081/tables
Response Sample:
The API is used for print the detailed definition of table.
GET http://localhost:9081/tables/{id}}
Response Sample:
{
"StreamFields": [
{
"Name": "temperature",
"Type": 2
}
},
{
"Name": "ts",
"Type": 1
}
],
"Options": {
"DATASOURCE": "lookup.json",
"FORMAT": "JSON"
}
}
Path parameter id
is the id or name of the old table.
Request sample, the request is a json string with sql
field.
The API is used for drop the table definition.
DELETE http://localhost:9081/tables/{id}