Translate

Friday 12 January 2024

Shahed

Google Big Query (BQ) Results to GCS Storage Bucket Folder

Export data from BQ to a GCS(Google Cloud Storage) bucket.



The below example will export a CSV file output to the bucket location in the "uri" below.


declare unused STRING;

export data options(

uri='gs://dbi-analytics-warehouse-data-bq/a1delete/Test*.csv',

format='CSV',

header=true,

overwrite=true,

field_delimiter=';') as

select * from `dbi-gcs-storage.my_access_eu.dim_brand`;


You can then schedule this query in BQ after running it to export results to GCS when ever you like . Daily - Weekly - Monthly etc 



Note: only a member of this blog may post a comment.



About Authors

Shahed Munir

Krishna Udathu

Shahed and Krishna are Oracle / Big Data Experts