Google Cloud Firestore Operator

Cloud Firestore 是 Firebase 和 Google Cloud 提供的一個靈活、可擴充套件的資料庫,適用於移動、Web 和伺服器開發。與 Firebase Realtime Database 一樣,它透過即時監聽器在客戶端應用程式之間同步資料,併為移動和 Web 提供離線支援,這樣你就可以構建響應式應用程式,無論網路延遲或 Internet 連線如何都能正常工作。Cloud Firestore 還與包括 Cloud Functions 在內的其他 Firebase 和 Google Cloud 產品無縫整合。

先決條件任務

要使用這些 Operator,您必須完成以下幾項操作

匯出資料庫

使用 CloudFirestoreExportDatabaseOperator Operator 執行從 Google Cloud Firestore 匯出所有或部分文件到 Google Cloud Storage 的操作。

tests/system/google/cloud/gcs/example_firestore.py

export_database_to_gcs = CloudFirestoreExportDatabaseOperator(
    task_id="export_database_to_gcs",
    project_id=PROJECT_ID,
    body={"outputUriPrefix": EXPORT_DESTINATION_URL, "collectionIds": [EXPORT_COLLECTION_ID]},
)

您可以將 Jinja 模板bodygcp_conn_idapi_versionimpersonation_chain 引數一起使用,從而動態確定值。

參考

更多資訊,請查閱

此條目有幫助嗎?