Connecting to DuckDB database
Hi!
I'm very new to databasing, and I am trying to connect DataGrip to a DuckDB database. However, when I create the database file
database.duckdb
from the DuckDB python API https://duckdb.org/docs/api/python/overview.html , and try to connect via DataGrip, I receive the following error after clicking the 'Test Connection' button:
IO Error: Could not set lock on file
error
Anyone run into similar issues? Any input would be valuable! Thanks in advance!
EDIT: The plot thickens. I now get this error when trying to connect to .duckdb file via DataGrip after disconnecting from python.
So it appears that DuckDB isn't stable yet, and this is causing issues when opening in DataGrip? On a side-note, is it possible to have simultaneous DB connections from both python and DataGrip? I was attempting to have simultaneous connections via python API and DataGrip during the first error.
请先登录再写评论。
The first error you observed
usually appears in various situations when one program locks access to the file, so other programs can't have it before unlocking. To access the file using DataGrip, you should close its connection with Python API.
The second error is about the version of our driver for DuckDB. Please, try to use a workaround provided in this comment to add a custom JDBC driver.
Awesome, thank you!