export_to_storage¶
export_to_storage(path, content, content_type)
Description¶
Exports content
to Cloud Storage
💡 For this to work,
bigfunction@bigfunctions.iam.gserviceaccount.com
must have objectCreator role to the bucket.
Examples¶
Call or Deploy export_to_storage
?
Call export_to_storage
directly
The easiest way to use bigfunctions
export_to_storage
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 export_to_storage
in your project
Why deploy?
- You may prefer to deploy
export_to_storage
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
export_to_storage
function can be deployed with:
pip install bigfunctions
bigfun get export_to_storage
bigfun deploy export_to_storage
Export data
to default database, to default namespace with auto-generated key
.
select bigfunctions.eu.export_to_storage('gs://bucket/path/to/filename.csv', 'column1,column2
value1,value2')
select bigfunctions.us.export_to_storage('gs://bucket/path/to/filename.csv', 'column1,column2
value1,value2')
select bigfunctions.europe_west1.export_to_storage('gs://bucket/path/to/filename.csv', 'column1,column2
value1,value2')
+--------+
| status |
+--------+
| OK |
+--------+
Need help or Found a bug using export_to_storage
?
Get help using export_to_storage
The community can help! Engage the conversation on Slack
We also provide professional suppport.
Report a bug about export_to_storage
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.
Spread the word!¶
BigFunctions is fully open-source. Help make it a success by spreading the word!