tests.system.google.marketing_platform.example_display_video

Example Airflow DAG that shows how to use DisplayVideo.

In order to run this test, make sure you followed steps: 1. In your GCP project, create a service account that will be used to operate on Google Ads. The name should be in format display-video-service-account@{PROJECT_ID}.iam.gserviceaccount.com 2. Generate a key for this service account and store it in the Secret Manager under the name google_display_video_service_account_key. 3. Give this service account Editor permissions. 4. Make sure Google Display Video API is enabled in your GCP project. 5. Login to https://displayvideo.google.com/ 6. In the Users section add your GCP service account to the list. 7. Store values of your advertiser id and GMP partner id to Secret Manager under names google_display_video_advertiser_id and google_display_video_gmp_partner_id.

Attributes

DAG_ID

ENV_ID

PROJECT_ID

BUCKET_NAME

OBJECT_NAME

PATH_TO_UPLOAD_FILE

BUCKET_FILE_LOCATION

IS_COMPOSER

CONNECTION_TYPE

CONN_ID

DISPLAY_VIDEO_ADVERTISER_ID

DISPLAY_VIDEO_GMP_PARTNER_ID

DISPLAY_VIDEO_SERVICE_ACCOUNT_KEY

ADVERTISER_ID

GMP_PARTNER_ID

SDF_VERSION

BQ_DATASET

ENTITY_TYPE

ERF_SOURCE_OBJECT

CREATE_SDF_DOWNLOAD_TASK_BODY_REQUEST

test_run

Functions

get_display_video_advertiser_id()

Module Contents

tests.system.google.marketing_platform.example_display_video.DAG_ID = 'display_video'[source]
tests.system.google.marketing_platform.example_display_video.ENV_ID[source]
tests.system.google.marketing_platform.example_display_video.PROJECT_ID[source]
tests.system.google.marketing_platform.example_display_video.BUCKET_NAME[source]
tests.system.google.marketing_platform.example_display_video.OBJECT_NAME = 'files/report.csv'[source]
tests.system.google.marketing_platform.example_display_video.PATH_TO_UPLOAD_FILE[source]
tests.system.google.marketing_platform.example_display_video.BUCKET_FILE_LOCATION[source]
tests.system.google.marketing_platform.example_display_video.IS_COMPOSER[source]
tests.system.google.marketing_platform.example_display_video.CONNECTION_TYPE = 'google_cloud_platform'[source]
tests.system.google.marketing_platform.example_display_video.CONN_ID = 'google_display_video_default'[source]
tests.system.google.marketing_platform.example_display_video.DISPLAY_VIDEO_ADVERTISER_ID = 'google_display_video_advertiser_id'[source]
tests.system.google.marketing_platform.example_display_video.DISPLAY_VIDEO_GMP_PARTNER_ID = 'google_display_video_gmp_partner_id'[source]
tests.system.google.marketing_platform.example_display_video.DISPLAY_VIDEO_SERVICE_ACCOUNT_KEY = 'google_display_video_service_account_key'[source]
tests.system.google.marketing_platform.example_display_video.ADVERTISER_ID = "{{ task_instance.xcom_pull('get_display_video_advertiser_id') }}"[source]
tests.system.google.marketing_platform.example_display_video.GMP_PARTNER_ID = "{{ task_instance.xcom_pull('get_display_video_gmp_partner_id') }}"[source]
tests.system.google.marketing_platform.example_display_video.SDF_VERSION = 'SDF_VERSION_9'[source]
tests.system.google.marketing_platform.example_display_video.BQ_DATASET[source]
tests.system.google.marketing_platform.example_display_video.ENTITY_TYPE = 'CAMPAIGN'[source]
tests.system.google.marketing_platform.example_display_video.ERF_SOURCE_OBJECT[source]
tests.system.google.marketing_platform.example_display_video.CREATE_SDF_DOWNLOAD_TASK_BODY_REQUEST: dict[source]
tests.system.google.marketing_platform.example_display_video.get_display_video_advertiser_id()[source]
tests.system.google.marketing_platform.example_display_video.test_run[source]

Was this entry helpful?