Does BigQuery implement a swap for CREATE OR REPLACE?

Viewed 114

I am using Google BigQuery as part of a metric store and trying to figure out how it orchestrates replacing tables. Specifically, is submitting a job like

CREATE OR REPLACE TABLE {table_path}
AS
{query}

implemented as a swap between a temp table and the original?

I looked at the query plan, but unfortunately it only shows intermediate results. Here's an example of plan output I see, with irrelevant parts omitted,

READ
{...}
COMPUTE
{...}
WRITE
[{...}, 'TO __stage00_output']
READ
['FROM __stage00_output']
READ
[{...}, 'FROM __stage01_output']
WRITE
[{...}, 'TO __stage02_output']

Can I assume that __stage02_output is being swapped in for {table_path} at the end, or is something else going on?

0 Answers
Related