Skip to content
Permalink
Browse files
docs(samples): add region tag for auth snippet (#760)
  • Loading branch information
stephaniewang526 committed Sep 28, 2020
1 parent 0601674 commit 9709c9e401a512b6ab8e3ded52420597e30c7b0c
Showing with 2 additions and 0 deletions.
  1. +2 −0 samples/snippets/src/main/java/com/example/bigquery/QueryExternalSheetsTemp.java
@@ -54,6 +54,7 @@ public static void queryExternalSheetsTemp(

// Create credentials with Drive & BigQuery API scopes.
// Both APIs must be enabled for your project before running this code.
// [START bigquery_auth_drive_scope]
GoogleCredentials credentials =
ServiceAccountCredentials.getApplicationDefault()
.createScoped(
@@ -65,6 +66,7 @@ public static void queryExternalSheetsTemp(
// once, and can be reused for multiple requests.
BigQuery bigquery =
BigQueryOptions.newBuilder().setCredentials(credentials).build().getService();
// [END bigquery_auth_drive_scope]

// Skip header row in the file.
GoogleSheetsOptions sheetsOptions =

0 comments on commit 9709c9e

Please sign in to comment.