Hello Getting this error while running meltano tap...
# troubleshooting
j
Hello Getting this error while running meltano tap-googleads.
singer_sdk.exceptions.FatalAPIError: 400 Client Error: Bad Request for path: /v16/customers:listAccessibleCustomers
Would appreciate if anyone with past experience of integrating tap-googleads can connect with me for the same. Thanks in advance!
r
What version of the tap are you running? The
v16
API was sunset a while back. Try
Copy code
meltano add --update extractor tap-googleads
to get the latest version from the Hub (v0.8.0).
As in, I think if you were to dig into the
400 Bad Request
the response body would probably tell you that the
v16
API is no longer functional.
j
That's helps, thanks Reuben! I can no longer see that error, however I am still facing trouble extracting data from meltano KeyError: 'stream_accessible_customers' cmd_type=extractor name=tap-googleads run_id=79ca0600-d8d6-4497-a4de-06b68139bf34 state_id=2025-03-07T130007--tap-googleads--target-postgres stdio=stderr
r
Do you have any more context? Unsure if that is coming from
tap-googleads
or
target-postgres
. You can run the tap in isolation to check
Copy code
meltano invoke tap-googleads > tap.out
followed by the target
Copy code
cat tap.out | meltano invoke target-postgres
1
j
After running the forst command I can encounter singer_sdk.exceptions.StreamMapConfigError: Invalid key properties for 'stream_accessible_customers': [resource_names]. Property 'resource_names' was not detected in schema. I think the target-postgres is working fine 2025-03-07 185220,065 | INFO | target-postgres | Target 'target-postgres' is listening for input from tap. 2025-03-07 185220,065 | INFO | target-postgres | Target 'target-postgres' completed reading 0 lines of input (0 schemas, 0 records, 0 batch manifests, 0 state messages). 2025-03-07 185220,066 | INFO | target-postgres | Emitting completed target state {}
Is there discrepancy in catalg.json for google leads - I have encounterd errors regarding snake case and camel case use for stream_accessible_customers resopurceNames and resource_names
r
Right, I think this is related to https://github.com/Matatika/tap-googleads/pull/69. I am going to start a proper release for
v0.9.0
now, but you should be able to update the
pip_url
in your
meltano.yml
to just reference the latest from the main branch
Copy code
pip_url: git+<https://github.com/Matatika/tap-googleads.git>
and then try again.
1
j
Hey, This helps - making progress. Narrowed the issues to, NotImplementedError: Altering columns is not supported. Could not convert column '${organizationId}.gads_stream_accessible_customers.resourceNames' from 'JSONB' to 'TEXT'. cmd_type=elb consumer=True job_name=integration:tap-googleads-to-target-postgres name=target-postgres producer=False => I have replaced ${organizationId} Also this is really strange- WARNING | tap-googleads.stream_customer_hierarchy | 403 Client Error: Forbidden for path: /v18/customers/1122774390/googleAds:search. Error 403: The caller does not have permission (PERMISSION_DENIED) cmd_type=elb consumer=False job_name=integration:tap-googleads-to-target-postgres name=tap-googleads producer=True
r
You should probably just drop the
gads_stream_accessible_customers
table and let the target recreate the table on the next run. Since primary keys were amended, you may also have to do this for other stream tables too. You might be able to resolve the
403 Forbidden
issue by setting login_customer_id, or perhaps passing an explicit list of customer_ids to sync. https://github.com/Matatika/tap-googleads/issues/79 for more context.
1
j
Hey Reuben We are making noticeable progress, I am successfully able to establish connection, First part of the issue is concluded. For the second part I implemented your suggestion and went through the discussion, however I am still getting the 403 forbidden error. It's fetching a couple of customer ids, creating a just two tables - 1. accessible customer table with a single entry 2. customer hierarchy with no entries
r
Just released
v0.9.0
if you want to swap back to the versioned `pip_url`: https://github.com/Matatika/tap-googleads/releases/tag/v0.9.0
1
j
That's awesome - thanks. I am in swamp with 403 forbidden😬
r
accessible customer table with a single entry
How many customer resource names are there in
resourceNames
for that row?
customer hierarchy with no entries
Do you see a
403 Forbidden
warning log for every customer resource name?
j
Yes I do see a warning for every customer resource and I have 4 customers in resourceNames
r
OK, that makes sense why there is nothing in
stream_customer_hierarchy
table. Do you have
login_customer_id
set in config? That could otherwise be preventing access to those other customers (see https://developers.google.com/search-ads/reporting/concepts/login-customer-id).
1
j
Yes -have configured that. I believe the issue is more on these lines,
Copy code
There are 403 Forbidden errors when trying to access each customer account
For the first customer ID, the error message states: "The developer token is only approved for use with test accounts. To access non-test accounts, apply for Basic or Standard access."
r
You see that from the warning logs? Sounds like an issue that is only resolvable in Google Ads. Does that help you?