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

Allow specificiation of project in BigQuery Hook methods #1139

Merged
merged 1 commit into from
Mar 9, 2016

Conversation

mtagle
Copy link
Contributor

@mtagle mtagle commented Mar 8, 2016

allow bq base cursor methods run_extract, run_copy, run_load to all take in source or destination table strings that include projects.

For backwards compatibility reasons, the project is not required, and will default to the old behavior if not included.

This allows for a decoupling of these methods from the bq project that they are run on.

@criccomini criccomini closed this Mar 9, 2016
@criccomini criccomini reopened this Mar 9, 2016
:return: (project, dataset, table) tuple
"""
table_split = project_dataset_table.split('.')
assert len(table_split) == 2 | len(table_split) == 3, \
Copy link
Contributor

Choose a reason for hiding this comment

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

Should this be 'or' instead of '|'?

@criccomini
Copy link
Contributor

Looks good. Let me know when you've done local validation, and I'll merge.

@criccomini
Copy link
Contributor

Also, please squash commits once you've verified.

take in source or destination table strings that include projects.

For backwards compatibility reasons, the project is not required.

This allows for decoupling of the execution of these methods from
projects that have the information they access.
criccomini added a commit that referenced this pull request Mar 9, 2016
Allow specificiation of project in BigQuery Hook methods
@criccomini criccomini merged commit 7f8bfdd into apache:master Mar 9, 2016
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