airflow.providers.google.marketing_platform.operators.bid_manager¶
This module contains operators for Bid Manager API part of the Google Display & Video 360.
Classes¶
Creates a query. |
|
Runs a stored query to generate a report. |
|
Deletes a stored query as well as the associated stored reports. |
|
Retrieves a stored query. |
Module Contents¶
- class airflow.providers.google.marketing_platform.operators.bid_manager.GoogleBidManagerCreateQueryOperator(*, body, api_version='v2', gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.version_compat.BaseOperatorCreates a query.
See also
For more information on how to use this operator, take a look at the guide: Creating a Query
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.
impersonation_chain (str | collections.abc.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 the first account from the list granting this role to the originating account (templated).
- template_fields: collections.abc.Sequence[str] = ('body', 'impersonation_chain')[source]¶
- template_ext: collections.abc.Sequence[str] = ('.json',)[source]¶
- class airflow.providers.google.marketing_platform.operators.bid_manager.GoogleBidManagerRunQueryOperator(*, query_id, parameters=None, api_version='v2', gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.version_compat.BaseOperatorRuns 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:
query_id (str) – Query 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.
impersonation_chain (str | collections.abc.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: collections.abc.Sequence[str] = ('query_id', 'parameters', 'impersonation_chain')[source]¶
- class airflow.providers.google.marketing_platform.operators.bid_manager.GoogleBidManagerDeleteQueryOperator(*, query_id, api_version='v2', gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.version_compat.BaseOperatorDeletes 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 Query
See also
Check also the official API docs: https://developers.google.com/bid-manager/v2/queries/delete
- Parameters:
query_id (str) – Query ID 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.
impersonation_chain (str | collections.abc.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: collections.abc.Sequence[str] = ('query_id', 'impersonation_chain')[source]¶
- class airflow.providers.google.marketing_platform.operators.bid_manager.GoogleBidManagerDownloadReportOperator(*, 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', impersonation_chain=None, **kwargs)[source]¶
Bases:
airflow.providers.google.version_compat.BaseOperatorRetrieves 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.
query_id (str) – Query ID for which report was generated..
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.
impersonation_chain (str | collections.abc.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: collections.abc.Sequence[str] = ('query_id', 'report_id', 'bucket_name', 'report_name', 'impersonation_chain')[source]¶