Problems reading bigquery google sheets federated data sources into cloud datalab via pandas_gbq -
this similar this question -- have same question, , 1 of commenters there said had solved didn't flesh out solution.
- i have data in google sheet, have set google bigquery federated data source (external data source).
- i want import data in cloud datalab using pandas_gbq
- when import usual (non-federated) bigquery tables, same project, in datalab instance works fine.
- when try import federated source (from google sheet) error: "genericgbqexception: reason: accessdenied, message: access denied: bigquery bigquery: no oauth token google drive scope found."
i have tried follow mattm's instructions on original question post: "i had exact same issue , had enable both drive api project (in addition bigquery api), use bigquery+drive scopes. had manually permission sheets allow access ...@appspot.gserviceaccount.com account project used access google sheets with."
- i have enabled drive api project.
- i added service account used in datalab instance sharing permissions list in google sheet: xxxx@developer.gserviceaccount.com
- i not sure how "use bigquery+drive scopes" ?
has else managed working? matter of using bigquery , drive scopes, , if so, how do that?
when formatting request, make sure credentials have following 2 scopes: 'https://www.googleapis.com/auth/drive.readonly' , 'https://www.googleapis.com/auth/cloud-platform'
Comments
Post a Comment