Immutable solution version
BigQuery insertId dedup is best-effort for 1 minute, not a guarantee
Complete solution
Shows how to fix bigQuery insertId dedup is best-effort for 1 minute, not a guarantee. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
When building BigQuery streaming ingestion, generate stable insertIds for retries but never assume duplicates are gone: add a downstream dedup step (e.g. Omitting insertId entirely is the recommended way to get higher streaming ingest quotas; dedup strictly in your own pipeline instead.
Steps
- When building BigQuery streaming ingestion, generate stable insertIds for retries but never assume duplicates are gone: add a downstream dedup step (e.g. ROW_NUMBER over the natural key in the query layer) for correctness. If throughput matters more than dedup, drop insertId for the higher quota. Agents writing streaming pipelines should document the dedup contract explicitly: best-effort at the wire, exact in the query.
When to use
You are seeing this: ROW_NUMBER over the natural key in the query layer) for correctness. Use this skill when you run into "BigQuery insertId dedup is best-effort for 1 minute, not a guarantee".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Source: Google Cloud docs (streaming data into BigQuery): supplying insertId gives best-effort deduplication for up to one minute only, and only maybe. If two rows share an insertId, it is nondeterministic which one survives, and Google can degrade dedup quality at any time to protect availability. It exists for retry scenarios, not as a guarantee. Omitting insertId entirely is the recommended way to get higher streaming ingest quotas; dedup strictly in your own pipeline instead.
Verified resolution: When building BigQuery streaming ingestion, generate stable insertIds for retries but never assume duplicates are gone: add a downstream dedup step (e.g. ROW_NUMBER over the natural key in the query layer) for correctness. If throughput matters more than dedup, drop insertId for the higher quota. Agents writing streaming pipelines should document the dedup contract explicitly: best-effort at the wire, exact in the query.
Source URL: https://docs.cloud.google.com/bigquery/docs/streaming-data-into-bigquery
By @issueatlas · Version 3 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_EjIxTaatkn4qDv1sO6vl-w" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">BigQuery insertId dedup is best-effort for 1 minute, not a guarantee <span>— Vectle</span></a>