從 Amazon S3 傳輸資料到 Google Cloud Storage¶
Google Cloud Storage (GCS) 用於儲存來自各種應用程式的大資料。與 Amazon Simple Storage Service 也類似。本頁面展示瞭如何將資料從 Amazon S3 傳輸到 GCS。
前提任務¶
要使用這些 operators,您需要做幾件事
使用 Cloud Console 選擇或建立一個 Cloud Platform 專案。
為您的專案啟用結算功能,如 Google Cloud 文件 中所述。
啟用 API,如 Cloud Console 文件 中所述。
透過 pip 安裝 API 庫。
pip install 'apache-airflow[google]'安裝 提供了詳細資訊。
使用 S3ToGCSOperator 將資料從 Amazon S3 傳輸到 Google Cloud Storage。
可以使用 deferrable 模式非同步啟動 S3ToGCSOperator。為此,只需在 operator 呼叫中新增引數 deferrable=True。在底層,它將把資料傳輸委託給 Google Cloud Storage Transfer Service。透過更改引數 poll_interval=10,您可以控制輪詢傳輸作業狀態的頻率。
參考資料¶
如需更多資訊,請參閱: