Good Morning, we can't access the Data that is supposed to be in the table *per_store_view*. We don't get an error but an empty iterator which should not happen as the selected customer_id has around 100 campaigns and some of them have store visits in the per *per store report* in Google Ads
Using the common python script ( https://github.com/googleads/google-ads-python) we receive Data for the query 1) but not for 2) . Any Idea what we do wrong or did anyone get any data at all yet? Thanks in advance Yvonne i.A. moebel.de *1) *query_campaign = f""" SELECT campaign.id, campaign.name, campaign.start_date FROM campaign order by campaign.start_date desc LIMIT 10 """ # HAS DATA *2 )* query_store_visit = f""" SELECT per_store_view.resource_name FROM per_store_view WHERE segments.year = 2022 """ # HAS NO DATA -- -- =~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ 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 adwords-api@googlegroups.com To unsubscribe from this group, send email to adwords-api+unsubscr...@googlegroups.com 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 "Google Ads API and AdWords API Forum" group. To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/53a4e2d2-cbb3-466c-bd5f-c88d132f3fcen%40googlegroups.com.
import argparse import sys from google.ads.googleads.client import GoogleAdsClient from google.ads.googleads.errors import GoogleAdsException _DEFAULT_PAGE_SIZE = 1000 def main(client, customer_id, page_size): ga_service = client.get_service("GoogleAdsService") print(ga_service) query_campaign = f""" SELECT campaign.id, campaign.name, campaign.start_date FROM campaign order by campaign.start_date desc LIMIT 10 """ # HAS DATA query_store_visit = f""" SELECT per_store_view.resource_name FROM per_store_view """ # HAS NO DATA :( query_store_visit_2 = f""" SELECT per_store_view.place_id, per_store_view.resource_name, campaign.end_date, campaign.campaign_group FROM per_store_view """ # ALSO NO DATA :( # Retrieves a google.api_core.page_iterator.GRPCIterator instance # initialized with the specified request parameters. request = client.get_type("SearchGoogleAdsRequest") request.customer_id = customer_id request.query = query_store_visit # request.query = query_campaign request.page_size = page_size print(request) iterator = ga_service.search(request=request) # Iterates over all rows in all pages and prints the requested field # values for the campaigns and labels in each row. The results include # the campaign and label objects because these were included in the # search criteria. for i, row in enumerate(iterator): print(row) if __name__ == "__main__": # GoogleAdsClient will read the google-ads.yaml configuration file in the # home directory if none is specified. googleads_client = GoogleAdsClient.load_from_storage(version="v12") parser = argparse.ArgumentParser( description="toDo" ) # The following argument(s) should be provided to run the example. parser.add_argument( "-c", "--customer_id", type=str, required=True, help="The Google Ads customer ID.", ) args = parser.parse_args() try: main( googleads_client, args.customer_id, _DEFAULT_PAGE_SIZE, ) print('Try Done') except GoogleAdsException as ex: print( f'Request with ID "{ex.request_id}" failed with status ' f'"{ex.error.code().name}" and includes the following errors:' ) for error in ex.failure.errors: print(f'\tError with message "{error.message}".') if error.location: for field_path_element in error.location.field_path_elements: print(f"\t\tOn field: {field_path_element.field_name}") sys.exit(1)