segments.date is cause of empty response

39 views
Skip to first unread message

Max Khlystov

unread,
Jan 29, 2020, 10:08:22 AM1/29/20
to AdWords API and Google Ads API Forum
Hello I have two queries:
```
SELECT
  customer.id,
  campaign.id,
  campaign.name,
  campaign_budget.amount_micros,
  campaign.advertising_channel_type,
  campaign.advertising_channel_sub_type,
  campaign.status,
  campaign.serving_status,
  campaign.start_date,
  campaign.end_date,
  metrics.conversions,
  metrics.clicks,
  metrics.impressions,
  metrics.cost_micros, segments.date 
FROM
  campaign 
WHERE
  segments.date DURING LAST_MONTH 
LIMIT 50
```
and next one the same but with **segments.date** in select statement
```
SELECT
  **segments.date**,
  customer.id,
  campaign.id,
  campaign.name,
  campaign_budget.amount_micros,
  campaign.advertising_channel_type,
  campaign.advertising_channel_sub_type,
  campaign.status,
  campaign.serving_status,
  campaign.start_date,
  campaign.end_date,
  metrics.conversions,
  metrics.clicks,
  metrics.impressions,
  metrics.cost_micros, segments.date 
FROM
  campaign 
WHERE
  segments.date DURING LAST_MONTH 
LIMIT 50
```
First one - works well
Last one - empty response, debug information

> [2020-01-29T17:39:23.079962+03:00] google-ads.INFO: Request made: Host: "googleads.googleapis.com", Method: "/google.ads.googleads.v2.services.GoogleAdsService/Search", ClientCustomerId: *******, RequestId: "6T8N7tmWvCs9wP6Ze0RVkg", IsFault: 0, FaultMessage: "None" 

 I am using v3.0.0

Thank you!

Google Ads API Forum Advisor Prod

unread,
Jan 30, 2020, 1:10:33 PM1/30/20
to max.kh...@gmail.com, adwor...@googlegroups.com

Hello Max,

Thank you for writing to us. I took a closer look at the shared queries and observed that the first query also includes the segments.date field and is correctly specified which is why it is working perfectly well. However, with the second query you have incorrectly specified "segments.date" twice. Could you please modify this on your end and retry the request? You could also use the Interactive Query Builder to generate the report query to make calls against the API. If the issue persists, could you please share the complete report query along with the client customer id for further investigation?

P.S. Please use Reply privately to author option while sharing the details.

Regards,
Nikisha Patel, Google Ads API Team



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