google bigquery - On streaming inserts we got timeout but only for certain rows -
google bigquery - On streaming inserts we got timeout but only for certain rows -
we have streaming insert 72 lines, error message empty, , reason
timeout
, first 3 lines.
error on line 0, reason: timeout, msg: error on line 1, reason: timeout, msg: error on line 2, reason: timeout, msg:
how possible, , shall replay these 3 lines or rest of rows too?
we have case 05044644 on paid google enterprise support.
code segment is:
$resp = new google_service_bigquery_tabledatainsertallresponse(); $resp = $bq->tabledata->insertall($project_id, $dataset_id, static::tableid(), $request); $errors = new google_service_bigquery_tabledatainsertallresponseinserterrors(); $errors = @$resp->getinserterrors(); if (!empty($errors)) { $error_msg = ''; if (is_array($errors)) { $line = 0; foreach ($errors $ep) { $arr = $ep->geterrors(); if (is_array($arr)) { foreach ($arr $e) { switch ($e->getreason()) { case "stopped": break; default: $error_msg.= sprintf("error on line %s, reason: %s, msg: %s\r\n", $line, $e->getreason(), $e->getmessage()); break; } } } else { $this->seterrormessage($arr); } $line++; } $this->seterrormessage($error_msg); } else { $this->seterrormessage($errors); } //print_r($errors); //exit; homecoming false; }
borrowing reply bigquery stream: 'failed insert xx rows due timeout':
bigquery can have partial commit of rows. we'll reject request if there invalid rows (structure mismatch), individual rows may fail buffered.
in case, rows indicated failed commit. if have insert id can retry failed rows, or retry total request if desired (though each retried row count against table quota).
the increased occurrence of these row-level errors since august due alter around how handle batches of insertions. previously, entire request have encountered timeout.
google-bigquery
Comments
Post a Comment