Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
docs(samples): add region tag for auth snippet (#760)
  • Loading branch information
stephaniewang526 committed Sep 28, 2020
1 parent 0601674 commit 9709c9e
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -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(
Expand All @@ -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 =
Expand Down

0 comments on commit 9709c9e

Please sign in to comment.