Skip to content

Commit

Permalink
add bf error
Browse files Browse the repository at this point in the history
  • Loading branch information
xxhZs committed Mar 7, 2024
1 parent e10dad1 commit e2f9b6f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/connector/src/sink/big_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,8 @@ impl BigQuerySinkWriter {
if !self.insert_request.is_empty() {
let insert_request =
mem::replace(&mut self.insert_request, TableDataInsertAllRequest::new());
self.client
let request = self
.client
.tabledata()
.insert_all(
&self.config.common.project,
Expand All @@ -360,6 +361,12 @@ impl BigQuerySinkWriter {
)
.await
.map_err(|e| SinkError::BigQuery(e.into()))?;
if let Some(error) = request.insert_errors {
return Err(SinkError::BigQuery(anyhow::anyhow!(
"Insert error: {:?}",
error
)));
}
}
Ok(())
}
Expand Down

0 comments on commit e2f9b6f

Please sign in to comment.