start_query {adsDataHubR} | R Documentation |
start_query
Description
Starts execution on a stored analysis query. The results will be written to the specified BigQuery destination table. The returned operation name can be used to poll for query completion status.. Reference: <https://developers.google.com/ads-data-hub/reference/rest/v1/customers.analysisQueries/start>
Usage
start_query(
query_name,
ads_data_customer_id,
bq_destination_table,
start_date,
end_date,
token
)
Arguments
query_name |
e.g. customers/123/analysisQueries/abcd1234' |
ads_data_customer_id |
#Enter the "From" ADH account on which we want to run the query |
bq_destination_table |
BigQuery destination table ID e.g. "project.dataset.table_name" If specified, the project must be explicitly whitelisted for the customer's ADH account. If project is not specified, uses default project for the provided customer. If neither project nor dataset is specified, uses the default project and dataset. |
start_date |
Start Date e.g. 2021-01-31 format: YYYY-MM-DD |
end_date |
End Date e.g. 2021-01-31 format: YYYY-MM-DD |
token |
Access token retrived from function google_auth() |
Value
If successful, the response body contains an instance of the submitted job.
Examples
## Not run:
library(adsDataHubR)
token <- google_auth(client_id = client_id, client_secret=client_secret)
start_query(query_name, ads_data_customer_id, bq_destination_table, start_date, end_date, token)
## End(Not run)