Airflow Summit 2025 is coming October 07-09. Register now to secure your spot!

Google Display & Video 360 Operators

Google Display & Video 360 has the end-to-end campaign management features you need.

Prerequisite Tasks

To use these operators, you must do a few things:

Create SDF download task

To create SDF download task use GoogleDisplayVideo360CreateSDFDownloadTaskOperator.

tests/system/google/marketing_platform/example_display_video.py[source]

create_sdf_download_task = GoogleDisplayVideo360CreateSDFDownloadTaskOperator(
    task_id="create_sdf_download_task",
    body_request=CREATE_SDF_DOWNLOAD_TASK_BODY_REQUEST,
    gcp_conn_id=CONN_ID,
)
operation_name = '{{ task_instance.xcom_pull("create_sdf_download_task")["name"] }}'

Use Jinja templating with body_request, impersonation_chain parameters which allow you to dynamically determine values.

Save SDF files in the Google Cloud Storage

To save SDF files and save them in the Google Cloud Storage use GoogleDisplayVideo360SDFtoGCSOperator.

tests/system/google/marketing_platform/example_display_video.py[source]

save_sdf_in_gcs = GoogleDisplayVideo360SDFtoGCSOperator(
    task_id="save_sdf_in_gcs",
    operation_name=operation_name,
    bucket_name=BUCKET_NAME,
    object_name=BUCKET_FILE_LOCATION,
    gzip=False,
    gcp_conn_id=CONN_ID,
)

Use Jinja templating with operation_name, bucket_name, object_name, impersonation_chain parameters which allow you to dynamically determine values.

Waiting for SDF operation

Wait for SDF operation is executed by: GoogleDisplayVideo360GetSDFDownloadOperationSensor.

tests/system/google/marketing_platform/example_display_video.py[source]

wait_for_operation = GoogleDisplayVideo360GetSDFDownloadOperationSensor(
    task_id="wait_for_operation", operation_name=operation_name, gcp_conn_id=CONN_ID
)

Use Jinja templating with operation_name, impersonation_chain parameters which allow you to dynamically determine values.

Was this entry helpful?