1
votes

Is there any way to populate sequence numbers along with the records in BigQuery? Say for example if I'm inserting 1000 records in BigQuery table, then there must a field (seq. no.) which will contain the record number for each insertion. Next time when another insertion happens then sequence number should start from 1001. Please let me know if there is any such built-in facility or any workaround in Bigquery.

1

1 Answers

1
votes

BigQuery is a complementary database to a transactional database, it's not a replacement.

It doesn't have the auto increment functionality. It's primary use case is append-only data ingestions, which makes it out of scope to have auto increment IDs. An update to an entity is a new row in the BQ database, and by design you end up with duplicates as you have multiple rows coming from the same entity.