I have a java program that uses BigQuery Java client library to import JSON data from Google cloud storage into BigQuery. I am using Table.load()
method to start the load job. How do I set the ignoreUnknownValues
option to true
for this load job?
0
votes
2 Answers
1
votes
0
votes
You can see this docs
I think you cant use this flag with "load" because there are no flag "ignoreUnknownValues" into BigQuery.JobOption:
public Job load(FormatOptions format,
String sourceUri,
BigQuery.JobOption... options)
throws BigQueryException
But you can try "insert" option instead "load":
public InsertAllResponse insert(Iterable<InsertAllRequest.RowToInsert> rows,
boolean skipInvalidRows,
boolean ignoreUnknownValues)
throws BigQueryException
so:
response = table.insert(rows, true, true);