Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit eb1cebe

Browse files
author
Praful Makani
committed
docs(samples): address feedback
1 parent e4c0513 commit eb1cebe

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

samples/snippets/src/main/java/com/example/bigquery/QueryMaterializedView.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919
import com.google.cloud.bigquery.BigQuery;
2020
import com.google.cloud.bigquery.BigQueryException;
2121
import com.google.cloud.bigquery.BigQueryOptions;
22-
import com.google.cloud.bigquery.Job;
23-
import com.google.cloud.bigquery.JobInfo;
2422
import com.google.cloud.bigquery.QueryJobConfiguration;
2523
import com.google.cloud.bigquery.TableResult;
2624

@@ -40,8 +38,7 @@ public static void queryMaterializedView(String query) throws InterruptedExcepti
4038
// once, and can be reused for multiple requests.
4139
BigQuery bigquery = BigQueryOptions.getDefaultInstance().getService();
4240

43-
Job job = bigquery.create(JobInfo.of(QueryJobConfiguration.of(query)));
44-
TableResult results = job.getQueryResults(BigQuery.QueryResultsOption.pageSize(1000));
41+
TableResult results = bigquery.query(QueryJobConfiguration.of(query));
4542
results
4643
.iterateAll()
4744
.forEach(row -> row.forEach(val -> System.out.printf("%s\n", val.toString())));

0 commit comments

Comments
 (0)