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

Adding configurable BigQuery ProjectID on contrib jobs #3019

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

Conversation

MaximilianoFelice
Copy link

Description

Adding a way to configure BigQuery Project ID on both BigQueryLoadTask and BigQueryRunQueryTask.

They are both added as properties of the class, keeping the same default as in previous versions.

Motivation and Context

BigQuery jobs can be run on different Project IDs than the ones configured by the output Dataset. This is especially useful for shared BigQuery Datasets, or when you usually need to defer the slot allocation between projects.

Have you tested this? If so, how?

I ran a local test using this feature.

Copy link
Member

@honnix honnix 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 the PR. Could you please add test cases if possible?

@@ -527,6 +527,12 @@ def allow_quoted_new_lines(self):
""" Indicates if BigQuery should allow quoted data sections that contain newline characters in a CSV file. The default value is false."""
return False

@property
def project_id(self):
"""Project ID on which to run the BigQuery Job
Copy link
Member

Choose a reason for hiding this comment

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

Could you please add short description for the default value as well?

@@ -610,6 +616,12 @@ def use_legacy_sql(self):
"""
return True

@property
def project_id(self):
"""Project ID on which to run the BigQuery Job
Copy link
Member

Choose a reason for hiding this comment

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

Same here.

@stale
Copy link

stale bot commented Jan 9, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If closed, you may revisit when your time allows and reopen! Thank you for your contributions.

@stale stale bot added the wontfix label Jan 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants