You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Arthur Pan <pa...@berkeley.edu> on 2022/02/13 08:24:03 UTC

Connect Calcite to Sqlite

Hi dev,

I'm trying to connect Calcite to Sqlite via Jdbc, and extract the existing
schemas from the a real database. I have tried to set up a
CalciteJdbc41Connection, but I have not been successful so far. I'm
wondering if this is the right way to do this, or are there any other
things that I should check first?

Sincerely,
Arthur Pan

Re:Connect Calcite to Sqlite

Posted by Zhe Hu <il...@163.com>.
Hi, Pan.
It will be much better to go through your issue if you show us how you use Calcite to connect Sqlite and what the StackTrace is.


There is one demo in core/src/test/resources/mysql-foodmart-model.json you can take a look. By adding a new file(like sqlite.json) which stores connection properties for Sqlite, you can create Connection through “DriverManager.getConnection(jdbc:calcite:model=sqlite.json)”.
The connection above is what you need if I understand you correctly.


Best,
ZheHu
On 02/14/2022 11:40,Arthur Pan<pa...@berkeley.edu> wrote:
Hi dev,

I'm trying to connect Calcite to Sqlite via Jdbc, and extract the existing
schemas from the a real database. I have tried to set up a
CalciteJdbc41Connection, but I have not been successful so far. I'm
wondering if this is the right way to do this, or are there any other
things that I should check first?

Sincerely,
Arthur Pan