File tree 1 file changed +5
-0
lines changed
samples/snippets/src/main/java/com/example/bigquerystorage
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 26
26
import com .google .cloud .bigquery .BigQueryOptions ;
27
27
import com .google .cloud .bigquery .QueryJobConfiguration ;
28
28
import com .google .cloud .bigquery .TableResult ;
29
+ import com .google .cloud .bigquery .storage .v1 .AppendRowsRequest ;
29
30
import com .google .cloud .bigquery .storage .v1 .AppendRowsResponse ;
30
31
import com .google .cloud .bigquery .storage .v1 .BigQueryWriteClient ;
31
32
import com .google .cloud .bigquery .storage .v1 .BigQueryWriteSettings ;
@@ -178,6 +179,10 @@ public void initialize(TableName parentTable)
178
179
.setChannelsPerCpu (2 )
179
180
.build ())
180
181
.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 )
181
186
.build ();
182
187
}
183
188
You can’t perform that action at this time.
0 commit comments