Google Ads API GAQL: Request for an implicit left join on attributed resources

130 views
Skip to first unread message

Mehul Parmar

unread,
May 3, 2022, 6:32:37 PM5/3/22
to Google Ads API and AdWords API Forum
Hi Team,

We leverage the GoogleAdsService and SearchGoogleAdsStreamRequest to download data from Google Ads API resources using GAQL. One of the resources we are downloading is the ad_group and a few of its related attributed resources. 

One of the behaviors we noticed when specifying one of the fields from ad_group's attributed resource "bidding_strategy" is that it didn't download any data for some of the accounts (customer_id) even though the Google Ads UI showed it did. However, when I removed the fields from the "bidding_strategy "attributed resource from the GAQL, it downloaded the data correctly for these accounts.  

Upon looking at some documentation on attributed resources in GAQL, Google Ads API does some implicit join with attributed resources. I wonder if this join is an INNER join and whether there is a feature to specify a LEFT join instead so that we don't miss on the data for some of the accounts because of NULLs or missing data in the join condition fields.

Thanks,
Mehul Parmar.

Google Ads API Forum Advisor

unread,
May 4, 2022, 10:05:12 PM5/4/22
to mpa...@thumbtack.com, adwor...@googlegroups.com

Hi Mehul,
 

Thanks for reaching out to the Google Ads API Support team.
 

With regard to your concern, so our team can better check this concern, could you provide screenshot of the UI and the complete Ads API logs (request and response with request-id) to further investigation on this?


You can provide it via Reply privately to the author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.


Regards,

Google Logo
Darwin
Google Ads API Team
 


ref:_00D1U1174p._5004Q2aQD9H:ref

Lukas Kelling

unread,
Jun 2, 2022, 6:47:22 AM6/2/22
to Google Ads API and AdWords API Forum
Hello!

We've noticed a similar behaviour when querying the ad_group resource along with attributed resources like customer & bidding_strategy.

The following GAQL query results in an empty response:
```
SELECT
    customer.id,
    ad_group.labels,
    bidding_strategy.name
FROM ad_group
```

However, removing any of the three selected fields (customer.id, ad_group.labels, bidding_strategy.name) results in a non-empty response, returning at least the field ad_group.resource_name for the correct number of objects as seen in the UI / as returned by a querying the ad_group resource without any attributed resources.

I believe this issue is similar to the original request of this thread. I'll therefore use the "Reply privately to the author" option to provide screenshots & complete API logs as specified for our case.

Thanks,
Lukas
Reply all
Reply to author
Forward
0 new messages