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.

    1. {"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.

    1. GET http://localhost:9081/tables

    Response Sample:

    The API is used for print the detailed definition of table.

    1. GET http://localhost:9081/tables/{id}}

    Response Sample:

    1. {
    2. "StreamFields": [
    3. {
    4. "Name": "temperature",
    5. "Type": 2
    6. }
    7. },
    8. {
    9. "Name": "ts",
    10. "Type": 1
    11. }
    12. ],
    13. "Options": {
    14. "DATASOURCE": "lookup.json",
    15. "FORMAT": "JSON"
    16. }
    17. }

    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.

      1. DELETE http://localhost:9081/tables/{id}