You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use a file to persist the data, but I can't because I don't have a pre-existing file to use? Is there a way to create an empty duckdb file or make so it creates one if it does not exist?
The .open command optionally accepts several options, but the final parameter can be used to indicate a path to a persistent database (or where one should be created). The special string :memory: can also be used to open a temporary in-memory database.
One challenge with wasm is it doesn't have a real filesystem. The duckdb-wasm library has its own "virtual filesystem", but AFAIK there aren't great ways to read/write to duckdb files in the browser context.
I believe the path: config works if you can serve a duckdb file from a file server you can access (e.g. in a public folder), but that won't help you persist back.
What I've usually done in the past is persist data as Parquet files myself (either in a browser's IndexedDb or on a server) and then load them into DuckDB-wasm in memory for querying. If you figure out a better approach to using .duckdb files directly, let me know!
I want to use a file to persist the data, but I can't because I don't have a pre-existing file to use? Is there a way to create an empty duckdb file or make so it creates one if it does not exist?
The text was updated successfully, but these errors were encountered: