Skip to main content
Version: Streamsheets 3.0

TIMESCALE.EXPORT

Premium

Performs an EXPORT query on your Timescale database. This query works exactly like the queries from TIMESCALE.SELECT, but exports the result into a file. This file can be accessed in the side menu of your App under "App Files".

info

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

Syntax

=TIMESCALE.EXPORT(Connection, SelectJSON, Filename, [Compress], [Delimiter], [ByteOrderMark])

Arguments

NameTypeDescription
ConnectionConnectionConnection to use for querying. Leave this parameter empty. The internal timescaledb is automatically connected.
SelectJSONJSONA SelectJSON to query your data to export.
FilenameStringName of the File to write the export to.
Compress (optional)BooleanSpecify TRUE to write zip-compressed export.

Default value: FALSE
Delimiter (optional)StringA delimiter character. Only comma, semicolon and tabulator ( ) are allowed.

Default value: "Default depends on current machine locale, i.e. comma is used if machine locale is english and semicolon if it is set to german."
ByteOrderMark (optional)BooleanSpecify TRUE to write a byte-order-mark at the beginning of exported file.

Default value: FALSE

Return

TypeDescription
BooleanTRUE, if successful.

Examples

FormulaResultComment
=TIMESCALE.EXPORT(, "Table1", JSON(A1:B2), "Export1")
TRUEExports data from "Table1" to the file "Export1". The data to export is specified in A1:B2

For more examples see our timescale tutorial.