airflow.providers.google.marketing_platform.operators.display_video

This module contains Google DisplayVideo operators.

Module Contents

Classes

GoogleDisplayVideo360CreateQueryOperator

Creates a query.

GoogleDisplayVideo360DeleteReportOperator

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

GoogleDisplayVideo360DownloadReportV2Operator

Retrieves a stored query.

GoogleDisplayVideo360RunQueryOperator

Runs a stored query to generate a report.

GoogleDisplayVideo360DownloadLineItemsOperator

Retrieves line items in CSV format.

GoogleDisplayVideo360UploadLineItemsOperator

Uploads line items in CSV format.

GoogleDisplayVideo360CreateSDFDownloadTaskOperator

Creates SDF operation task.

GoogleDisplayVideo360SDFtoGCSOperator

Download SDF media and save it in the Google Cloud Storage.

class airflow.providers.google.marketing_platform.operators.display_video.GoogleDisplayVideo360CreateQueryOperator(*, body, api_version='v2', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Creates a query.

See also

For more information on how to use this operator, take a look at the guide: GoogleDisplayVideo360CreateQueryOperator

See also

Check also the official API docs: https://developers.google.com/bid-manager/v2/queries/create

Parameters
  • body (dict[str, Any]) – Report object passed to the request’s body as described here: https://developers.google.com/bid-manager/v2/queries#Query

  • api_version (str) – The version of the api that will be requested for example ‘v3’.

  • gcp_conn_id (str) – The connection ID to use when fetching connection info.

  • delegate_to (str | None) – The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.

  • impersonation_chain (str | Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: Sequence[str] = ('body', 'impersonation_chain')[source]
template_ext: Sequence[str] = ('.json',)[source]
prepare_template()[source]

Execute after the templated fields get replaced by their content.

If you need your object to alter the content of the file before the template is rendered, it should override this method to do so.

execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.marketing_platform.operators.display_video.GoogleDisplayVideo360DeleteReportOperator(*, report_id=None, report_name=None, api_version='v2', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

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

See also

For more information on how to use this operator, take a look at the guide: Deleting a report

See also

Check also the official API docs: https://developers.google.com/bid-manager/v2/queries/delete

Parameters
  • report_id (str | None) – Report ID to delete.

  • report_name (str | None) – Name of the report to delete.

  • api_version (str) – The version of the api that will be requested for example ‘v3’.

  • gcp_conn_id (str) – The connection ID to use when fetching connection info.

  • delegate_to (str | None) – The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.

  • impersonation_chain (str | Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: Sequence[str] = ('report_id', 'impersonation_chain')[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.marketing_platform.operators.display_video.GoogleDisplayVideo360DownloadReportV2Operator(*, query_id, report_id, bucket_name, report_name=None, gzip=True, chunk_size=10 * 1024 * 1024, api_version='v2', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Retrieves a stored query.

See also

For more information on how to use this operator, take a look at the guide: Downloading a report

See also

Check also the official API docs: https://developers.google.com/bid-manager/v2/queries/get

Parameters
  • report_id (str) – Report ID to retrieve.

  • bucket_name (str) – The bucket to upload to.

  • report_name (str | None) – The report name to set when uploading the local file.

  • chunk_size (int) – File will be downloaded in chunks of this many bytes.

  • gzip (bool) – Option to compress local file or file data for upload

  • api_version (str) – The version of the api that will be requested for example ‘v3’.

  • gcp_conn_id (str) – The connection ID to use when fetching connection info.

  • delegate_to (str | None) – The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.

  • impersonation_chain (str | Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: Sequence[str] = ('query_id', 'report_id', 'bucket_name', 'report_name', 'impersonation_chain')[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.marketing_platform.operators.display_video.GoogleDisplayVideo360RunQueryOperator(*, query_id, parameters=None, api_version='v2', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Runs a stored query to generate a report.

See also

For more information on how to use this operator, take a look at the guide: Run Query

See also

Check also the official API docs: https://developers.google.com/bid-manager/v2/queries/run

Parameters
  • report_id – Report ID to run.

  • parameters (dict[str, Any] | None) – Parameters for running a report as described here: https://developers.google.com/bid-manager/v2/queries/run

  • api_version (str) – The version of the api that will be requested for example ‘v3’.

  • gcp_conn_id (str) – The connection ID to use when fetching connection info.

  • delegate_to (str | None) – The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.

  • impersonation_chain (str | Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: Sequence[str] = ('query_id', 'parameters', 'impersonation_chain')[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.marketing_platform.operators.display_video.GoogleDisplayVideo360DownloadLineItemsOperator(*, request_body, bucket_name, object_name, gzip=False, api_version='v1.1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Retrieves line items in CSV format.

See also

For more information on how to use this operator, take a look at the guide: Downloading Line Items

See also

Check also the official API docs: https://developers.google.com/bid-manager/v1.1/lineitems/downloadlineitems

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

template_fields: Sequence[str] = ('request_body', 'bucket_name', 'object_name', 'impersonation_chain')[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.marketing_platform.operators.display_video.GoogleDisplayVideo360UploadLineItemsOperator(*, bucket_name, object_name, api_version='v1.1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Uploads line items in CSV format.

See also

For more information on how to use this operator, take a look at the guide: Upload line items

See also

Check also the official API docs: https://developers.google.com/bid-manager/v1.1/lineitems/uploadlineitems

Parameters
  • request_body – request to upload line items.

  • bucket_name (str) – The bucket form data is downloaded.

  • object_name (str) – The object to fetch.

  • filename – The filename to fetch.

  • dry_run – Upload status without actually persisting the line items.

template_fields: Sequence[str] = ('bucket_name', 'object_name', 'impersonation_chain')[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.marketing_platform.operators.display_video.GoogleDisplayVideo360CreateSDFDownloadTaskOperator(*, body_request, api_version='v1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Creates SDF operation task.

See also

For more information on how to use this operator, take a look at the guide: Create SDF download task

See also

Check also the official API docs: https://developers.google.com/display-video/api/reference/rest

Parameters
  • version – The SDF version of the downloaded file.

  • partner_id – The ID of the partner to download SDF for.

  • advertiser_id – The ID of the advertiser to download SDF for.

  • parent_entity_filter – Filters on selected file types.

  • id_filter – Filters on entities by their entity IDs.

  • inventory_source_filter – Filters on Inventory Sources by their IDs.

  • gcp_conn_id (str) – The connection ID to use when fetching connection info.

  • delegate_to (str | None) – The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.

  • impersonation_chain (str | Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: Sequence[str] = ('body_request', 'impersonation_chain')[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.marketing_platform.operators.display_video.GoogleDisplayVideo360SDFtoGCSOperator(*, operation_name, bucket_name, object_name, gzip=False, api_version='v1', gcp_conn_id='google_cloud_default', delegate_to=None, impersonation_chain=None, **kwargs)[source]

Bases: airflow.models.BaseOperator

Download SDF media and save it in the Google Cloud Storage.

See also

For more information on how to use this operator, take a look at the guide: Save SDF files in the Google Cloud Storage

See also

Check also the official API docs: https://developers.google.com/display-video/api/reference/rest

Parameters
  • version – The SDF version of the downloaded file.

  • partner_id – The ID of the partner to download SDF for.

  • advertiser_id – The ID of the advertiser to download SDF for.

  • parent_entity_filter – Filters on selected file types.

  • id_filter – Filters on entities by their entity IDs.

  • inventory_source_filter – Filters on Inventory Sources by their IDs.

  • gcp_conn_id (str) – The connection ID to use when fetching connection info.

  • delegate_to (str | None) – The account to impersonate using domain-wide delegation of authority, if any. For this to work, the service account making the request must have domain-wide delegation enabled.

  • impersonation_chain (str | Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields: Sequence[str] = ('operation_name', 'bucket_name', 'object_name', 'impersonation_chain')[source]
execute(context)[source]

Derive when creating an operator.

Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?