Skip to content
Permalink
Browse files
docs: show gcloud command to authorize against sheets (#1045)
Fixes #805
  • Loading branch information
tswast committed Nov 4, 2021
1 parent 7c5fa8a commit 20c9024b5760f7ae41301f4da54568496922cbe2
Showing with 13 additions and 1 deletion.
  1. +6 −0 samples/query_external_sheets_permanent_table.py
  2. +7 −1 samples/query_external_sheets_temporary_table.py
@@ -21,6 +21,12 @@ def query_external_sheets_permanent_table(dataset_id):

# Create credentials with Drive & BigQuery API scopes.
# Both APIs must be enabled for your project before running this code.
#
# If you are using credentials from gcloud, you must authorize the
# application first with the following command:
#
# gcloud auth application-default login \
# --scopes=https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/cloud-platform
credentials, project = google.auth.default(
scopes=[
"https://www.googleapis.com/auth/drive",
@@ -22,10 +22,16 @@ def query_external_sheets_temporary_table():

# Create credentials with Drive & BigQuery API scopes.
# Both APIs must be enabled for your project before running this code.
#
# If you are using credentials from gcloud, you must authorize the
# application first with the following command:
#
# gcloud auth application-default login \
# --scopes=https://www.googleapis.com/auth/drive,https://www.googleapis.com/auth/cloud-platform
credentials, project = google.auth.default(
scopes=[
"https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/bigquery",
"https://www.googleapis.com/auth/cloud-platform",
]
)

0 comments on commit 20c9024

Please sign in to comment.