Skip to main content
Version: Streamsheets 3.0

TIMESCALE.SELECT

Premium

Performs a SELECT query on your timescale database.

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.SELECT(Connection, SelectJSON, [Target], [XValue])

Arguments

NameTypeDescription
ConnectionConnectionConnection to use for querying. Leave this parameter empty. The internal timescaledb is automatically connected.
SelectJSONJSONDefines a query using a JSON cell range, which contains all clauses to build the SELECT query.
Target (optional)TargetINBOX(), OUTBOX("MsgID") or a cell range where the result will be placed. Make sure the cell range is big enough or not everything is displayed. You don´t need a target area , if you only want to display charts. You can directly reference the cell with the query.
XValue (optional)StringName of the value which should be used for the x-axis if result is visualized by a chart. Defaults to "time"

Default value: "time"

Return

TypeDescription
BooleanTRUE, if successful.

Examples

ABC
1select*
2fromTimescaleDbTable
3limit10
4
5CatsDogstime
693508:01:07
723518:01:08
894528:01:09
914538:01:10
1054548:01:11
1165558:01:12
1212568:01:13
FormulaResultComment
=TIMESCALE.SELECT(, JSON(A1:B3), A5:C12)
TRUEThis query returns all values stored in the table "TimescaleDbtable", with a limit of 10.

For more examples see our timescale tutorial.