airflow.providers.google.suite.sensors.drive

此模块包含 Google Drive 传感器。

GoogleDriveFileExistenceSensor

检查 Google Drive 中文件的存在。

模块内容

class airflow.providers.google.suite.sensors.drive.GoogleDriveFileExistenceSensor(*, folder_id, file_name, drive_id=None, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

基类: airflow.sensors.base.BaseSensorOperator

检查 Google Drive 中文件的存在。

参数:
  • folder_id (str) – 文件所在的 Google Drive 文件夹。

  • file_name (str) – 要在 Google Drive 中检查的文件名

  • drive_id (str | None) – 可选。文件所在的共享 Google Drive 的 ID。

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

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

template_fields: collections.abc.Sequence[str] = ('folder_id', 'file_name', 'drive_id', 'impersonation_chain')[source]
ui_color = '#f0eee4'[source]
folder_id[source]
file_name[source]
drive_id = None[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
poke(context)[source]

派生此类时重写。

此条目有帮助吗?