If the payload to the AppendRows call is greater than 10 MB, BigQuery will reject the call. Detect this and retry with the payload half the original size. Continue this logarithmic halving until the requests succeed. Also collect the retry data as metrics to tune the buffer sizes and retries.
If the payload to the AppendRows call is greater than 10 MB, BigQuery will reject the call. Detect this and retry with the payload half the original size. Continue this logarithmic halving until the requests succeed. Also collect the retry data as metrics to tune the buffer sizes and retries.