Error when trying to add metrics to the SELECT in the query

22 views
Skip to first unread message

asad mhagne

unread,
Oct 17, 2022, 5:28:08 AM10/17/22
to Google Ads API and AdWords API Forum
Hi,

I have been facing a problem with only one account,

when I try to create a simple query for example


SELECT campaign.name,campaign.status, metrics.clicks FROM video WHERE segments.date BETWEEN '2022-08-19' AND '2022-08-25' AND campaign.status = 'ENABLED'

I get this response ( No results although I can see the results in the UI of Google Ads)

field_mask {
  paths: "campaign.name"
  paths: "campaign.status"
  paths: "metrics.clicks"
}
I get the same if I try for example metrics.impressions

But if I try to run this query without the metrics, I get the expected response 

SELECT campaign.name,campaign.status FROM video WHERE segments.date BETWEEN '2022-08-19' AND '2022-08-25' AND campaign.status = 'ENABLED'

the response :

results {
  campaign {
    resource_name: "customers/customerID/campaigns/campaignID"
    status: ENABLED
    name: "the campaign name as expected"
  }
  video {
    resource_name: "customers/customerID/videos/videoID"
  }
}
field_mask {
  paths: "campaign.name"
  paths: "campaign.status"
}

Thank you,
Asad

Google Ads API Forum Advisor

unread,
Oct 17, 2022, 6:56:40 AM10/17/22
to asad.k...@gmail.com, adwor...@googlegroups.com
Hi Asad,

Thank you for reaching out to us.

I understand where you are coming from. However, I would need your help in sending over your complete API logs (request and response with request-id) generated on your end and the whole UI screenshot where you are seeing the expected data you want to retrieve in the API so our team could further check, compare, and validate why you are not getting this expected data using the other query.

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

In addition, this might also be connected to the zero metrics. You may check this documentation for more details.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2fafpF:ref
Reply all
Reply to author
Forward
0 new messages