load_duckdb_database¶
load_duckdb_database(duckdb_file_url, destination_dataset)
Description¶
Download duckdb database into destination_dataset
This function extends load_duckdb_database_into_temp_dataset
function.
Each call:
- Creates a new temporary dataset only accessible to you in bigfunctions project.
- Downloads the tables of the duckdb database to this temporary dataset.
- Copies the table into
destination_dataset
before deleting the temporary dataset.
Usage¶
Call or Deploy load_duckdb_database
?
Call load_duckdb_database
directly
The easiest way to use bigfunctions
load_duckdb_database
function is deployed in 39 public datasets for all of the 39 BigQuery regions.- It can be called by anyone. Just copy / paste examples below in your BigQuery console. It just works!
- (You need to use the dataset in the same region as your datasets otherwise you may have a function not found error)
Public BigFunctions Datasets
Region | Dataset |
---|---|
eu |
bigfunctions.eu |
us |
bigfunctions.us |
europe-west1 |
bigfunctions.europe_west1 |
asia-east1 |
bigfunctions.asia_east1 |
... | ... |
Deploy load_duckdb_database
in your project
Why deploy?
- You may prefer to deploy
load_duckdb_database
in your own project to build and manage your own catalog of functions. - This is particularly useful if you want to create private functions (for example calling your internal APIs).
- Get started by reading the framework page
Deployment
load_duckdb_database
function can be deployed with:
pip install bigfunctions
bigfun get load_duckdb_database
bigfun deploy load_duckdb_database
Examples¶
load duckdb database used in evidence examples
call bigfunctions.eu.load_duckdb_database("https://github.com/evidence-dev/sql-prophet/raw/refs/heads/main/sources/needful_things/needful_things.duckdb", "your_project.your_dataset");
select * from bigfunction_result;
call bigfunctions.us.load_duckdb_database("https://github.com/evidence-dev/sql-prophet/raw/refs/heads/main/sources/needful_things/needful_things.duckdb", "your_project.your_dataset");
select * from bigfunction_result;
call bigfunctions.europe_west1.load_duckdb_database("https://github.com/evidence-dev/sql-prophet/raw/refs/heads/main/sources/needful_things/needful_things.duckdb", "your_project.your_dataset");
select * from bigfunction_result;
+--------+
+ status +
+--------+
+ ok +
+--------+
Need help or Found a bug?
Get help using load_duckdb_database
The community can help! Engage the conversation on Slack
We also provide professional suppport.
Report a bug about load_duckdb_database
If the function does not work as expected, please
- report a bug so that it can be improved.
- or open the discussion with the community on Slack.
We also provide professional suppport.