Skip to content

Commit

Permalink
Making the default BigQuery write disposition to be WRITE_APPEND (apa…
Browse files Browse the repository at this point in the history
…che#25434)

* Added element counter and error counter for BQ write schema transform

* Fixied styling issues with naming

* Combined two trivial counter class for brevity. Used finishbundle annotation to reduce the number of calls to counter.inc() for better performance.

* fix formatting

* change the default write disposition to write append instead of write empty

---------

Co-authored-by: Nick Li <[email protected]>
  • Loading branch information
2 people authored and ruslan-ikhsan committed Mar 10, 2023
1 parent cd5863d commit 6d8ccce
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,8 @@ BigQueryIO.Write<Row> createStorageWriteApiTransform() {
.to(configuration.getTable())
.withMethod(writeMethod)
.useBeamSchema()
.withFormatFunction(BigQueryUtils.toTableRow());
.withFormatFunction(BigQueryUtils.toTableRow())
.withWriteDisposition(WriteDisposition.WRITE_APPEND);

if (!Strings.isNullOrEmpty(configuration.getCreateDisposition())) {
CreateDisposition createDisposition =
Expand Down

0 comments on commit 6d8ccce

Please sign in to comment.