<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/bigquery-identity-columns-to-auto-generate-sequential-integers-otvf8lkhg" -->

---
title: BigQuery identity columns to auto-generate sequential...
description: BigQuery now supports identity columns that automatically generate sequential 64-bit integer values, removing the need to pre-calculate unique keys in...
canonical: https://daily.dev/posts/bigquery-identity-columns-to-auto-generate-sequential-integers-otvf8lkhg
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: BigQuery identity columns to auto-generate sequential integers | daily.dev
og:description: BigQuery now supports identity columns that automatically generate sequential 64-bit integer values, removing the need to pre-calculate unique keys in...
og:url: https://daily.dev/posts/bigquery-identity-columns-to-auto-generate-sequential-integers-otvf8lkhg
og:image: https://api.daily.dev/og/posts/oTvf8Lkhg.png
og:image:alt: BigQuery identity columns to auto-generate sequential integers
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# BigQuery identity columns to auto-generate sequential integers

**[Google Cloud](https://daily.dev/sources/gcp)** · 2 min read · 0 upvotes · 0 comments

## Summary

BigQuery now supports identity columns that automatically generate sequential 64-bit integer values, removing the need to pre-calculate unique keys in application logic or ETL tools. Defined inside a CREATE TABLE statement using GENERATED ALWAYS AS IDENTITY with configurable START WITH and INCREMENT BY values, the feature works with INSERT and MERGE statements and aims to simplify data ingestion pipelines and reduce boilerplate SQL for surrogate key management.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://cloud.google.com/blog/products/data-analytics/bigquery-identity-columns-to-auto-generate-sequential-integers>

## Questions this post answers

### How do I auto-generate sequential integer IDs in BigQuery without calculating them in my ETL pipeline?

Use BigQuery's identity columns feature, defined with GENERATED ALWAYS AS IDENTITY (START WITH n INCREMENT BY n) inside a CREATE TABLE statement. BigQuery then automatically assigns a unique 64-bit integer to each new row on INSERT or MERGE, removing the need to pre-calculate unique keys in application logic or ETL tools.

_Track new BigQuery capabilities like identity columns as they roll out by following database updates on daily.dev._

### Can BigQuery identity columns be used with MERGE statements, not just INSERT?

Yes, identity columns work with both INSERT and MERGE statements, automatically generating a unique identifier for every new row regardless of which DML operation adds it. This lets existing ingestion workflows adopt auto-generated surrogate keys without restructuring how data is loaded.

_Developers weighing surrogate key strategies can compare BigQuery approaches like this on daily.dev._

## Similar posts on daily.dev

- [Amazon Aurora DSQL adds support for identity columns and sequence objects](https://daily.dev/posts/amazon-aurora-dsql-adds-support-for-identity-columns-and-sequence-objects-0juegzsgv) · AWS · 0 upvotes · 0 comments
- [Introducing BigQuery autonomous embedding generation](https://daily.dev/posts/introducing-bigquery-autonomous-embedding-generation-bhfmz3oac) · Google Cloud · 0 upvotes · 0 comments

---

Tags: [#backend](https://daily.dev/tags/backend), [#sql](https://daily.dev/tags/sql), [#gcp](https://daily.dev/tags/gcp), [#data-engineering](https://daily.dev/tags/data-engineering), [#google-bigquery](https://daily.dev/tags/google-bigquery)

[View this post on daily.dev](https://daily.dev/posts/bigquery-identity-columns-to-auto-generate-sequential-integers-otvf8lkhg)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"BigQuery identity columns to auto-generate sequential integers","url":"https://daily.dev/posts/bigquery-identity-columns-to-auto-generate-sequential-integers-otvf8lkhg","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/bigquery-identity-columns-to-auto-generate-sequential-integers-otvf8lkhg"},"datePublished":"2026-09-02T16:10:19.864Z","dateModified":"2026-09-02T16:37:51.613Z","description":"BigQuery now supports identity columns that automatically generate sequential 64-bit integer values, removing the need to pre-calculate unique keys in...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9df795f90d3290a29c3b5ccad1c3e312?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/9df795f90d3290a29c3b5ccad1c3e312?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"Google Cloud","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Google Cloud","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/gcp","url":"https://daily.dev/sources/gcp"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/bigquery-identity-columns-to-auto-generate-sequential-integers-otvf8lkhg","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"backend,sql,gcp,data-engineering,google-bigquery","timeRequired":"PT2M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Google Cloud","item":"https://daily.dev/sources/gcp"},{"@type":"ListItem","position":3,"name":"BigQuery identity columns to auto-generate sequential integers"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/bigquery-identity-columns-to-auto-generate-sequential-integers-otvf8lkhg#faq","mainEntity":[{"@type":"Question","name":"How do I auto-generate sequential integer IDs in BigQuery without calculating them in my ETL pipeline?","acceptedAnswer":{"@type":"Answer","text":"Use BigQuery's identity columns feature, defined with GENERATED ALWAYS AS IDENTITY (START WITH n INCREMENT BY n) inside a CREATE TABLE statement. BigQuery then automatically assigns a unique 64-bit integer to each new row on INSERT or MERGE, removing the need to pre-calculate unique keys in application logic or ETL tools. Track new BigQuery capabilities like identity columns as they roll out by following database updates on daily.dev."}},{"@type":"Question","name":"Can BigQuery identity columns be used with MERGE statements, not just INSERT?","acceptedAnswer":{"@type":"Answer","text":"Yes, identity columns work with both INSERT and MERGE statements, automatically generating a unique identifier for every new row regardless of which DML operation adds it. This lets existing ingestion workflows adopt auto-generated surrogate keys without restructuring how data is loaded. Developers weighing surrogate key strategies can compare BigQuery approaches like this on daily.dev."}}]}
```

