Open bony2023 opened 2 months ago
Hi @bony2023,
Thanks for your changes. Even though the unit tests are passing, still its not generating expected query including project id and dataset with emulator. Its sending query without project id and dataset in emulator and raising same error:
no such table:
I believe it's because the emulator always pass the datasetID as empty when executing a Query.
I'll see if I can fix it here directly.
Thanks @bony2023 for all the help.
Thanks @bony2023 for your last message. You are right and I confirm, by hard coding namePath[1] to my dataset name in your changes in this PR, everything works as expected in local emulator 🎉🎉. I am not sure if fixing this right way is possible in this lib, but thanks for being the savior here. I am new to BQ as well as Go, and was trying to figure this out for last two days, and you saved me here.
I just pushed a commit to extract datasetID if it's not provided in namePath from the emulator.
@bony2023 Sorry for delay in responding. Your latest commit works very well. Thank you so much. 🎉🎉🎉🎉🎉
Closes: https://github.com/goccy/bigquery-emulator/issues/299
The sub-actions (INSERT, UPDATE and DELETE) inside the merge statement currently do not work when using BigQuery Emulator, as they are not able to recognize the exact table they need to work upon.
This PR fixes the logic by adding namePath to the source and target table names joined by underscore to work on sqlite tables.