1

I'm working in python with duckdb and would like to use dbeaver alongside in read only mode. Where in dbeaver can I alter the config for duckdb, it doesn't appear in same location as Postgres ?

What I've tried:

  • Create data in python close connection and can then access duckdb via dbeaver
  • Create data in python with config READ_WRITE then open dbeaver and get error on access about file lock
mapping dom
  • 1,737
  • 4
  • 27
  • 50

2 Answers2

4

In DBeaver edit connection. From Connection settings, select Driver properties tab. Right click, add new property with name duckdb.read_only and set value to true.

You can now work in DBeaver.

You may only do multiple read connections. Once reading, I dont think you'r allowed connect with read_write intentions.

DBeaver driver documentation links to https://duckdb.org/docs/api/java

Olavz
  • 139
  • 1
  • 6
1

The answer from @Olavz is correct, but it is not possible to open both a write connection and a read-only connection at the same time. You can try in python:

rw = duckdb.connect("my.duckdb")
ro = duckdb.connect("my.duckdb", read_only=True)

Which will result in the error:

Error: Connection Error: Can't open a connection to same database file with a different configuration than existing connections

You can only open multiple read-only connections when there are no read-write connections.

Arthur Burkhardt
  • 658
  • 4
  • 13