airflow.providers.google.marketing_platform.hooks.display_video

This module contains Google DisplayVideo hook.

Module Contents

Classes

GoogleDisplayVideo360Hook

Hook for Google Display & Video 360.

class airflow.providers.google.marketing_platform.hooks.display_video.GoogleDisplayVideo360Hook(api_version='v2', 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 Display & Video 360.

get_conn()[source]

Retrieve connection to DisplayVideo.

get_conn_to_display_video()[source]

Retrieve connection to DisplayVideo.

static erf_uri(partner_id, entity_type)[source]

Return URI for all Entity Read Files in bucket.

For example, if you were generating a file name to retrieve the entity read file for partner 123 accessing the line_item table from April 2, 2013, your filename would look something like this: gdbm-123/entity/20130402.0.LineItem.json

More information: https://developers.google.com/bid-manager/guides/entity-read/overview

:param partner_id The numeric ID of your Partner. :param entity_type: The type of file Partner, Advertiser, InsertionOrder, LineItem, Creative, Pixel, InventorySource, UserList, UniversalChannel, and summary.

create_query(query)[source]

Create a query.

Parameters

query (dict[str, Any]) – Query object to be passed to request body.

delete_query(query_id)[source]

Delete a stored query as well as the associated stored reports.

Parameters

query_id (str) – Query ID to delete.

get_query(query_id)[source]

Retrieve a stored query.

Parameters

query_id (str) – Query ID to retrieve.

list_queries()[source]

Retrieve stored queries.

run_query(query_id, params)[source]

Run a stored query to generate a report.

Parameters
  • query_id (str) – Query ID to run.

  • params (dict[str, Any] | None) – Parameters for the report.

get_report(query_id, report_id)[source]

Retrieve a report.

Parameters
  • query_id (str) – Query ID for which report was generated.

  • report_id (str) – Report ID to retrieve.

upload_line_items(line_items)[source]

Upload line items in CSV format.

Parameters

line_items (Any) – downloaded data from GCS and passed to the body request

Returns

response body.

Return type

list[dict[str, Any]]

download_line_items(request_body)[source]

Retrieve line items in CSV format.

Parameters

request_body (dict[str, Any]) – dictionary with parameters that should be passed into. More information about it can be found here: https://developers.google.com/bid-manager/v1.1/lineitems/downloadlineitems

create_sdf_download_operation(body_request)[source]

Create an SDF Download Task and Returns an Operation.

Parameters

body_request (dict[str, Any]) – Body request.

More information about body request n be found here: https://developers.google.com/display-video/api/reference/rest/v1/sdfdownloadtasks/create

get_sdf_download_operation(operation_name)[source]

Get the latest state of an asynchronous SDF download task operation.

Parameters

operation_name (str) – The name of the operation resource.

download_media(resource_name)[source]

Download media.

Parameters

resource_name (str) – of the media that is being downloaded.

Was this entry helpful?