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
It'd be great to be able to import (attach) DuckDB database files as well, similar to CSV, Parquet and Arrow files.
The code I'm currently using is basically this:
constloadDatabase=async(db: AsyncDuckDB,acceptedFile: File)=>{try{constfileName=acceptedFile.name.replace(".duckdb","");// Connect to the databaseconstcid=awaitdb.connectInternal();// Register the fileawaitdb.registerFileBuffer(fileName,newUint8Array(awaitacceptedFile.arrayBuffer()));// Attach the databaseawaitdb.runQuery(cid,`ATTACH '${fileName}' (READ_ONLY)`);// Disconnect from the databaseawaitdb.disconnect(cid);}catch(err: any){console.log(err);}}
The text was updated successfully, but these errors were encountered:
It'd be great to be able to import (attach) DuckDB database files as well, similar to CSV, Parquet and Arrow files.
The code I'm currently using is basically this:
The text was updated successfully, but these errors were encountered: