The following fields may not be used in SELECT clause: 'ad_group_ad.ad.responsive_display_ad.marketing_images.asset', 'ad_group_ad.ad.responsive_display_ad.youtube_videos.asset'

350 views
Skip to first unread message

Oksana Sulyma

unread,
Aug 11, 2022, 9:17:49 AM8/11/22
to Google Ads API and AdWords API Forum
Hi Google Ads API support team!
I have the next issue:

Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v11.services.GoogleAdsService/SearchStream", CustomerId: hidden, RequestId: "VGS08iw7j0LjMzEYE6owQQ", IsFault: 1, FaultMessage: "["The following fields may not be used in SELECT clause: 'ad_group_ad.ad.responsive_display_ad.marketing_images.asset', 'ad_group_ad.ad.responsive_display_ad.youtube_videos.asset'."]"  
[2022-08-11T13:04:07.322330+00:00] google-ads.NOTICE: Request
-------
Method Name: /google.ads.googleads.v11.services.GoogleAdsService/SearchStream
Host: googleads.googleapis.com
Headers: {
    "x-goog-api-client": "gl-php\/8.0.12 gccl\/16.0.0 gapic\/16.0.0 gax\/1.14.0 grpc\/1.42.0 rest\/1.14.0 pb\/3.19.1+c",
    "x-goog-request-params": "customer_id=hidden",
    "developer-token": "REDACTED",
    "login-customer-id": "hidden"
}

"query":"SELECT campaign.id, ad_group.id, segments.ad_network_type, ad_group_ad.ad.id, ad_group_ad.ad.type, ad_group_ad.status, ad_group_ad.ad.final_app_urls, ad_group_ad.ad.final_mobile_urls, ad_group_ad.ad.final_urls, ad_group_ad.ad.display_url, ad_group_ad.labels, ad_group_ad.ad.expanded_text_ad.headline_part1, ad_group_ad.ad.expanded_text_ad.headline_part2, ad_group_ad.ad.expanded_text_ad.headline_part3, ad_group_ad.ad.expanded_text_ad.path1, ad_group_ad.ad.expanded_text_ad.path2, ad_group_ad.ad.expanded_text_ad.description, ad_group_ad.ad.expanded_text_ad.description2, ad_group_ad.ad.name, ad_group_ad.ad.image_ad.name, ad_group_ad.ad.image_ad.pixel_height, ad_group_ad.ad.image_ad.pixel_width, ad_group_ad.ad.image_ad.image_url, ad_group_ad.ad.image_ad.preview_image_url, ad_group_ad.ad.image_ad.preview_pixel_height, ad_group_ad.ad.image_ad.preview_pixel_width, ad_group_ad.ad.call_ad.phone_number, ad_group_ad.ad.call_ad.description1, ad_group_ad.ad.call_ad.description2, ad_group_ad.ad.call_ad.business_name, ad_group_ad.ad.call_ad.headline1, ad_group_ad.ad.call_ad.headline2, ad_group_ad.ad.call_ad.call_tracked, ad_group_ad.ad.call_ad.disable_call_conversion, ad_group_ad.ad.call_ad.phone_number_verification_url, ad_group_ad.ad.call_ad.conversion_action, ad_group_ad.ad.call_ad.conversion_reporting_state, ad_group_ad.ad.call_ad.path1, ad_group_ad.ad.call_ad.path2, ad_group_ad.ad.text_ad.headline, ad_group_ad.ad.text_ad.description1, ad_group_ad.ad.text_ad.description2, ad_group_ad.ad.responsive_display_ad.headlines, ad_group_ad.ad.responsive_display_ad.long_headline, ad_group_ad.ad.responsive_display_ad.descriptions, ad_group_ad.ad.responsive_display_ad.business_name, ad_group_ad.ad.responsive_display_ad.logo_images, ad_group_ad.ad.responsive_display_ad.square_logo_images, ad_group_ad.ad.responsive_display_ad.square_marketing_images, ad_group_ad.ad.responsive_display_ad.marketing_images, ad_group_ad.ad.responsive_display_ad.marketing_images.asset, ad_group_ad.ad.responsive_display_ad.youtube_videos, ad_group_ad.ad.responsive_display_ad.youtube_videos.asset, ad_group_ad.ad.responsive_display_ad.format_setting, ad_group_ad.ad.responsive_display_ad.main_color, ad_group_ad.ad.responsive_display_ad.accent_color, ad_group_ad.ad.responsive_display_ad.allow_flexible_color, ad_group_ad.ad.responsive_display_ad.call_to_action_text, ad_group_ad.ad.responsive_display_ad.price_prefix, ad_group_ad.ad.responsive_display_ad.promo_text, ad_group_ad.ad.responsive_search_ad.headlines, ad_group_ad.ad.responsive_search_ad.descriptions, ad_group_ad.ad.responsive_search_ad.path1, ad_group_ad.ad.responsive_search_ad.path2, ad_group_ad.ad.expanded_dynamic_search_ad.description, ad_group_ad.ad.expanded_dynamic_search_ad.description2, segments.date, metrics.impressions, metrics.clicks, metrics.cost_micros, metrics.conversions, metrics.conversions_value, metrics.view_through_conversions, metrics.all_conversions, metrics.all_conversions_value, metrics.cross_device_conversions, metrics.engagements, metrics.interactions, metrics.video_quartile_p100_rate, metrics.video_quartile_p25_rate, metrics.video_quartile_p50_rate, metrics.video_quartile_p75_rate, metrics.video_views, metrics.gmail_forwards, metrics.gmail_saves, metrics.gmail_secondary_clicks, metrics.active_view_impressions, metrics.active_view_measurable_impressions, metrics.active_view_measurable_cost_micros, metrics.average_page_views, metrics.average_time_on_site, metrics.percent_new_visitors, metrics.bounce_rate FROM ad_group_ad WHERE segments.date>='2022-07-01' AND segments.date<='2022-08-10'  ORDER BY segments.date DESC "

