prakhar_srivastava
01/05/2023, 9:00 AMclient_secrets
param? anyone has faced this before?prakhar_srivastava
01/05/2023, 9:00 AMprakhar_srivastava
01/05/2023, 9:21 AMTAP_GOOGLE_ANALYTICS_CLIENT_SECRETS
prakhar_srivastava
01/05/2023, 11:43 AMprakhar_srivastava
01/05/2023, 11:50 AMprakhar_srivastava
01/05/2023, 12:24 PMwith open("client_secrets.json") as fl:
...: data = fl.read()
...: data = json.dumps(json.loads(data))
prakhar_srivastava
01/05/2023, 12:30 PM\
then it fails with
Expecting value: line 1 column 1 (char 0)
prakhar_srivastava
01/05/2023, 1:06 PMprakhar_srivastava
01/05/2023, 2:11 PMprakhar_srivastava
01/05/2023, 2:14 PMprakhar_srivastava
01/05/2023, 4:03 PM\
then Meltano gives me the parsing error, while I’m able to parse the string using json and using oauth2client libraby in ipython.
Can someone help me understand how does env vars are parsed in meltano and why it is supposedly trying to double parse ?prakhar_srivastava
01/05/2023, 4:06 PMpat_nadolny
01/05/2023, 4:20 PMTAP_GOOGLE_ANALYTICS_CLIENT_SECRETS="{\"type\": \"service_account\",\"project_id\": \"my-project-id\",\"private_key_id\": \"foo\",\"private_key\": \"-----BEGIN PRIVATE KEY-----\\nbar...
I guess single backslash for the quotes and double for the new line characterspat_nadolny
01/05/2023, 4:22 PMprakhar_srivastava
01/05/2023, 4:44 PMprakhar_srivastava
01/05/2023, 4:45 PMpat_nadolny
01/05/2023, 4:56 PMprakhar_srivastava
01/05/2023, 4:56 PMprakhar_srivastava
01/05/2023, 4:59 PMprakhar_srivastava
01/05/2023, 5:00 PMexport TAP_GOOGLE_ANALYTICS_CLIENT_SECRETS="{\"type\": \"service_account\",\n \"project_id\"
pat_nadolny
01/05/2023, 5:03 PMprakhar_srivastava
01/05/2023, 5:04 PMprakhar_srivastava
01/05/2023, 5:05 PMits that new line after service account 🤔Yep I saw and removed these extra
\n
and I come back to the same error.
What’s the meltano version/docker image you’re using — I’ll give that a shotpat_nadolny
01/05/2023, 5:11 PMpat_nadolny
01/05/2023, 5:12 PMmeltano config tap-google-analytics
and make sure your config prints out as expectedpat_nadolny
01/05/2023, 5:15 PM{
"view_id": "xyz",
"client_secrets": {
"type": "service_account",
"project_id": "foo",
"private_key_id": "bar",
"private_key": "-----BEGIN PRIVATE KEY-----\nABC\nDEF\n-----END PRIVATE KEY-----\n",
pat_nadolny
01/05/2023, 5:17 PMprakhar_srivastava
01/05/2023, 6:30 PMalexander_butler
01/05/2023, 6:32 PMmeltano config tap-google-analytics
?prakhar_srivastava
01/05/2023, 11:26 PMpat_nadolny
01/06/2023, 12:47 AM