Matt Menzenski
12/13/2022, 4:52 AMkey_file_location
to ''
• client_secrets
to the contents of a valid JSON secrets file
• view_id
to the correct view ID
• reports
to a path containing a valid JSON array reports specification
• start_date
to 2022-12-08
pat_nadolny
12/13/2022, 1:47 PMMatt Menzenski
12/13/2022, 2:47 PM$ meltano --environment=local config tap-google-analytics
2022-12-13T14:47:29.538681Z [info ] Environment 'local' is active
{
"key_file_location": "",
"client_secrets": {
"type": "service_account",
"project_id": "<secret>",
"private_key_id": "<secret>",
"private_key": "-----BEGIN PRIVATE KEY-----\n<secret stuff>\n-----END PRIVATE KEY-----\n",
"client_email": "<secret>",
"client_id": "<secret>",
"auth_uri": "<https://accounts.google.com/o/oauth2/auth>",
"token_uri": "<https://oauth2.googleapis.com/token>",
"auth_provider_x509_cert_url": "<https://www.googleapis.com/oauth2/v1/certs>",
"client_x509_cert_url": "<secret>"
},
"view_id": <nine digit view id>,
"reports": "./extract/google-analytics/report-definitions.json",
"start_date": "2022-12-08"
}
Matt Menzenski
12/13/2022, 2:48 PM- name: tap-google-analytics
variant: meltanolabs
pip_url: git+<https://github.com/MeltanoLabs/tap-google-analytics.git>
Matt Menzenski
12/13/2022, 2:49 PMclient_secrets
config parameter, maybe that’s incorrect?Matt Menzenski
12/13/2022, 2:50 PMjq -R -s '.' < client_secrets.json
to get the string that I set to the client_secrets parameter.pat_nadolny
12/13/2022, 2:57 PMkey_file_location
is causing an issue. I use this tap and when I ran that command my output looks identical minus the key_file_location
settingMatt Menzenski
12/13/2022, 2:58 PM$ meltano --environment=local config tap-google-analytics unset key_file_location
but then I get my usual error still:
meltano --environment=local config tap-google-analytics test
2022-12-13T14:58:09.201555Z [info ] Environment 'local' is active
Need help fixing this problem? Visit <http://melta.no/> for troubleshooting steps, or to
join our friendly Slack community.
Plugin configuration is invalid
JSONSchema was: {'type': 'object', 'properties': {'start_date': {'type': ['string'], 'format': 'date-time', 'description': 'The earliest record date to sync'}, 'view_id': {'type': ['string'], 'description': 'Google Analytics View ID'}, 'client_secrets': {'type': ['object', 'null'], 'properties': {}, 'description': 'Google Analytics Client Secrets Dictionary'}, 'key_file_location': {'type': ['string', 'null'], 'description': 'File Path to Google Analytics Client Secrets'}, 'oauth_credentials': {'type': ['object', 'null'], 'properties': {'access_token': {'type': ['string', 'null'], 'description': 'Google Analytics Access Token'}, 'refresh_token': {'type': ['string', 'null'], 'description': 'Google Analytics Refresh Token'}, 'client_id': {'type': ['string', 'null'], 'description': 'Google Analytics Client ID'}, 'client_secret': {'type': ['string', 'null'], 'description': 'Google Analytics Client Secret'}}, 'description': 'Google Analytics OAuth Credentials'}, 'reports': {'type': ['string', 'null'], 'description': 'Google Analytics Reports Definition'}, 'end_date': {'type': ['string', 'null'], 'description': 'The last record date to sync'}, 'stream_maps': {'type': ['object', 'null'], 'properties': {}, 'description': 'Config object for stream maps capability. For more information check out [Stream Maps](<https://sdk.meltano.com/en/latest/stream_maps.html).>'}, 'stream_map_config': {'type': ['object', 'null'], 'properties': {}, 'description': 'User-defined config values to be used within map expressions.'}, 'flattening_enabled': {'type': ['boolean', 'null'], 'description': "'True' to enable schema flattening and automatically expand nested properties."}, 'flattening_max_depth': {'type': ['integer', 'null'], 'description': 'The max depth to flatten schemas.'}}, 'required': ['start_date', 'view_id']}
pat_nadolny
12/13/2022, 3:08 PMmeltano --environment=local invoke tap-google-analytics
do you get any records?Matt Menzenski
12/13/2022, 3:10 PMMatt Menzenski
12/13/2022, 3:10 PMsinger_sdk.exceptions.ConfigValidationError: Config validation failed: <number> is not of type 'string'
Matt Menzenski
12/13/2022, 3:11 PMmeltano config tap-google-analytics set --interactive
command - should I have quoted it?Matt Menzenski
12/13/2022, 3:13 PMMatt Menzenski
12/13/2022, 3:13 PMpat_nadolny
12/13/2022, 3:16 PMMatt Menzenski
12/13/2022, 3:19 PMconfig test
and invoke
wasn’t clear to me (still isn’t, to be honest). It seems like invoke
will actually return data while config test
is more of a “ping” ?Matt Menzenski
12/13/2022, 3:20 PMinvoke
as well would be helpful. That made the difference for me today.pat_nadolny
12/13/2022, 3:22 PMMatt Menzenski
12/13/2022, 3:22 PMpat_nadolny
12/13/2022, 3:25 PMconfig test
is meant to confirm that the config is functional, I think by retrieving a single record then exiting. invoke
is for running a single tap directly, all singer records will log to the terminal which is helpful for debugging sometimespat_nadolny
12/13/2022, 3:38 PM