Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to set dataset project id #201

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mmotoyama
Copy link

@mmotoyama mmotoyama commented Nov 22, 2024

This CL adds the ability to specify a dataset project id as part of the dataset field in the connection string used to create a
BQConnection instance. Previously, we used the project defined in the URL's path component for both the billing and default dataset projects. Recall that the default project and dataset are used to disambiguate unqualified table names referenced in a query being processed by a connection.

Now, we parse the potentially fully qualified dataset to check for a project id. If no project id is found, we revert back to our former behavior, using the billing project as the default dataset project.

@mmotoyama mmotoyama force-pushed the martimotoyama/configurable-billing-project branch 3 times, most recently from 5cd95c6 to 39766b6 Compare November 27, 2024 00:07
@mmotoyama mmotoyama changed the title Add separate billing project parameter Add ability to set dataset project id Nov 27, 2024
@mmotoyama mmotoyama force-pushed the martimotoyama/configurable-billing-project branch 2 times, most recently from a39d3af to 04786cd Compare November 27, 2024 00:30
@mmotoyama mmotoyama marked this pull request as ready for review November 27, 2024 00:35
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that the modifications in this file are unrelated to the changes made to support dataset project id. The updates I made to this file were necessary for the test suite to pass.

@mmotoyama mmotoyama force-pushed the martimotoyama/configurable-billing-project branch 6 times, most recently from 5b09117 to b986ad2 Compare November 27, 2024 16:03
This CL adds the ability to specify a dataset project id as part of
the dataset field in the connection string used to create a
BQConnection instance. Previously, we used the project defined in the
URL's path component for both the billing and default dataset
projects. Recall that the default project and dataset are used to
disambiguate unqualified table names referenced in a query being
processed by a connection.

Now, we parse the potentially fully qualified dataset to check for a
project id. If no project id is found, we revert back to our former
behavior, using the billing project as the default dataset project.
@mmotoyama mmotoyama force-pushed the martimotoyama/configurable-billing-project branch from b986ad2 to 0762d72 Compare November 27, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants