airflow.providers.google.marketing_platform.operators.campaign_manager

This module contains Google CampaignManager operators.

Module Contents

class airflow.providers.google.marketing_platform.operators.campaign_manager.GoogleCampaignManagerDeleteReportOperator(*, profile_id: str, report_name: Optional[str] = None, report_id: Optional[str] = None, api_version: str = 'v3.3', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Deletes a report by its ID.

See also

For more information on how to use this operator, take a look at the guide: Deleting a report

Parameters
  • profile_id (str) -- The DFA user profile ID.

  • report_name (str) -- The name of the report to delete.

  • report_id (str) -- The ID of the report.

  • api_version (str) -- The version of the api that will be requested for example 'v3'.

  • gcp_conn_id (str) -- The connection ID to use when fetching connection info.

  • delegate_to (str) -- 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.

  • impersonation_chain (Union[str, Sequence[str]]) -- 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).

template_fields = ['profile_id', 'report_id', 'report_name', 'api_version', 'gcp_conn_id', 'delegate_to', 'impersonation_chain'][source]
execute(self, context: dict)[source]
class airflow.providers.google.marketing_platform.operators.campaign_manager.GoogleCampaignManagerDownloadReportOperator(*, profile_id: str, report_id: str, file_id: str, bucket_name: str, report_name: Optional[str] = None, gzip: bool = True, chunk_size: int = 10 * 1024 * 1024, api_version: str = 'v3.3', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Retrieves a report and uploads it to GCS bucket.

See also

For more information on how to use this operator, take a look at the guide: Downloading a report

Parameters
  • profile_id (str) -- The DFA user profile ID.

  • report_id (str) -- The ID of the report.

  • file_id (str) -- The ID of the report file.

  • bucket_name (str) -- The bucket to upload to.

  • report_name (str) -- The report name to set when uploading the local file.

  • gzip (bool) -- Option to compress local file or file data for upload

  • chunk_size (int) -- File will be downloaded in chunks of this many bytes.

  • api_version (str) -- The version of the api that will be requested for example 'v3'.

  • gcp_conn_id (str) -- The connection ID to use when fetching connection info.

  • delegate_to (str) -- 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.

  • impersonation_chain (Union[str, Sequence[str]]) -- 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).

template_fields = ['profile_id', 'report_id', 'file_id', 'bucket_name', 'report_name', 'chunk_size', 'api_version', 'gcp_conn_id', 'delegate_to', 'impersonation_chain'][source]
execute(self, context: dict)[source]
class airflow.providers.google.marketing_platform.operators.campaign_manager.GoogleCampaignManagerInsertReportOperator(*, profile_id: str, report: Dict[str, Any], api_version: str = 'v3.3', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Creates a report.

See also

For more information on how to use this operator, take a look at the guide: Inserting a new report

Parameters
  • profile_id (str) -- The DFA user profile ID.

  • report (Dict[str, Any]) -- Report to be created.

  • api_version (str) -- The version of the api that will be requested for example 'v3'.

  • gcp_conn_id (str) -- The connection ID to use when fetching connection info.

  • delegate_to (str) -- 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.

  • impersonation_chain (Union[str, Sequence[str]]) -- 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).

template_fields = ['profile_id', 'report', 'api_version', 'gcp_conn_id', 'delegate_to', 'impersonation_chain'][source]
template_ext = ['.json'][source]
prepare_template(self)[source]
execute(self, context: dict)[source]
class airflow.providers.google.marketing_platform.operators.campaign_manager.GoogleCampaignManagerRunReportOperator(*, profile_id: str, report_id: str, synchronous: bool = False, api_version: str = 'v3.3', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Runs a report.

See also

For more information on how to use this operator, take a look at the guide: Running a report

Parameters
  • profile_id (str) -- The DFA profile ID.

  • report_id (str) -- The ID of the report.

  • synchronous (bool) -- If set and true, tries to run the report synchronously.

  • api_version (str) -- The version of the api that will be requested for example 'v3'.

  • gcp_conn_id (str) -- The connection ID to use when fetching connection info.

  • delegate_to (str) -- 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.

  • impersonation_chain (Union[str, Sequence[str]]) -- 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).

template_fields = ['profile_id', 'report_id', 'synchronous', 'api_version', 'gcp_conn_id', 'delegate_to', 'impersonation_chain'][source]
execute(self, context: dict)[source]
class airflow.providers.google.marketing_platform.operators.campaign_manager.GoogleCampaignManagerBatchInsertConversionsOperator(*, profile_id: str, conversions: List[Dict[str, Any]], encryption_entity_type: str, encryption_entity_id: int, encryption_source: str, max_failed_inserts: int = 0, api_version: str = 'v3.3', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Inserts conversions.

See also

For more information on how to use this operator, take a look at the guide: Inserting a conversions

Parameters
  • profile_id (str) -- User profile ID associated with this request.

  • conversions (List[Dict[str, Any]]) -- Conversations to insert, should by type of Conversation: https://developers.google.com/doubleclick-advertisers/v3.3/conversions#resource

  • encryption_entity_type (str) -- The encryption entity type. This should match the encryption configuration for ad serving or Data Transfer.

  • encryption_entity_id (int) -- The encryption entity ID. This should match the encryption configuration for ad serving or Data Transfer.

  • encryption_source (str) -- Describes whether the encrypted cookie was received from ad serving (the %m macro) or from Data Transfer.

  • max_failed_inserts (int) -- The maximum number of conversions that failed to be inserted

  • api_version (str) -- The version of the api that will be requested for example 'v3'.

  • gcp_conn_id (str) -- The connection ID to use when fetching connection info.

  • delegate_to (str) -- 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.

  • impersonation_chain (Union[str, Sequence[str]]) -- 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).

template_fields = ['profile_id', 'conversions', 'encryption_entity_type', 'encryption_entity_id', 'encryption_source', 'impersonation_chain'][source]
execute(self, context: dict)[source]
class airflow.providers.google.marketing_platform.operators.campaign_manager.GoogleCampaignManagerBatchUpdateConversionsOperator(*, profile_id: str, conversions: List[Dict[str, Any]], encryption_entity_type: str, encryption_entity_id: int, encryption_source: str, max_failed_updates: int = 0, api_version: str = 'v3.3', gcp_conn_id: str = 'google_cloud_default', delegate_to: Optional[str] = None, impersonation_chain: Optional[Union[str, Sequence[str]]] = None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Updates existing conversions.

See also

For more information on how to use this operator, take a look at the guide: Updating a conversions

Parameters
  • profile_id (str) -- User profile ID associated with this request.

  • conversions (List[Dict[str, Any]]) -- Conversations to update, should by type of Conversation: https://developers.google.com/doubleclick-advertisers/v3.3/conversions#resource

  • encryption_entity_type (str) -- The encryption entity type. This should match the encryption configuration for ad serving or Data Transfer.

  • encryption_entity_id (int) -- The encryption entity ID. This should match the encryption configuration for ad serving or Data Transfer.

  • encryption_source (str) -- Describes whether the encrypted cookie was received from ad serving (the %m macro) or from Data Transfer.

  • max_failed_updates (int) -- The maximum number of conversions that failed to be updated

  • api_version (str) -- The version of the api that will be requested for example 'v3'.

  • gcp_conn_id (str) -- The connection ID to use when fetching connection info.

  • delegate_to (str) -- 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.

  • impersonation_chain (Union[str, Sequence[str]]) -- 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).

template_fields = ['profile_id', 'conversions', 'encryption_entity_type', 'encryption_entity_id', 'encryption_source', 'impersonation_chain'][source]
execute(self, context: dict)[source]

Was this entry helpful?