5
votes

If configuration.load.writeDisposition is set to WRITE_TRUNCATE during a load job, is there a period of time when querying the table would raise an error?

  • The whole period when the job is marked as PENDING and/or RUNNING?
  • A small moment when the table is replaced at the end of the load job?

What would be the error? status.errors[].reason => "notFound"?

1

1 Answers

6
votes

The WRITE_TRUNCATE is atomic and gets applied at the end of the load job. So any queries that happen during that time will see either only the old data or all of the new data. There should be no cases where you'd get an error querying the table.

If the load failed, then there should be no change to the table, and if it succeeded, all of the data should appear at once in the table.

If the table didn't already exist, and a load job specified CREATE_IF_NEEDED, then querying the table would give not found until the load job completed.

We're working on a doc rewrite that will make this more clear.