Skip to main content

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

PropertyDefaultDescription
default.urljdbc:postgresql://localhost:5432/JDBC connection URL.
default.user / default.passwordCredentials used to connect.
default.driverorg.postgresql.DriverJDBC driver class.
common.max_count1000Max 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_connectiontrue / 10Whether queries can run concurrently, and how many connections to allow.
skeyenote.jdbc.maxRows1000Maximum number of rows fetched from a query.

These are set by your administrator from the interpreter settings screen, one connection at a time.