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

Support populating DestinationTable in the response when using CREATE OR REPLACE table.name.foo AS (...) syntax #197

Open
andrewegel opened this issue May 24, 2023 · 1 comment

Comments

@andrewegel
Copy link

andrewegel commented May 24, 2023

We're looking at using the bigquery emulator as a testing backend with the dbt-bigquery project - While investigating issue dbt-labs/dbt-bigquery#358 (comment) I found that this project doesn't populate the DestinationTable fields in the response to the client if the query uses the CREATE OR REPLACE table.name.foo AS (...) syntax. The emulator handles the case when DestinationTable is part of the Job Submit API call and a normal select * from source.table.foo (ie: bq --api ... query --destination_table 'table.name.foo' 'select * from source.table.foo), but dbt-bigquery likes to use the CREATE OR REPLACE table.name.foo AS (...) syntax because you can have more controls over how the results are materialized https://docs.getdbt.com/docs/build/materializations

I cannot speak to the feasibility of such a change, I'm just logging it as a behavior difference between BQ the service and the emulator.

@yaronneuman
Copy link

this is a duplicate of #180
there is also a merge request linked to this issue. I tried it myself and it works like a charm.

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

No branches or pull requests

2 participants