JDBC / SQL
Binding: %jdbc
Runs SQL against any data source your administrator has connected over JDBC (PostgreSQL, MySQL, Hive, and other JDBC-compatible databases). A Skeyenote instance can have several JDBC connections configured, each exposed as its own binding (for example %jdbc(mydb)) — ask your administrator which ones are available to you.
%jdbc
SELECT customer_id, sum(amount) AS total
FROM sales
GROUP BY customer_id
ORDER BY total DESC
LIMIT 20;
Configuration
| Property | Default | Description |
|---|---|---|
default.url | jdbc:postgresql://localhost:5432/ | JDBC connection URL. |
default.user / default.password | — | Credentials used to connect. |
default.driver | org.postgresql.Driver | JDBC driver class. |
common.max_count | 1000 | Max number of rows returned per query. |
default.precode | (empty) | SQL run once when the connection opens (for example to SET session options). |
default.statementPrecode | (empty) | SQL run before every paragraph, on the same connection. |
skeyenote.jdbc.auth.type | (empty) | Set to KERBEROS if the data source needs Kerberos authentication. |
skeyenote.jdbc.concurrent.use / skeyenote.jdbc.concurrent.max_connection | true / 10 | Whether queries can run concurrently, and how many connections to allow. |
skeyenote.jdbc.maxRows | 1000 | Maximum number of rows fetched from a query. |
These are set by your administrator from the interpreter settings screen, one connection at a time.