-
Notifications
You must be signed in to change notification settings - Fork 1.7k
WRITE_TRUNCATE appending to table #2326
Copy link
Copy link
Closed
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Using the templates found here
Running the commands
This piece of code appends to my table instead of overwriting it like the docs say.
I know this because if I use:
after the job it has increased by 2 million - the size of the table.
I use a workaround as follows:
Which seems to work fine, and the while loop is just me making certain that the table is deleted but when I tested it without the while loop it also worked.
Anyway, the issue is WRITE_TRUNCATE isn't doing what it say it does in the docs.