Response
-------
Headers: {
    "request-id": "VGS08iw7j0LjMzEYE6owQQ",
    "date": "Thu, 11 Aug 2022 13:04:07 GMT",
    "alt-svc": "h3=\":443\"; ma=2592000,h3-29=\":443\"; ma=2592000,h3-Q050=\":443\"; ma=2592000,h3-Q046=\":443\"; ma=2592000,h3-Q043=\":443\"; ma=2592000,quic=\":443\"; ma=2592000; v=\"46,43\""
}

Fault
-------
Status code: 3
Details: Request contains an invalid argument.
Failure: {"errors":[{"errorCode":{"queryError":"PROHIBITED_FIELD_IN_SELECT_CLAUSE"},"message":"The following fields may not be used in SELECT clause: 'ad_group_ad.ad.responsive_display_ad.marketing_images.asset', 'ad_group_ad.ad.responsive_display_ad.youtube_videos.asset'."}],"requestId":"VGS08iw7j0LjMzEYE6owQQ"}  

(I can provide complete log privately )


Wanted to have understanding why 
'ad_group_ad.ad.responsive_display_ad.marketing_images.asset', 'ad_group_ad.ad.responsive_display_ad.youtube_videos.asset'
fields which should be available according to documentation can't be used in my query? 

Also could you please clarify:
I get 'ad_group_ad.ad.responsive_display_ad.marketing_images' as [{"asset":"customers\/9001031727\/assets\/20963565486"},{"asset":"customers\/9001031727\/assets\/34328264347"},{"asset":"customers\/9001031727\/assets\/34334752325"}]
as example.
https://developers.google.com/google-ads/api/fields/v11/ad_group_ad#ad_group_ad.ad.responsive_display_ad.marketing_images says 'Marketing images to be used in the ad. Valid image types are GIF, JPEG, and PNG. The minimum size is 600x314 and the aspect ratio must be 1.91:1 (+-1%). At least one marketing_image is required. Combined with square_marketing_images, the maximum is 15.' but values that I get look like asset resource name. Is this expected behaviour?

Thanks in advance for looking at my question!
Oksana

Oksana Sulyma

unread,
Aug 15, 2022, 8:14:18 AM8/15/22
to Google Ads API and AdWords API Forum
Hello!
Just wanted to confirm that my question is still actual. 
Thanks,
Oksana

Google Ads API Forum Advisor

unread,
Aug 17, 2022, 12:31:23 PM8/17/22
to adwor...@googlegroups.com
Hi Oksana,

I'm a developer relations engineer jumping in to help with this issue - apologies for the delayed response.

The reason you're receiving this error is that these two fields are not directly selectable because they are part of a repeated field, marketing_images. In the GAQL query language it's not possible to select subfields from within a repeated field, this notating just indicates the messages in the marketing_images repeated field have a field called asset.

Our documentation indicates this here by stating that the field is not selectable. To obtain the data in that field you need to only select ad_group_ad.ad.app_ad.youtube_videos and iterate through the list on the client side.

Hope that helps, please let me know if you have any additional questions.

Best,
Google Logo
Ben Karl
Google Ads API Team
 


ref:_00D1U1174p._5004Q2dJgjo:ref

Oksana Sulyma

unread,
Aug 23, 2022, 9:11:08 AM8/23/22
to Google Ads API and AdWords API Forum
Hi Ben Karl and team,
Thanks for the explanation!
Reply all
Reply to author
Forward
0 new messages