airflow.providers.google.marketing_platform.hooks.search_ads¶
This module contains Google Search Ads 360 hook.
Classes¶
Hook for the Google Search Ads 360 Reporting API. |
|
Hook for Google Search Ads 360. |
Module Contents¶
- class airflow.providers.google.marketing_platform.hooks.search_ads.GoogleSearchAdsReportingHook(api_version=None, gcp_conn_id='google_search_ads_default', **kwargs)[source]¶
Bases:
airflow.providers.google.common.hooks.base_google.GoogleBaseHook
Hook for the Google Search Ads 360 Reporting API.
- search(customer_id, query, page_token=None, page_size=10000, return_total_results_count=False, summary_row_setting=None, validate_only=False)[source]¶
Search and download the report. Use pagination to download entire report.
- Parameters:
customer_id (str) – The ID of the customer being queried.
query (str) – The query to execute.
page_token (str | None) – Token of the page to retrieve. If not specified, the first page of results will be returned. Use the value obtained from next_page_token in the previous response in order to request the next page of results.
page_size (int) – Number of elements to retrieve in a single page. When too large a page is requested, the server may decide to further limit the number of returned resources. Default is 10000.
return_total_results_count (bool) – If true, the total number of results that match the query ignoring the LIMIT clause will be included in the response. Default is false.
summary_row_setting (str | None) – Determines whether a summary row will be returned. By default, summary row is not returned. If requested, the summary row will be sent in a response by itself after all others query results are returned.
validate_only (bool) – If true, the request is validated but not executed. Default is false.
- get_custom_column(customer_id, custom_column_id)[source]¶
Retrieve the requested custom column in full detail.
- list_custom_columns(customer_id)[source]¶
Retrieve all the custom columns associated with the customer in full detail.
- Parameters:
customer_id (str) – The customer id
- get_field(field_name)[source]¶
Retrieve the requested field details.
- Parameters:
field_name (str) – The name of the field.
- search_fields(query, page_token=None, page_size=10000)[source]¶
Retrieve all the fields that match with the given search.
- Parameters:
query (str) – The query string to execute.
page_token (str | None) – Token of the page to retrieve. If not specified, the first page of results will be returned. Use the value obtained from next_page_token in the previous response in order to request the next page of results.
page_size (int | None) – Number of elements to retrieve in a single page. When too large a page is requested, the server may decide to further limit the number of returned resources. Default 10000.
- class airflow.providers.google.marketing_platform.hooks.search_ads.GoogleSearchAdsHook(api_version='v2', gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.common.hooks.base_google.GoogleBaseHook
Hook for Google Search Ads 360.