BigQuery
BigQuery copied to clipboard
Support insertId and other optional params in Tabledata.insertAll
In my use case, I use BigQuery::Client::Tables.insert with large arrays frequently.
Sometimes they succeed partially, i.e. half rows of a batch are added, the other half fail.
Instead of checking the results and only resending the failed rows (so the good rows are not sent twice), I want to add insertId to each row, then let Google do the de-duplication for us.
This is the main purpose of this PR.
It's quite hard to add insertId support to the existing insert() method without changing its interface, so I create a new insert_all().