| :py:mod:`airflow.providers.google.marketing_platform.operators.search_ads` |
| ========================================================================== |
| |
| .. py:module:: airflow.providers.google.marketing_platform.operators.search_ads |
| |
| .. autoapi-nested-parse:: |
| |
| This module contains Google Search Ads operators. |
| |
| |
| |
| Module Contents |
| --------------- |
| |
| Classes |
| ~~~~~~~ |
| |
| .. autoapisummary:: |
| |
| airflow.providers.google.marketing_platform.operators.search_ads.GoogleSearchAdsInsertReportOperator |
| airflow.providers.google.marketing_platform.operators.search_ads.GoogleSearchAdsDownloadReportOperator |
| |
| |
| |
| |
| .. py:class:: GoogleSearchAdsInsertReportOperator(*, report, api_version = 'v2', gcp_conn_id = 'google_cloud_default', delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Inserts a report request into the reporting system. |
| |
| .. seealso: |
| For API documentation check: |
| https://developers.google.com/search-ads/v2/reference/reports/request |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:GoogleSearchAdsInsertReportOperator` |
| |
| :param report: Report to be generated |
| :param api_version: The version of the api that will be requested for example 'v3'. |
| :param gcp_conn_id: The connection ID to use when fetching connection info. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['report', 'impersonation_chain'] |
| |
| |
| |
| .. py:attribute:: template_ext |
| :annotation: :Sequence[str] = ['.json'] |
| |
| |
| |
| .. py:method:: prepare_template(self) |
| |
| Hook triggered after the templated fields get replaced by their content. |
| |
| If you need your operator to alter the content of the file before the |
| template is rendered, it should override this method to do so. |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |
| .. py:class:: GoogleSearchAdsDownloadReportOperator(*, report_id, bucket_name, report_name = None, gzip = True, chunk_size = 10 * 1024 * 1024, api_version = 'v2', gcp_conn_id = 'google_cloud_default', delegate_to = None, impersonation_chain = None, **kwargs) |
| |
| Bases: :py:obj:`airflow.models.BaseOperator` |
| |
| Downloads a report to GCS bucket. |
| |
| .. seealso: |
| For API documentation check: |
| https://developers.google.com/search-ads/v2/reference/reports/getFile |
| |
| .. seealso:: |
| For more information on how to use this operator, take a look at the guide: |
| :ref:`howto/operator:GoogleSearchAdsGetfileReportOperator` |
| |
| :param report_id: ID of the report. |
| :param bucket_name: The bucket to upload to. |
| :param report_name: The report name to set when uploading the local file. If not provided then |
| report_id is used. |
| :param gzip: Option to compress local file or file data for upload |
| :param api_version: The version of the api that will be requested for example 'v3'. |
| :param gcp_conn_id: The connection ID to use when fetching connection info. |
| :param delegate_to: The account to impersonate using domain-wide delegation of authority, |
| if any. For this to work, the service account making the request must have |
| domain-wide delegation enabled. |
| :param impersonation_chain: Optional service account to impersonate using short-term |
| credentials, or chained list of accounts required to get the access_token |
| of the last account in the list, which will be impersonated in the request. |
| If set as a string, the account must grant the originating account |
| the Service Account Token Creator IAM role. |
| If set as a sequence, the identities from the list must grant |
| Service Account Token Creator IAM role to the directly preceding identity, with first |
| account from the list granting this role to the originating account (templated). |
| |
| .. py:attribute:: template_fields |
| :annotation: :Sequence[str] = ['report_name', 'report_id', 'bucket_name', 'impersonation_chain'] |
| |
| |
| |
| .. py:method:: execute(self, context) |
| |
| This is the main method to derive when creating an operator. |
| Context is the same dictionary used as when rendering jinja templates. |
| |
| Refer to get_template_context for more context. |
| |
| |
| |