Skip to content

load_duckdb_database_into_temp_dataset

load_duckdb_database_into_temp_dataset(duckdb_file_url)

Description

Download duckdb database into a temp dataset in bigfunctions project.

Each call to this function creates a new temporary dataset which:

  • will contains the duckdb tables present in the duckdb file,
  • is accessible only to you (who calls the function) and the function. You have permission to read data, delete the tables and delete the dataset.
  • has a limited period of life. Default expiration time is set to 1h so that every table created will be automatically deleted after 1h. Empty datasets are periodically removed.
  • has a random name returned by the function

Usage

Call or Deploy load_duckdb_database_into_temp_dataset ?
Call load_duckdb_database_into_temp_dataset directly

The easiest way to use bigfunctions

  • load_duckdb_database_into_temp_dataset 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_into_temp_dataset in your project

Why deploy?

  • You may prefer to deploy load_duckdb_database_into_temp_dataset 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_into_temp_dataset function can be deployed with:

pip install bigfunctions
bigfun get load_duckdb_database_into_temp_dataset
bigfun deploy load_duckdb_database_into_temp_dataset

Examples

load duckdb database used in evidence examples

select bigfunctions.eu.load_duckdb_database_into_temp_dataset("https://github.com/evidence-dev/sql-prophet/raw/refs/heads/main/sources/needful_things/needful_things.duckdb")
select bigfunctions.us.load_duckdb_database_into_temp_dataset("https://github.com/evidence-dev/sql-prophet/raw/refs/heads/main/sources/needful_things/needful_things.duckdb")
select bigfunctions.europe_west1.load_duckdb_database_into_temp_dataset("https://github.com/evidence-dev/sql-prophet/raw/refs/heads/main/sources/needful_things/needful_things.duckdb")
+------------------------------------------------------------------+
| destination_dataset                                              |
+------------------------------------------------------------------+
| bigfunctions.temp_6bdb75ca_7f72_4f1f_b46a_6ca59f7f66ac.file_data |
+------------------------------------------------------------------+


Need help or Found a bug?
Get help using load_duckdb_database_into_temp_dataset

The community can help! Engage the conversation on Slack

We also provide professional suppport.

Report a bug about load_duckdb_database_into_temp_dataset

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.


Show your ❤ by adding a ⭐ on