Skip to main content
Version: Streamsheets 2.4

TIMESCALE.CREATE_TABLE

star This is a [Streamsheets Enterprise]https://cedalo.com/get-started-with-cedalo-real-time-platform/) feature.

Creates a table in the timescaledb and sets up its schema.

info

As of right now, the timescale functions work with the internal timescaledb. Leave the Stream parameter empty and the connection is automatically set up. We are working on allowing further timescale connections.

Syntax

=TIMESCALE.CREATE_TABLE(Stream, Type, Name [, Timeout])

Arguments

NameDescription
StreamStream to use for querying. The database name is configured in the affiliated Connector.
TableNameDefines which table to create.
SchemaJSONThe 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 Value

TRUE, if successful.

Examples

FunctionResultComment
=TIMESCALE.CREATE_TABLE(, "Table1",JSON(A1:B3))TRUECreates the table "Table1". In the Range A1:B3 you have to provide the schema for the key value pairs. E.g. Value1: TEXT; Value2: NUMERIC; Value3: TIMESTAMP

For more examples see our timescale tutorial.