Request a demo

BigQuery error · Not found and location

Already Exists: Table

The job tried to create a table that already exists: a plain CREATE TABLE, an API insert, or a write with WRITE_EMPTY into a table that has data. Decide what should happen to the existing table: keep it (IF NOT EXISTS), replace it (CREATE OR REPLACE, WRITE_TRUNCATE) or add to it (INSERT, WRITE_APPEND).

Error reason duplicate · HTTP 409 · Checked against the Google Cloud docs in November 2026

The error message

Already Exists: Table <project>:<dataset>.<table>

Causes

CREATE TABLE without IF NOT EXISTS or OR REPLACE

A pipeline step that creates a table works the first time and fails on every rerun. This is the most common way a job stops being idempotent.

Write disposition WRITE_EMPTY

A query or load job with a destination table and writeDisposition = WRITE_EMPTY only writes into a table that is empty or new. If the table already has data, the job fails with this error.

Two jobs racing to create the same table

Parallel tasks of an orchestrator, or a retry that starts while the first attempt is still running, both try to create the table; the second one fails. The same reason duplicate also appears as Already Exists: Dataset or Already Exists: Job when a dataset or a fixed job ID is reused.

How to fix it

1. Create only if missing

Use IF NOT EXISTS when the table should be created once and kept.

CREATE TABLE IF NOT EXISTS `project.analytics.daily_revenue` (
  order_date DATE,
  customer_id STRING,
  revenue NUMERIC
)
PARTITION BY order_date;

2. Replace the table when it is rebuilt each run

CREATE OR REPLACE swaps the table in one statement, so readers never see it missing. Keep in mind that a full rebuild rescans the source every run.

CREATE OR REPLACE TABLE `project.analytics.active_customers` AS
SELECT customer_id, MAX(order_date) AS last_order_date
FROM `project.sales.orders`
WHERE order_date >= DATE_SUB(CURRENT_DATE(), INTERVAL 90 DAY)
GROUP BY customer_id;

3. Append new data instead of recreating

For incremental pipelines, insert only the new rows into the existing table, or set the job's write disposition to WRITE_APPEND.

INSERT INTO `project.analytics.daily_revenue` (order_date, customer_id, revenue)
SELECT order_date, customer_id, SUM(amount)
FROM `project.sales.orders`
WHERE order_date = DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)
GROUP BY order_date, customer_id;

4. Change the write disposition of API and bq jobs

Use WRITE_TRUNCATE to overwrite or WRITE_APPEND to add rows (--replace or --append_table in bq query and bq load). Let BigQuery generate job IDs, or create a new ID for each retry.

How to prevent it

  • Make every pipeline step idempotent: rerunning it should give the same table, not an error or duplicate rows.
  • Prefer incremental INSERT or MERGE on partitioned tables over daily full rebuilds: rebuilding with CREATE OR REPLACE rescans the whole source each run, which shows up in cost by table.
  • Serialize tasks that create the same table, or create shared tables in a separate setup step.

FAQ

Is a failed CREATE TABLE billed?

A plain CREATE TABLE that fails because the table exists does no query work, so nothing is billed. On-demand, a query job that returns an error isn't charged either.

Does CREATE OR REPLACE TABLE keep the old data in time travel?

Yes. The replaced table's previous data stays available through time travel for the dataset's time travel window, and it is billed as time travel storage under the physical storage billing model.

How do I make a BigQuery pipeline step safe to rerun?

Create tables with CREATE TABLE IF NOT EXISTS in a setup step, and load data with MERGE or by overwriting only the partitions being processed. A rerun then gives the same table instead of an error or duplicate rows.

SQL reference

All BigQuery error messages · What 50M daily events say about BigQuery failures

Stop finding BigQuery failures in Slack threads

Masthead watches every BigQuery job, dbt model, Dataform action and Airflow task from audit logs, groups failures into incidents and shows which tables and dashboards are affected. No access to your data and no added BigQuery cost.