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

Simplify usage of BigQuery's TableReference and DatasetReference Classes #98

Merged
merged 8 commits into from
Jan 26, 2022

Conversation

drewmcdonald
Copy link
Contributor

resolves #97

Description

Addresses a deprecation warning (see #97) and moves closer to BQ API best practices by preferring unconnected *Reference objects until connected client operations are needed.

  • Simplifies BigQueryConnectionManager.dataset to directly create a bigquery.DatasetReference, and renames that method to dataset_ref for clarity.
  • Simplifies BigQueryConnectionManager.table_ref to directly create a bigquery.TableReference

Checklist

  • I have signed the CLA
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • I have updated the CHANGELOG.md and added information about my change to the "dbt-bigquery next" section.

@McKnight-42
Copy link
Contributor

@drewmcdonald seems some recent mergers are not working well with your current pr, if you could update main, hopefully that will clear them up if not I will do my best to help find the issues and get them fixed.

@drewmcdonald
Copy link
Contributor Author

@McKnight-42 looks like things are all good after updating!

Copy link
Contributor

@McKnight-42 McKnight-42 left a comment

Choose a reason for hiding this comment

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

Great Work @drewmcdonald thanks so much for this contribution.

@drewmcdonald
Copy link
Contributor Author

Thanks! Happy to jump in.

@McKnight-42 McKnight-42 merged commit 0d76e04 into dbt-labs:main Jan 26, 2022
McKnight-42 added a commit that referenced this pull request Jan 26, 2022
…ses (#98)

* drop conn method argument in _query_and_results.

* update Table Ref and Dataset Ref usage.

* update changelog.

Co-authored-by: Matthew McKnight <[email protected]>
siephen pushed a commit to AgencyPMG/dbt-bigquery that referenced this pull request May 16, 2022
…ses (dbt-labs#98)

* drop conn method argument in _query_and_results.

* update Table Ref and Dataset Ref usage.

* update changelog.

Co-authored-by: Matthew McKnight <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BigQuery API Deprecation Warning
2 participants