简体   繁体   中英

BigQuery Storage API: Atomicity of an append/write operation

As the title states, are BigQuery Storage Write Requests atomic? I know that the legacy streaming API may return a partial error, indicating that some rows were successfully written. However, I understand we may achieve exactly-once processing at stream level through the use of offsets. But it seems that these offsets are for each write request and not at row level. Thus I am wondering, does a write operation using the new Storage API, fully complete or fully fail?

Offsets are row based, not request based. If an append request contains three rows for example, the offset would advance by three when processed successfully.

A success for an append in the write API means all the rows in the request were committed. If the stream type supports it (eg not a default stream) then the append response will confirm the offset.

This differs from the legacy streaming API ( tabledata.insertAll ), which allows for partial failures. In this surface, a three row request could have a single successful row and 2 failures, or some other combination of successes/failures.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM