Open seajhawk opened 1 year ago
I modified a bit the driver and now you can run without errors the SQL 'write' queries (like CREAT TABLE and etc), but Metabase engine sets DB connection to readOnly, so all of your changes will not be persistent. All you can do now is to create a view in each query session. For example:
create view raw_state as select * from '/app/database/*.parquet';
select * from raw_state;
...
But, I found a workaround how to do exactly what you want. For example, you mounted the 'my.duckdb' database folder into /app/database Metabase container folder. Let's pretend that all of you *.parquet files in the same folder.
later all you need is just copy the new raw_view_NNN.parquet file into the folder with the ducked database (mounted into container) and refresh Metabase web page.
Considering that duckdb has not reach 1.0 yet and build-to-build there are database version incompatibilities. Also, I would like to incrementally add to my database month-by-month without having to re-create the database and restart the metabase container to release the lock on the duckdb database file.
create view raw_state as select * from 'raw_state.parquet';
which works fine when querying it in duckdb.exe (eventually I'd change this to query across multiple raw_state files, not just one.)However, when I open the Raw State view, I get the following error:
IO Error: No files found that match the pattern "raw_state.parquet"
I'm guessing duckdb is looking for the raw_state.parquet file in the same folder where the metabase.jar is running, not the folder where the duckdb database is located.
I tried specifying the full path to the raw_state.parquet file when creating the view on my local machine, but I don't have a /home/data/duckdb folder so duckdb.exe complains.
Any thoughts on how we might get the view query to run and look for the files in a path relative to the duckdb database?