Open DuckDB database using Python and DBeaver
I created a DuckDB file using the following Python code:
import duckdb
con = duckdb.connect(database=':memory:')
con = duckdb.connect(database='my-db.duckdb', read_only=False)
con.execute("CREATE TABLE items(item VARCHAR, value DECIMAL(10,2), count INTEGER)")
con.execute("INSERT INTO items VALUES ('jeans', 20.0, 1), ('hammer', 42.2, 2)")
# Testing
# con.execute("SELECT * FROM items")
# print(con.fetchall())
This creates the files:
my-db.duckdb
my-db.duckdb.wal
How can I run queries on these files using DBeaver? I am stuck creating the connection and don't understand what is required to connect.
🔴 No definitive solution yet