Closed gouline closed 1 year ago
If someone will be against it is possible to add read_only parameters to the DuckDB config page (like database_file).
Also, if user wants to open database in the memory mode, for example just to read parquet files (without native DuckDB database) then read_mode must be false, because DuckDB can't open im-memory DB in read only mode. So, i think we need some kind of check if trim of database_file param is empty then force read_only to false.
Would anyone be against making the JDBC connection read-only? From what I understand, Metabase only executes select statements, so it doesn't need write permissions to DuckDB files.
The benefit of a read-only connection is being able to insert data into the file externally (e.g. custom script, dbt transformations) and syncing Metabase without having to restart it. Makes it a powerful tool for local data analysis on your machine.
This page has a Java example:
Happy to figure out how to do it in Clojure and contribute a pull request, just wanted to ask first.