How we can execute all the analysis queries for Ads data hub using API in python as I am able to run single query but data is not saving in Daaset
Added a service account created for this run into Ads data hub Interface user as Super User
I am trying to run all the queries for a customer using API
I tried running a single query using below method
queries=service.customers().analysisQueries().start(
name='customer_name',
body={
'spec': {
'adsDataCustomerId': '',
'timeZone': 'UTC',
'startDate': {'year': 2022, 'month': 12, 'day': 1},
'endDate': {'year': 2022, 'month': 12, 'day': 12},
},
'destTable' : 'projectName.datasetName.Table'
}
).execute()
After running these queries I am getting response as querymetadata as below
{"name": "": {"@type": "type.googleapis.com/google.ads.adsdatahub.v1.QueryMetadata", "queryResourceName": "", "queryTitle": "title of the query", "customerId": "customerId", "adsDataCustomerId": "adsdatacustomerId", "matchDataCustomerId": "", "parameterValues": {"start_date": {"value": ""}, "end_date": {"value": ""}, "time_zone": {"value": "UTC"}}, "startTime": "", "endTime": "", "destTable": ""}}
But data is not saving in Big query data set
you can run service.customers().analysisQueries().list(parent=customer_name).execute() to get the queryID of all your stored queries.