{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3067","repository_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3067/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3067/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3067/events","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/issues/3067","id":210084163,"number":3067,"title":"Expose BigQuery scopes","user":{"login":"jlowin","id":153965,"avatar_url":"https://avatars0.githubusercontent.com/u/153965?v=3","gravatar_id":"","url":"https://api.github.com/users/jlowin","html_url":"https://github.com/jlowin","followers_url":"https://api.github.com/users/jlowin/followers","following_url":"https://api.github.com/users/jlowin/following{/other_user}","gists_url":"https://api.github.com/users/jlowin/gists{/gist_id}","starred_url":"https://api.github.com/users/jlowin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jlowin/subscriptions","organizations_url":"https://api.github.com/users/jlowin/orgs","repos_url":"https://api.github.com/users/jlowin/repos","events_url":"https://api.github.com/users/jlowin/events{/privacy}","received_events_url":"https://api.github.com/users/jlowin/received_events","type":"User","site_admin":false},"labels":[{"id":82126549,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/api:%20bigquery","name":"api: bigquery","color":"c0c0c0","default":false},{"id":544604243,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/priority:%20p2+","name":"priority: p2+","color":"ffee58","default":false},{"id":544604235,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/status:%20acknowledged","name":"status: acknowledged","color":"fef2c0","default":false},{"id":77438584,"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/labels/type:%20question","name":"type: question","color":"8bc34a","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":10,"created_at":"2017-02-24T15:53:58Z","updated_at":"2017-05-10T20:24:03Z","closed_at":null,"body":"The default [scopes](https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/bigquery/google/cloud/bigquery/client.py#L75) for the BigQuery Client do not include Google Drive, which makes it difficult to access federated data sources in Google Sheets. \r\n\r\nThis can be worked around by manually constructing service account credentials with the appropriate scopes but that feels cumbersome. Am I not seeing a hook that allows scope modification when instantiating `bigquery.Client()`?"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/comments/300601765","html_url":"https://github.com/GoogleCloudPlatform/google-cloud-python/issues/3067#issuecomment-300601765","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/google-cloud-python/issues/3067","id":300601765,"user":{"login":"cdchan","id":1840347,"avatar_url":"https://avatars3.githubusercontent.com/u/1840347?v=3","gravatar_id":"","url":"https://api.github.com/users/cdchan","html_url":"https://github.com/cdchan","followers_url":"https://api.github.com/users/cdchan/followers","following_url":"https://api.github.com/users/cdchan/following{/other_user}","gists_url":"https://api.github.com/users/cdchan/gists{/gist_id}","starred_url":"https://api.github.com/users/cdchan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cdchan/subscriptions","organizations_url":"https://api.github.com/users/cdchan/orgs","repos_url":"https://api.github.com/users/cdchan/repos","events_url":"https://api.github.com/users/cdchan/events{/privacy}","received_events_url":"https://api.github.com/users/cdchan/received_events","type":"User","site_admin":false},"created_at":"2017-05-10T20:24:03Z","updated_at":"2017-05-10T20:24:03Z","body":"Another update after taking a crack at this again. I was able to get the below to work, but only if I used the `GOOGLE_APPLICATION_CREDENTIALS` method with [Application Default Credentials](https://developers.google.com/identity/protocols/application-default-credentials#howtheywork) (the `google.auth.default`), not the Google Cloud SDK method. Maybe the scoping interacts weirdly with the SDK method, I'm uncertain.\r\n\r\n```python\r\nSCOPE = ('https://www.googleapis.com/auth/bigquery',\r\n           'https://www.googleapis.com/auth/cloud-platform',\r\n           'https://www.googleapis.com/auth/drive')\r\ncredentials, _ = google.auth.default(scopes=SCOPE)\r\nclient = bigquery.Client(credentials=credentials)\r\n```"}}
{"actor":{"display_login":"cdchan"}}