hafenkran / duckdb-bigquery

Integrates DuckDB with Google BigQuery, allowing direct querying and management of BigQuery datasets
MIT License
58 stars 3 forks source link

Add support of execution project selection on ATTACH #9

Closed Kayrnt closed 1 month ago

Kayrnt commented 3 months ago

Right now, attaching a GCP project would result in using the project resources (and rights) to execute related queries. Adding a way to attach the GCP project along an "execution project".

It can be provided this way:

ATTACH 'project=my_gcp_bq_storage_project' AS bq (TYPE bigquery, EXECUTION_PROJECT 'my_gcp_bq_execution_project');
hafenkran commented 3 months ago

Yep, that's a good point and indeed something that’s still pending. Particularly for reading public datasets, I believe this feature is quite important. However, instead of specifying it in the attach_options, I prefer to see this in the DSN for consistency reasons, e.g.,

ATTACH 'my_bq_project.my_dataset exec_project=my_exec_project' TYPE (bigquery);

Kayrnt commented 3 months ago

Sure I don't mind both 👍