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='v4', 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()[source]

Retrieve connection to Campaign Manager.

delete_report(profile_id, report_id)[source]

Delete a report by its ID.

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

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

insert_report(profile_id, report)[source]

Create a report.

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

  • report (dict[str, Any]) – The report resource to be inserted.

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

Retrieve list of reports.

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

  • max_results (int | None) – Maximum number of results to return.

  • scope (str | None) – The scope that defines which results are returned.

  • sort_field (str | None) – The field by which to sort the list.

  • sort_order (str | None) – Order of sorted results.

patch_report(profile_id, report_id, update_mask)[source]

Update 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(profile_id, report_id, synchronous=None)[source]

Run a report.

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

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

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

update_report(profile_id, report_id)[source]

Update a report.

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

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

get_report(file_id, profile_id, report_id)[source]

Retrieve 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(file_id, profile_id, report_id)[source]

Retrieve 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(profile_id, conversions, encryption_entity_type, encryption_entity_id, encryption_source, max_failed_inserts=0)[source]

Insert 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/rest/v4/conversions/batchinsert

  • 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(profile_id, conversions, encryption_entity_type, encryption_entity_id, encryption_source, max_failed_updates=0)[source]

Update 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/rest/v4/conversions/batchupdate

  • 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?