airflow.providers.google.cloud.operators.life_sciences

与 Google Cloud Life Sciences 服务交互的 Operators。

LifeSciencesRunPipelineOperator

运行 Life Sciences Pipeline。

模块内容

class airflow.providers.google.cloud.operators.life_sciences.LifeSciencesRunPipelineOperator(*, body, location, project_id=PROVIDE_PROJECT_ID, gcp_conn_id='google_cloud_default', api_version='v2beta', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator

运行 Life Sciences Pipeline。

警告

此 Operator 已被弃用。请考虑改用 Google Cloud Batch Operators。Life Sciences API(beta 版)将于 2025 年 7 月 8 日停用,取而代之的是 Google Cloud Batch。

另请参阅

有关如何使用此 Operator 的更多信息,请参阅指南:运行 Pipeline

参数:
  • body (dict) – 请求体

  • location (str) – 项目所在区域

  • project_id (str) – Google Cloud 项目 ID;如果为 None,则使用默认项目 ID。

  • gcp_conn_id (str) – 用于连接到 Google Cloud 的连接 ID。

  • api_version (str) – 使用的 API 版本(例如 v2beta)。

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – 可选的服务帐号,用于使用短期凭据进行模拟;或者是一系列帐号链,需要获取列表中最后一个帐号的 access_token,该帐号将在请求中被模拟。如果设置为字符串,该帐号必须向原始帐号授予 Service Account Token Creator IAM 角色。如果设置为 sequence,列表中的身份必须向直接前一个身份授予 Service Account Token Creator IAM 角色,列表中第一个帐号向原始帐号授予此角色(模板化)。

template_fields: collections.abc.Sequence[str] = ('body', 'gcp_conn_id', 'api_version', 'impersonation_chain')[source]
body[source]
location[source]
project_id = None[source]
gcp_conn_id = 'google_cloud_default'[source]
api_version = 'v2beta'[source]
impersonation_chain = None[source]
execute(context)[source]

创建 Operator 时派生。

Context 是与渲染 jinja 模板时使用的相同的字典。

请参考 get_template_context 获取更多 context。

此条目是否有用?