I would like to connect to JDBC DB, e.g. Postgres, via Calcite driver using sqlline
shell script wrapper included in the calcite
git repo. I'm facing the problem how to specify the target JDBC Postgres driver. Initially I tried this:
CLASSPATH=/Users/davidkubecka/git/calcite/build/libs/postgresql-42.2.18.jar ./sqlline -u jdbc:calcite:model=model.json
The model.json
is this:
{
"version": "1.0",
"defaultSchema": "tpch",
"schemas": [
{
"name": "tpch",
"type": "jdbc",
"jdbcUrl": "jdbc:postgresql://localhost/*",
"jdbcSchema": "tpch",
"jdbcUser": "*",
"jdbcPassword": "*"
}
]
}
But
- First, I got asked for username and password even though the are already specified in the model.
- Second, after filling in the credentials I still get error
java.lang.RuntimeException: java.sql.SQLException: Cannot create JDBC driver of class '' for connect URL 'jdbc:postgresql://localhost/*'
So my question is whether this scenario (using JDBC driver inside Calcite driver via sqlline) is supported and if yes how can I make the connection?