BUG: NotFoundException from to_gbq when replacing table in project different from project_id parameter #377
Labels
api: bigquery
Issues related to the googleapis/python-bigquery-pandas API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Environment details
Steps to reproduce
Code Sample, a copy-pastable example
Problem description
I am working on a project where researchers can write to a dataset in one GCP project, but must run query jobs in another. In the above code example,
willyn_data_project
is the name of the project that contains the dataset, andwillyn_job_project
is the name of the project where query jobs are executed.When attempting to use
if_exists='replace'
, we get the errorpandas_gbq.gbq.NotFoundException: Table does not exist
. I believe what is happening is we are attempting to delete a table fromwillyn_job_project
, when we should be deleting a table inwillyn_data_project
.My best guess would be this line in
delete_and_recreate_table
needs to be updated to use the correct project.Expected Output
No error.
The text was updated successfully, but these errors were encountered: