in services/library/src/main/java/com/google/cloud/pso/bq_pii_classifier/services/bq/BigQueryServiceImpl.java [83:99]
public TableResult waitAndGetJobResults(Job queryJob) throws InterruptedException, RuntimeException {
// Wait for the query to complete.
queryJob = queryJob.waitFor();
// Check for errors
if (queryJob == null) {
throw new RuntimeException("Job no longer exists");
} else // You can also look at queryJob.getStatus().getExecutionErrors() for all
// errors, not just the latest one.
if (queryJob.getStatus().getError() != null) {
throw new RuntimeException(queryJob.getStatus().getError().toString());
}
return queryJob.getQueryResults();
}