airflow.providers.google.marketing_platform.hooks.campaign_manager

This module contains Google Campaign Manager hook.

Module Contents

Classes

GoogleCampaignManagerHook

Hook for Google Campaign Manager.

class airflow.providers.google.marketing_platform.hooks.campaign_manager.GoogleCampaignManagerHook(api_version='v3.3', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None)[source]

Bases: airflow.providers.google.common.hooks.base_google.GoogleBaseHook

Hook for Google Campaign Manager.

get_conn(self)[source]

Retrieves connection to Campaign Manager.

delete_report(self, profile_id, report_id)[source]

Deletes a report by its ID.

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

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

insert_report(self, profile_id, report)[source]

Creates a report.

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

  • report (Dict[str, Any]) -- The report resource to be inserted.

list_reports(self, profile_id, max_results=None, scope=None, sort_field=None, sort_order=None)[source]

Retrieves list of reports.

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

  • max_results (Optional[int]) -- Maximum number of results to return.

  • scope (Optional[str]) -- The scope that defines which results are returned.

  • sort_field (Optional[str]) -- The field by which to sort the list.

  • sort_order (Optional[str]) -- Order of sorted results.

patch_report(self, profile_id, report_id, update_mask)[source]

Updates a report. This method supports patch semantics.

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

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

  • update_mask (dict) -- The relevant portions of a report resource, according to the rules of patch semantics.

run_report(self, profile_id, report_id, synchronous=None)[source]

Runs a report.

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

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

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

update_report(self, profile_id, report_id)[source]

Updates a report.

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

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

get_report(self, file_id, profile_id, report_id)[source]

Retrieves a report file.

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.

get_report_file(self, file_id, profile_id, report_id)[source]

Retrieves a media part of report file.

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.

Returns

googleapiclient.http.HttpRequest

Return type

googleapiclient.http.HttpRequest

conversions_batch_insert(self, profile_id, conversions, encryption_entity_type, encryption_entity_id, encryption_source, max_failed_inserts=0)[source]

Inserts 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

conversions_batch_update(self, profile_id, conversions, encryption_entity_type, encryption_entity_id, encryption_source, max_failed_updates=0)[source]

Updates existing 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

Was this entry helpful?