GbqConnector should be able to fetch default credentials on Google Compute Engine · Issue #13577 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@mhaseebtariq

Description

@mhaseebtariq

https://github.com/pydata/pandas/blob/master/pandas/io/gbq.py

class GbqConnector(object):
    ...
    def get_user_account_credentials(self):
        ...
    ...

Google Compute Engine and Google Dataproc etc. already have default application credentials on them. Therefore, there is no need of running OAuth2WebServerFlow while the method get_user_account_credentials is being called - instead return GoogleCredentials.get_application_default() is all you need. This change will allow you to run GbqConnector on commandline-only systems on Google Compute Engine without a need of a service account json key.