-
Notifications
You must be signed in to change notification settings - Fork 165
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
UPDATE
operation is missing a useful AdapterResponse
#68
Comments
@rjh336 Thanks for opening the issue! The reason these values are missing for dbt-bigquery/dbt/adapters/bigquery/connections.py Lines 393 to 432 in 95ca84b
We totally could! From a little poking around, I think:
elif query_job.statement_type == 'SELECT':
code = 'SELECT'
bytes_processed = query_job.total_bytes_processed
# these are internal properties, so we should be cautious
# maybe more trouble than it's worth?
if (
hasattr(query_job, '_query_results')
and hasattr(query_job._query_results, '_properties')
and hasattr(query_job._query_results._properties, 'get')
):
num_rows = query_job._query_results._properties.get('totalRows') I'm going to mark this a |
Describe the bug
When calling load_result() from a statement block connecting to a bigquery db, if the query is an UPDATE operation, we do not get an AdapterResponse on par with other DML operations.
Seems like it should be included here:
dbt-bigquery/dbt/adapters/bigquery/connections.py
Line 417 in 95ca84b
Moreover, what is the reason that
SELECT
statements do not also get a filled out AdapterResponse?Steps To Reproduce
From the command line:
dbt run-operation test_response_object
Result:
Expected behavior
BigQueryAdapterResponse field should be populated with values reported by the BigQuery API. Here is an example of what you get when you run a DELETE:
Screenshots and log output
If applicable, add screenshots or log output to help explain your problem.
System information
The output of
dbt --version
:The operating system you're using:
macOS v 11.6 (20G165)
The output of
python --version
:Python 3.8.11
The text was updated successfully, but these errors were encountered: