bigquery-emulator icon indicating copy to clipboard operation
bigquery-emulator copied to clipboard

#180 fix for destinationTable not returned

Open prabhav007 opened this issue 1 year ago • 10 comments

closes #180

prabhav007 avatar May 11 '23 12:05 prabhav007

I have the same problem. How about I take over if there is no progress?

pyama86 avatar Aug 25 '23 01:08 pyama86

I applied these changes to my branch, and it resolved the error. These changes would be necessary for using ruby-client for the bigquery-emulator.

kromiii avatar Aug 25 '23 09:08 kromiii

I applied these changes to my branch, and it resolved the error. These changes would be necessary for using ruby-client for the bigquery-emulator.

Yes your changes and your image solved a similar problem when I issue a query with a specific JobId. I hope we can have this fix merged in to goccy project and image.

anderseriksson avatar Sep 15 '23 09:09 anderseriksson

@yaronneuman it seems your question has been answered 3 weeks ago by someone else. Also others mention the code works well... is there anything that's still keeping you from getting this merged? Getting this fixed can also help to resolve an issue being the discussed in the DBT community:

https://github.com/dbt-labs/dbt-bigquery/issues/358

@goccy can you help perhaps?

benvdh-incentro avatar Sep 21 '23 09:09 benvdh-incentro

@benvdh-incentro Thank you, I've commented https://github.com/goccy/bigquery-emulator/pull/187/files#r1332797665

goccy avatar Sep 21 '23 09:09 goccy

@goccy I see @prabhav007 and @kromiii have delivered some test code and further rationale behind the current PR, anything else that is still needed to get this merged?

benvdh-incentro avatar Oct 24 '23 09:10 benvdh-incentro

The reason I cannot merge this PR is that there is no test code in this repository that corresponds to the modification. If there is no test code, I need to determine the validity of the modification from the diffs, which is currently difficult.

goccy avatar Oct 24 '23 10:10 goccy

I can confirm this breaks Ruby client. :thinking: Any idea how to move this forward? Even with this patch only query like SELECT * FROM finance_v2_local.statements_2 works, but query like SELECT * FROM finance_v2_local.statements_2 WHERE Artist = 'ABC' fails since missing destination dataset table. It seems to be related to fact if query returns any value. For queries with 0 returned rows it fails per https://github.com/goccy/bigquery-emulator/blob/316038b8dd3f6534a87948f28ac54c41dc6afc21/server/handler.go#L1427.

I have checked BQ response and it returns destination table even for empty result.

simi avatar May 16 '24 14:05 simi

@kromiii I can try to help with writing test, but seems destination table is not tested currently at all.

simi avatar May 18 '24 08:05 simi