I have trouble to get the correct results from the new API, and it looks like there is something wrong with segments.
I try to get the following test query working:
SELECT
campaign.id,
campaign.name,customer.time_zone,customer.currency_code,segments.date,segments.device,segments.ad_network_type,metrics.cost_micros,metrics.impressions,metrics.clicks,metrics.video_views,metrics.video_view_rate FROM campaign WHERE
campaign.id IN (1028553832,765307360,914618535) AND segments.date BETWEEN '2021-09-23' AND '2021-09-24'
An empty result is returned as following
{
"fieldMask": "
campaign.id,
campaign.name,customer.timeZone,customer.currencyCode,segments.date,segments.device,segments.adNetworkType,metrics.costMicros,metrics.impressions,metrics.clicks,metrics.videoViews,metrics.videoViewRate"
}
I have verified the productive campaign report with Google Adwords, and there are valid records with given parameter.
I also run a test with reduced number of attributes, and it works with relevant records showing up in the response.
SELECT
campaign.id,
campaign.name, campaign.start_date,campaign.end_date, customer.time_zone, metrics.impressions FROM campaign WHERE
campaign.id IN (1028553832,765307360,914618535) AND segments.date BETWEEN '2021-09-23' AND '2021-09-24'
I am aware that once segments related attributes are added to the select condition, the result will always be empty. Is there something I missed with the query or there is an known issue with segments?
Best regards,
Wanling