Cannot select or filter on the following segments

107 views
Skip to first unread message

Markus H.

unread,
Apr 26, 2024, 5:26:39 AM4/26/24
to Google Ads API and AdWords API Forum
I would like to retrieve the KPIs of a PerformanceMax campaign at AssetGroup level. I can create the query in the Google Ads Query Builder. Unfortunately, I get the following error message, but it should actually work to retrieve the data

SELECT campaign.id, campaign.name, metrics.clicks, metrics.cost_micros, metrics.impressions FROM asset_group WHERE segments.date BETWEEN '2024-04-01' AND '2024-04-26' AND campaign.id = xxxxxxx

Error: Cannot select or filter on the following segments: 'segments.date'(could not support requested resources: 'ASSET_GROUP'), since segment is incompatible with the resource in the FROM clause or other selected segmenting resources.
query.png

Google Ads API Forum Advisor

unread,
Apr 29, 2024, 7:38:25 AM4/29/24
to markus....@gmail.com, adwor...@googlegroups.com
Hi,

Thank you for reaching out to the Google Ads API support team.

From the provided logs, I understand that you are getting the error message "Cannot select or filter on the following segments: 'segments.date'(could not support requested resources: 'ASSET_GROUP'), since segment is incompatible with the resource in the FROM clause or other selected segmenting resources" while retrieving data from the asset_ group resource by filtering segments.date via Google Ads API.

Kindly note that we are unable to reproduce the error by our end with the provided query. We are getting a successful run on the same query and results are returned using the Method: customers.googleAds.search and Method: customers.googleAds.searchStream. Also, you can use Query Builder to create your query and Query Validator to validate your query.

Could you confirm whether you are using the latest version 'v16' in order to build the query and validate? Also, provide us with the complete API logs (request and response with request-id and request header) generated at your end.

If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library that you are using. You can refer to the guides Java, .Net, PHP, Python, Ruby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.

You can send the details via Reply privately to the author option, or direct private reply to this email.
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tPK1C:ref" (ADR-00232765)

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages