nevin_morgan
08/28/2020, 8:32 PMdouwe_maan
08/28/2020, 9:26 PMdouwe_maan
08/28/2020, 9:26 PMnevin_morgan
08/28/2020, 10:32 PMmeltano invoke
in a way that gets me the request output from the client? The error message is frustratingly vague for this one so anything you could think of to debug would be helpfuldouwe_maan
08/28/2020, 10:35 PM.meltano/extractors/tap-google-analytics/venv/lib/python3.6/site-packages/tap_google_analytics
. Just make sure you write to stderr
, not stdout
, so that the log messages won't be treated as Singer messages.douwe_maan
08/28/2020, 10:36 PMmeltano elt
and meltano invoke
outputnevin_morgan
08/28/2020, 10:58 PMdouwe_maan
08/28/2020, 11:06 PMnevin_morgan
08/31/2020, 10:45 PMnevin_morgan
08/31/2020, 10:46 PMif 'oauth_credentials' in config:
return GoogleCredentials(
access_token=config['oauth_credentials']['access_token'],
refresh_token=config['oauth_credentials']['refresh_token'],
client_id=config['oauth_credentials']['client_id'],
client_secret=config['oauth_credentials']['client_secret'],
token_expiry=None, # let the library refresh the token if it is expired
token_uri="<https://accounts.google.com/o/oauth2/token>",
user_agent="tap-google-analytics (via <http://singer.io|singer.io>)"
)
else:
return ServiceAccountCredentials.from_json_keyfile_dict(config['client_secrets'], SCOPES)
nevin_morgan
08/31/2020, 10:47 PMdouwe_maan
09/01/2020, 2:39 PMmeltano config tap-google-analytics
also show the null keys? Can you share that (redacted) output?douwe_maan
09/01/2020, 2:39 PMtap.config.json
incorrectly, this would be a bug in the Meltano reponevin_morgan
09/01/2020, 2:40 PM{
"view_id": "<REDACTED>",
"key_file_location": "/client-analytics.json",
"reports": null,
"oauth_credentials": {
"access_token": null,
"refresh_token": null,
"client_id": null,
"client_secret": null
},
"start_date": "2020-08-15T00:00:00Z",
"end_date": "2020-08-20T00:00:00Z"
}
nevin_morgan
09/01/2020, 2:40 PMdouwe_maan
09/01/2020, 2:41 PMmeltano config tap-google-analytics list
say those values are coming from? The default? How did you set them? In .env
? Using which env vars?nevin_morgan
09/01/2020, 2:42 PMexport GOOGLE_ANALYTICS_API_CLIENT_SECRETS=""
export GOOGLE_ANALYTICS_API_VIEW_ID=""
export GOOGLE_ANALYTICS_API_START_DATE=""
export GOOGLE_ANALYTICS_API_END_DATE=""
nevin_morgan
09/01/2020, 2:44 PMview_id [env: GOOGLE_ANALYTICS_API_VIEW_ID] current value: '<REDACTED>' (from `.env`)
key_file_location [env: GOOGLE_ANALYTICS_API_CLIENT_SECRETS] current value: '/client-analytics.json' (from `.env`)
reports [env: GOOGLE_ANALYTICS_API_REPORTS] current value: None (from default)
oauth_credentials.access_token [env: GOOGLE_ANALYTICS_API_OAUTH_ACCESS_TOKEN] current value: None (from default)
oauth_credentials.refresh_token [env: GOOGLE_ANALYTICS_API_OAUTH_REFRESH_TOKEN] current value: None (from default)
oauth_credentials.client_id [env: GOOGLE_ANALYTICS_API_OAUTH_CLIENT_ID] current value: None (from default)
oauth_credentials.client_secret [env: GOOGLE_ANALYTICS_API_OAUTH_CLIENT_SECRET] current value: None (from default)
start_date [env: GOOGLE_ANALYTICS_API_START_DATE] current value: '2020-08-15T00:00:00Z' (from `.env`)
end_date [env: GOOGLE_ANALYTICS_API_END_DATE] current value: '2020-08-20T00:00:00Z' (from `.env`)
Custom:
oauth_credentials [env: TAP_GOOGLE_ANALYTICS_OAUTH_CREDENTIALS] current value: None (from default)
nevin_morgan
09/01/2020, 2:48 PMdouwe_maan
09/01/2020, 2:49 PMtap-google-analytics
integration with https://gitlab.com/meltano/meltano/-/merge_requests/1802, since we're now always passing an oauth_credentials
object, even if it's empty, which is causing tap-google-analytics
to go into that if 'oauth_credentials' in config:
branch. Instead, Meltano should not be passing the object if it's totally empty, or tap-google-analytics
should be verifying oauth_credentials
actually has non-null values.douwe_maan
09/01/2020, 2:49 PMnevin_morgan
09/01/2020, 2:50 PMnevin_morgan
09/01/2020, 2:59 PMdouwe_maan
09/01/2020, 8:10 PMpip_url
to git+<https://gitlab.com/meltano/tap-google-analytics.git@11-with-latest-meltano-fails-with-the-oauth-client-was-not-found-when-oauth_credentials-is-set-but>
and run meltano install extractor tap-google-analytics
to install it!nevin_morgan
09/01/2020, 8:15 PMnevin_morgan
09/01/2020, 8:18 PMdouwe_maan
09/01/2020, 8:31 PMpip_url
and run meltano install extractor tap-google-analytics
again to get it 🙂