Skip to main content
Version: Streamsheets 3.0

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

NameTypeDescription
ConnectionConnectionConnection to use for querying. Leave this parameter empty. The internal timescaledb is automatically connected.
TableNameStringDefines which table to create.
SchemaJSONRangeThe 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

TypeDescription
BooleanTRUE, if successful.

Examples

AB
1Value1TEXT
2Value2NUMERIC
3Value3TIMESTAMP
FormulaResultComment
=TIMESCALE.CREATE_TABLE(, "Table1",JSON(A1:B3))
TRUECreates the table "Table1".

For more examples see our timescale tutorial.