TIMESCALE.CREATE_TABLE
Premium
Creates a table in the timescaledb and sets up its schema. The function is ignored if the table already exists.
info
As of right now, the timescale functions work with the internal timescaledb. Leave the Connection parameter empty and the connection is automatically set up. We are working on allowing further timescale connections.
Syntax
=TIMESCALE.CREATE_TABLE(Connection, TableName, SchemaJSON)
Arguments
Name | Type | Description |
---|---|---|
Connection | Connection | Connection to use for querying. Leave this parameter empty. The internal timescaledb is automatically connected. |
TableName | String | Defines which table to create. |
SchemaJSON | Range | The timescale enforces the usage of a schema. Enter a JSON Range to setup the schema. Supported schema values can be NUMERIC, TEXT, TIMESTAMP,, TIMESTAMPTZ, DATE, INTEGER etc. See here for detailed explanation. |
Return
Type | Description |
---|---|
Boolean | TRUE, if successful. |
Examples
A | B | |
---|---|---|
1 | Value1 | TEXT |
2 | Value2 | NUMERIC |
3 | Value3 | TIMESTAMP |
Formula | Result | Comment |
---|---|---|
| TRUE | Creates the table "Table1". |
For more examples see our timescale tutorial.