File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
examples/src/main/java8/com/google/cloud/dataflow/examples/complete/game/utils Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 24
24
import com .google .cloud .dataflow .sdk .Pipeline ;
25
25
import com .google .cloud .dataflow .sdk .io .BigQueryIO ;
26
26
import com .google .cloud .dataflow .sdk .io .BigQueryIO .Write .CreateDisposition ;
27
+ import com .google .cloud .dataflow .sdk .io .BigQueryIO .Write .WriteDisposition ;
27
28
import com .google .cloud .dataflow .sdk .options .GcpOptions ;
28
29
import com .google .cloud .dataflow .sdk .options .PipelineOptions ;
29
30
import com .google .cloud .dataflow .sdk .transforms .DoFn ;
@@ -117,7 +118,8 @@ public PDone apply(PCollection<T> teamAndScore) {
117
118
.to (getTable (teamAndScore .getPipeline (),
118
119
tableName ))
119
120
.withSchema (getSchema ())
120
- .withCreateDisposition (CreateDisposition .CREATE_IF_NEEDED ));
121
+ .withCreateDisposition (CreateDisposition .CREATE_IF_NEEDED )
122
+ .withWriteDisposition (WriteDisposition .WRITE_APPEND ));
121
123
}
122
124
123
125
/** Utility to construct an output table reference. */
Original file line number Diff line number Diff line change 19
19
import com .google .api .services .bigquery .model .TableRow ;
20
20
import com .google .cloud .dataflow .sdk .io .BigQueryIO ;
21
21
import com .google .cloud .dataflow .sdk .io .BigQueryIO .Write .CreateDisposition ;
22
+ import com .google .cloud .dataflow .sdk .io .BigQueryIO .Write .WriteDisposition ;
22
23
import com .google .cloud .dataflow .sdk .transforms .DoFn ;
23
24
import com .google .cloud .dataflow .sdk .transforms .DoFn .RequiresWindowAccess ;
24
25
import com .google .cloud .dataflow .sdk .transforms .ParDo ;
@@ -68,7 +69,8 @@ public PDone apply(PCollection<T> teamAndScore) {
68
69
.to (getTable (teamAndScore .getPipeline (),
69
70
tableName ))
70
71
.withSchema (getSchema ())
71
- .withCreateDisposition (CreateDisposition .CREATE_IF_NEEDED ));
72
+ .withCreateDisposition (CreateDisposition .CREATE_IF_NEEDED )
73
+ .withWriteDisposition (WriteDisposition .WRITE_APPEND ));
72
74
}
73
75
74
76
}
You can’t perform that action at this time.
0 commit comments