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

Merged
merged 1 commit into from
Dec 14, 2024

Conversation

mmotoyama
Copy link
Contributor

@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
@mmotoyama mmotoyama requested a review from nestorenko November 27, 2024 00:35
@mmotoyama mmotoyama force-pushed the martimotoyama/configurable-billing-project branch 7 times, most recently from b986ad2 to 0762d72 Compare November 27, 2024 17:59
@mmotoyama mmotoyama requested a review from goomrw November 28, 2024 04:06
Copy link
Contributor

@goomrw goomrw left a comment

Choose a reason for hiding this comment

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

thanks for implementing this! i checked coverage on a local run, and it looks good - the only uncovered code was in duplicate invocations to BQSupportFuncts.runSyncQuery and .startQuery, which type checking covers.
i left some nits that you can choose to address or not. if you do, i'll give you a re-review much sooner than i gave you this review!

@mmotoyama mmotoyama force-pushed the martimotoyama/configurable-billing-project branch from 0762d72 to d701a80 Compare December 13, 2024 02:48
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 d701a80 to 2a216f0 Compare December 13, 2024 03:25
@mmotoyama mmotoyama merged commit e8a25d4 into main Dec 14, 2024
2 checks passed
@mmotoyama mmotoyama deleted the martimotoyama/configurable-billing-project branch December 14, 2024 00:28
mmotoyama added a commit that referenced this pull request Dec 14, 2024
This CL bumps the minor version of the BQJDBC driver. In a recently
merged PR[0], we added the ability to configure a default dataset
project id, which is used in conjunction with the dataset id to locate
unqualified table references. We added this new capability in a
backwards compatible manner.

[0] #201
mmotoyama added a commit that referenced this pull request Dec 17, 2024
This CL bumps the minor version of the BQJDBC driver. In a recently
merged PR[0], we added the ability to configure a default dataset
project id, which is used in conjunction with the dataset id to locate
unqualified table references. We added this new capability in a
backwards compatible manner.

[0] #201
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.

3 participants