Getting the Current Version
Most API endpoints that work with Big Tables return the current version of the table in theETag
response header.
If you only want to get the current version of a table without performing any other operation, use the Get Rows Version endpoint. You can poll this endpoint to detect changes to the table.
Preventing Data Loss
When updating data in a Big Table, you can specify the version of the table you expect to be working with using theIf-Match
header. How this value is interpreted depends on the endpoint:
- The Overwrite Table endpoint rejects the request if the current table version is newer than the version specified in the
If-Match
header. - The Update Row endpoint rejects the request if the row has been modified since the version specified in the
If-Match
header. The update is still allowed if another row in the table was modified since the specified version.
412 Precondition Failed
response is returned if the condition is not met.