Facing issue in fetching Audience level data

126 views
Skip to first unread message

Chandra Joshi

unread,
Sep 8, 2023, 12:33:27 AM9/8/23
to Google Ads API and AdWords API Forum
Hi Google Support,

I've run into an issue with the Google Ads Query Validator and need some help debugging.

  * API Version: v14

  * Query: "SELECT metrics.impressions, campaign.name, metrics.clicks, metrics.conversions, campaign_audience_view.resource_name, metrics.cost_micros FROM campaign_audience_view WHERE segments.year >= 2021"

  * Result: Invalid Query (errors below)

    * The filtering conditions in the WHERE clause must combine to form a valid, finite date range composed of the core date segments 'segments.date', 'segments.week', 'segments.month', 'segments.quarter', 'segments.year' if a core date segment is present in a query.

  * Link to query result: https://gaql-query-builder.uc.r.appspot.com/v14/share?q=SELECT%20metrics.impressions%2C%20campaign.name%2C%20metrics.clicks%2C%20metrics.conversions%2C%20campaign_audience_view.resource_name%2C%20metrics.cost_micros%20FROM%20campaign_audience_view%20WHERE%20segments.year%20%3E%3D%202021

  * Expected result: [PLEASE FILL IN (if the query validator produced results that are different than the Google Ads API server, please include your complete logs)]

Thanks!

Google Ads API Forum Advisor

unread,
Sep 8, 2023, 7:07:51 AM9/8/23
to adwor...@googlegroups.com

Hi,

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

It appears that the filtering conditions in the WHERE clause of your query "segments.year >= 2021" does not form a valid, finite date. To fix the issue, kindly specify a more finite or specific date. You may refer to the following resources for more information:

Let me know if you have any questions.
 

This message is in relation to case "ref:_00D1U1174p._5004Q2ojQGE:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages