Skip to content

Commit fc98f52

Browse files
ravwojdylaRafal Wojdyla
authored andcommitted
Change BQ mode to append instead of truncate
It appears that truncate mode is not supported for unbounded PCollection. Error message: [ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:java (default-cli) on project google-cloud-dataflow-java-examples-all: An exception occured while executing th e Java class. null: InvocationTargetException: WriteDisposition.WRITE_TRUNCATE is not supported for unbounded PCollections or when using tablespec functions. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
1 parent ea0e7bb commit fc98f52

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/src/main/java/com/google/cloud/dataflow/examples/WindowedWordCount.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ public static void main(String[] args) throws IOException {
251251
.to(getTableReference(options))
252252
.withSchema(getSchema())
253253
.withCreateDisposition(BigQueryIO.Write.CreateDisposition.CREATE_IF_NEEDED)
254-
.withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_TRUNCATE));
254+
.withWriteDisposition(BigQueryIO.Write.WriteDisposition.WRITE_APPEND));
255255

256256
PipelineResult result = pipeline.run();
257257

0 commit comments

Comments
 (0)