What happened:
I run a job with a query and a destination table and the table is not generated from the file.
bq_client.create_job({
'query': {
'query': rendered_query,
'destinationTable': {
'projectId': GCP_PROJECT,
'datasetId': DATASET_ID,
'tableId': TRANSFORMED_TABLE_ID
},
'writeDisposition': 'WRITE_TRUNCATE'
})
My code executes successfully and produces the following job in the console

How to fix it
There is a line where the destinationTable is removed from the job config. Removing the line that deletes the property in the job configuration will do.
|
_del_sub_prop(copy_config, ["query", "destinationTable"]) |
Can anyone explain why is the destinationTable property removed?
In the meanwhile I'm opening a PR