airflow.providers.google.cloud.transfers.gdrive_to_gcs¶
類¶
將 Google Drive 檔案寫入 Google Cloud Storage。 |
模組內容¶
- class airflow.providers.google.cloud.transfers.gdrive_to_gcs.GoogleDriveToGCSOperator(*, bucket_name, object_name=None, file_name, folder_id, drive_id=None, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]¶
基類:
airflow.models.BaseOperator將 Google Drive 檔案寫入 Google Cloud Storage。
另請參閱
有關如何使用此 Operator 的更多資訊,請參閱指南: Operator
- 引數:
bucket_name (str) – 目標 Google Cloud Storage 儲存桶,檔案將寫入此處
object_name (str | None) – Operator 建立的物件在 Google Cloud Storage 中的物件名稱。例如:
path/to/my/file/file.txt。folder_id (str) – Google Drive 檔案所在的資料夾 ID
file_name (str) – 位於 Google Drive 中的檔名
drive_id (str | None) – 可選。檔案所在的共享 Google Drive 的 ID。
gcp_conn_id (str) – 獲取連線資訊時使用的 GCP 連線 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] = ('bucket_name', 'object_name', 'folder_id', 'file_name', 'drive_id', 'impersonation_chain')[source]¶