File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed
samples/snippets/src/main/java/com/example/bigquerystorage Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 2626import com .google .cloud .bigquery .BigQueryOptions ;
2727import com .google .cloud .bigquery .QueryJobConfiguration ;
2828import com .google .cloud .bigquery .TableResult ;
29+ import com .google .cloud .bigquery .storage .v1 .AppendRowsRequest ;
2930import com .google .cloud .bigquery .storage .v1 .AppendRowsResponse ;
3031import com .google .cloud .bigquery .storage .v1 .BigQueryWriteClient ;
3132import com .google .cloud .bigquery .storage .v1 .BigQueryWriteSettings ;
@@ -178,6 +179,10 @@ public void initialize(TableName parentTable)
178179 .setChannelsPerCpu (2 )
179180 .build ())
180181 .setEnableConnectionPool (true )
182+ // If value is missing in json and there is a default value configured on bigquery
183+ // column, apply the default value to the missing value field.
184+ .setDefaultMissingValueInterpretation (
185+ AppendRowsRequest .MissingValueInterpretation .DEFAULT_VALUE )
181186 .build ();
182187 }
183188
You can’t perform that action at this time.
0 commit comments