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

enrich adapter response for UPDATE and SELECT queries #79

Merged
merged 5 commits into from
Jan 7, 2022

Conversation

rjh336
Copy link
Contributor

@rjh336 rjh336 commented Dec 1, 2021

resolves #68

Description

Add logic in BigQueryConnectionManager.execute to enrich the response with more info for UPDATE and SELECT statements.

UPDATE responses will match that of other DML operations, while SELECT will return the following:

  • bytes_processed = total reported bytes processed from running the SELECT statement
  • rows_affected = number of rows in the query result

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.

@cla-bot cla-bot bot added the cla:yes label Dec 1, 2021
@rjh336 rjh336 changed the title enirch adapter response for UPDATE and SELECT queries enrich adapter response for UPDATE and SELECT queries Dec 1, 2021
@McKnight-42
Copy link
Contributor

HI, reviewed and passed it onto testing till @jtcohen6 has a chance to take a look, but noticed that your code is a little out of date and would love if it if you could update your branch with latest from main and make sure tests still pass.

@McKnight-42
Copy link
Contributor

McKnight-42 commented Dec 21, 2021

Hi just wanting to pass along that you may need to merge main again per #93 bigquery like postgres adapter have a test that was failing due to addition of a stricter type checking. should clear up the two python tests.

@rjh336
Copy link
Contributor Author

rjh336 commented Dec 23, 2021

Thanks @McKnight-42 - all up to date now :)

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.

worked locally for me, thank you for taking time to work on this enhancement.

@McKnight-42 McKnight-42 merged commit cb96c34 into dbt-labs:main Jan 7, 2022
siephen pushed a commit to AgencyPMG/dbt-bigquery that referenced this pull request May 16, 2022
* enirch adapter response for UPDATE and SELECT queries

* code style change

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.

UPDATE operation is missing a useful AdapterResponse
2 participants