airflow.providers.google.cloud.transfers.sheets_to_gcs¶
类¶
将 Google 表格数据写入 Google Cloud Storage。 |
模块内容¶
- class airflow.providers.google.cloud.transfers.sheets_to_gcs.GoogleSheetsToGCSOperator(*, spreadsheet_id, destination_bucket, sheet_filter=None, destination_path=None, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[源码]¶
基类:
airflow.models.BaseOperator
将 Google 表格数据写入 Google Cloud Storage。
参见
有关如何使用此操作符的更多信息,请参阅指南: 将数据从 Google 表格上传到 GCS
- 参数:
spreadsheet_id (str) – 要交互的 Google 表格 ID。
sheet_filter (list[str] | None) – 默认为 None,如果提供,应为要拉取的表格标题数组。
destination_bucket (str) – 报告应写入的目标 Google Cloud Storage 存储桶。(模板化)
destination_path (str | None) – 此操作符创建的对象对应的 Google Cloud Storage URI 数组。例如:
path/to/my/files
。gcp_conn_id (str) – 获取连接信息时使用的连接 ID。
impersonation_chain (str | collections.abc.Sequence[str] | None) – 可选的服务账号,用于使用短期凭据进行模拟,或者用于获取列表中最后一个账号的 access_token 所需的链式账号列表,该账号将在请求中被模拟。如果设置为字符串,则该账号必须授予原始账号 Service Account Token Creator IAM 角色。如果设置为序列,则列表中标识必须将 Service Account Token Creator IAM 角色授予紧邻的前一个标识,列表中第一个账号将此角色授予原始账号(模板化)。
- template_fields: collections.abc.Sequence[str] = ('spreadsheet_id', 'destination_bucket', 'destination_path', 'sheet_filter', 'impersonation_chain')[源码]¶