Relative Content

Tag Archive for pythonduckdb

How to force DuckDB to reconnect to a file and prevent it from remembering contents of a deleted database file?

Motivation I’m working on a larger dashboard application which uses duckdb. I found out a bug which in a nutshell is like this: # create new connection con = duckdb.connect(‘/somedir/duckdb.db’) # do something # remove or replace the file Path(‘/somedir/duckdb.db’).unlink() shutil.copy(‘/otherdir/duckdb.db’, ‘/somedir/duckdb.db’) # create new connection to the *new* file with same location con = […]