Hi Nicholas,
I tried your GAQL queries using my test account and both are working
correctly. The Deadline Exceeded error 504 that you are encountering might
be due to the volume of data you are retrieving when using the *week*
segment.
I would recommend that you break down your report request by adding
predicates or by just using the *date* segment to avoid this error.
Thanks and regards,
Peter
Google Ads API Team
On 04/23/19 05:50:08 [email protected] wrote:
To whom it may concern,
*What is the issue in my code or is there a way to extend the
deadline/timeout?*
I am trying to run a user location report by clicks,cost for Country:USA by
states for 1 week.
When I try to run a geographic view reports for clicks, cost by region by 1
week with the following code I receive a *deadline 504 error*, but I run
the same code for no regions and 1 day it works in 2 seconds.
See attached python scripts and code below for reference.
'''SELECT
segments.geo_target_region,
metrics.clicks,
metrics.cost_micros
FROM
geographic_view
WHERE
customer.id = XXXXXXXXXXX
AND geographic_view.country_geo_target_constant =
'geoTargetConstants/2840'
AND geographic_view.location_type = 'LOCATION_OF_PRESENCE'
AND segments.week = '2019-04-15'
ORDER BY metrics.clicks DESC
LIMIT
100'''
Even when I try to run the attached code for a week, I still receive a *504
deadline error*.
'''SELECT
metrics.clicks,
metrics.cost_micros
FROM
geographic_view
WHERE
customer.id = XXXXXXXXXX
AND geographic_view.country_geo_target_constant =
'geoTargetConstants/2840'
AND geographic_view.location_type = 'LOCATION_OF_PRESENCE'
AND segments.week = '2019-04-15'
ORDER BY metrics.clicks DESC
LIMIT
100'''
But I can run the following code without issue and it takes 2 seconds.
'''SELECT
metrics.clicks,
metrics.cost_micros
FROM
geographic_view
WHERE
customer.id = XXXXX
AND geographic_view.country_geo_target_constant =
'geoTargetConstants/2840'
AND geographic_view.location_type = 'LOCATION_OF_PRESENCE'
AND segments.date = '2019-04-15'
ORDER BY metrics.clicks DESC
LIMIT
100'''
*python package version*: google-ads 1.3.1
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/08697597-a5b9-40e0-8df5-78a6e56a02b3%40googlegroups.com
<https://groups.google.com/d/msgid/adwords-api/08697597-a5b9-40e0-8df5-78a6e56a02b3%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/18vjbjo000000000o22m68003he6q0w6gmjge9l6go30c1g68r30dpo%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.