SQLEXEC

The SQLEXEC function executes a SQL statement against a JDBC compatible RDBMS and generates Geo Time Series from the resultinf rows.

The JDBC drivers which can be used are those whose Driver classes have been added to the Warp 10 configuration using a jdbc.driver. prefixed configuration key, e.g. for PostgreSQL the following declaration should appear:

   jdbc.driver.postgres = org.postgresql.Driver

with the .jar file containing the driver present in the classpath of the Warp 10 instance, typically in the lib directory.

Signature

Examples

// // Reading Time Series from TimeScaleDB // @see https://github.com/timescale/timescaledb-docker // @see https://github.com/timescale/timescaledb/blob/master/README.md // // @see https://jdbc.postgresql.org/ // // DB URL 'jdbc:postgresql://localhost:5432/' { 'user' 'postgres' 'password' 'foo' } // We need to extract the epoch timestamp from the timestamp column 'select 1000000*extract(epoch from time) as ts,humidity,temperature,location from conditions;' [ 'ts' 'temperature' 'humidity' ] SQLEXEC