airflow.providers.google.suite.transfers.gcs_to_sheets
¶
模組內容¶
類別¶
將 .csv 檔案從 Google Cloud Storage 上傳到提供的 Google 試算表。 |
- class airflow.providers.google.suite.transfers.gcs_to_sheets.GCSToGoogleSheetsOperator(*, spreadsheet_id, bucket_name, object_name, spreadsheet_range='Sheet1', gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[來源]¶
基底類別:
airflow.models.BaseOperator
將 .csv 檔案從 Google Cloud Storage 上傳到提供的 Google 試算表。
參見
有關如何使用此運算子的更多資訊,請參閱指南: 從 GCS 上傳資料到 Google 試算表
- 參數
spreadsheet_id (str) – 要互動的 Google Sheet ID。
bucket_name (str) – GCS 儲存桶名稱。
object_name (str) – GCS 儲存桶上 .csv 檔案的路徑。
spreadsheet_range (str) – 要檢索的值的 A1 標記法。
gcp_conn_id (str) – 擷取連線資訊時要使用的連線 ID。
impersonation_chain (str | collections.abc.Sequence[str] | None) – 可選的服務帳戶,用於使用短期憑證模擬,或取得清單中最後一個帳戶的 access_token 所需的鏈結帳戶清單,該帳戶將在請求中被模擬。如果設定為字串,則該帳戶必須授予原始帳戶「服務帳戶權杖建立者」IAM 角色。如果設定為序列,則清單中的身分必須將「服務帳戶權杖建立者」IAM 角色授予緊接在前的身分,清單中的第一個帳戶將此角色授予原始帳戶 (已套用範本)。
- template_fields: collections.abc.Sequence[str] = ('spreadsheet_id', 'bucket_name', 'object_name', 'spreadsheet_range', 'impersonation_chain')[來源]¶