According to Google BigQuery Doc it states.
To help ensure data consistency, you can supply insertId for each inserted row. BigQuery remembers this ID for at least one minute. If you try to stream the same set of rows within that time period and the insertId property is set, BigQuery uses the insertId property to de-duplicate your data on a best effort basis.
Trying to implement the same using Ruby client.I can't seemed to find a way to set the insertID in the stream request(reference attached here).
You can find the insert_id in:
Class: Google::Apis::BigqueryV2::InsertAllTableDataRequest::Row
If you look at the Row
definition it's there in the source:
You can find more documention also on RubyInfo