Skip to main content
Version: Streamsheets 2.5

TIMESCALE.UPDATE

star This is a premium feature.

Performs an UPDATE query on your timescale database.

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.UPDATE(Stream, UpdateJSON)

Arguments

NameDescription
StreamStream to use for querying. The database name is configured in the affiliated Connector.
UpdateJSONDefines a query using a JSON cell range, which contains all clauses to build the UPDATE query.

Return

TRUE, if successful.

Examples

WritePayload

These are two ways to enter the update syntax. Either use one long string for the "set" command or divide the command in multiple rows.

FormulaResultComment
=TIMESCALE.UPDATE(, JSON(A1:B3))
TRUEAssuming passed JSON looks like { update: 'tableName', set: '"SensorA"=42', where: '"SensorB">50' } this will update column SensorA at all rows in which column SensorB has a value greater 50

For more examples see our timescale tutorial.