Query
Source:
src/AWS/Timestream/Query.ts
Runtime binding for timestream-query:Query — run SQL queries against a
Timestream Table.
Bind the operation to a table inside a function runtime to get a callable
that grants timestream:Select on the table (plus the unscoped
timestream:DescribeEndpoints the endpoint-discovery flow needs). The
query string itself still references the database and table by name.
Provide Timestream.QueryHttp on the Function to implement the binding.
Querying Data
Section titled “Querying Data”// init — bind the operation to the tableconst query = yield* Timestream.Query(table);
// runtime — run a SQL queryconst result = yield* query({ QueryString: `SELECT COUNT(*) AS c FROM "${databaseName}"."${tableName}"`,});// result.Rows / result.ColumnInfo hold the result set