Closed ashish10alex closed 6 months ago
Hey, Thanks for both contributions. I'll just comment here for both of them:
The other pr (#71) looks good and I agree it's very helpful.
As for this one, the fix is not "right", but you showed me exactly where the issue is. I'm just in the process of adding tests for all adapters, so I'll fix this there. Meanwhile users of bigquery (#67) can use your branch.
One more thing, do you happen to know if there is an easy way to run bigquery in docker or to mock it locally?
Thanks :)
Hi @kndndrj , Thanks for merging the other https://github.com/kndndrj/nvim-dbee/pull/71 . Looking forward to the correct solution on this one.
Regarding the BigQuery emulator: I found this GitHub page and could make it work.
Steps I followed ->
Download emulator cli from their releases
Download this yaml that will create/emulate project / dataset / table for you.
Run the BigQuery emulator
./bigquery-emulator --project=test --data-from-yaml=data.yaml
Then I hack the bigquery Client instantiation as shown to make it work as I could not figure out how to pass the options for these in the plugin config directly. Please let me know if/how that is possible.
bqc, err := bigquery.NewClient(
ctx,
u.Host,
option.WithEndpoint("http://0.0.0.0:9050"),
option.WithoutAuthentication(),
)
Moved the temporary fix to this separate branch in the forked repository as I messed by my original fork by making changes in the main branch !
This pull request:
BigQuery iterator when has no items left, throws
iterator.Done
which when handled appropriately solves this issue. Please see screenshot attached.Please let me know if this is not the right way to fix this as I had not written any Go before, but it works :)
Testing