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

Commit ce6c3fc

Browse files
committed
rename snippet to job optional
1 parent b9b9448 commit ce6c3fc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

samples/snippets/src/main/java/com/example/bigquery/QueryShortMode.java renamed to samples/snippets/src/main/java/com/example/bigquery/QueryJobOptional.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,22 @@
3030
// This feature is controlled by setting the defaultJobCreationMode
3131
// field in the BigQueryOptions used for the client. JOB_CREATION_OPTIONAL
3232
// allows for the execution of queries without creating a job.
33-
public class QueryShortMode {
33+
public class QueryJobOptional {
3434

3535
public static void main(String[] args) {
3636
String query =
3737
"SELECT name, gender, SUM(number) AS total FROM "
3838
+ "bigquery-public-data.usa_names.usa_1910_2013 GROUP BY "
3939
+ "name, gender ORDER BY total DESC LIMIT 10";
40-
queryShortMode(query);
40+
queryJobOptional(query);
4141
}
4242

43-
public static void queryShortMode(String query) {
43+
public static void queryJobOptional(String query) {
4444
try {
4545
// Initialize client that will be used to send requests. This client only needs
4646
// to be created once, and can be reused for multiple requests.
4747
BigQueryOptions options = BigQueryOptions.getDefaultInstance();
48-
options.setDefaultJobCreationMode(JobCreationMode.JOB_CREATION_OPTIONAL);
48+
options.setDefaultJobCreationMode(QueryJobConfiguration.JobCreationMode.JOB_CREATION_OPTIONAL);
4949
BigQuery bigquery = options.getService();
5050

5151
// Execute the query. The returned TableResult provides access information

0 commit comments

Comments
 (0)