airflow.providers.google.firebase.operators.firestore

CloudFirestoreExportDatabaseOperator

将文档从 Google Cloud Firestore 导出到其他存储系统,例如 Google Cloud Storage。

模块内容

class airflow.providers.google.firebase.operators.firestore.CloudFirestoreExportDatabaseOperator(*, body, database_id='(default)', project_id=PROVIDE_PROJECT_ID, gcp_conn_id='google_cloud_default', api_version='v1', impersonation_chain=None, **kwargs)[source]

基类: airflow.models.BaseOperator

将文档从 Google Cloud Firestore 导出到其他存储系统,例如 Google Cloud Storage。

另请参阅

有关如何使用此操作符的更多信息,请参阅指南:Export database

参数::
  • database_id (str) – 数据库 ID。

  • body (dict) – 请求体。参见:https://firebase.google.com/docs/firestore/reference/rest/v1beta1/projects.databases/exportDocuments

  • project_id (str) – Google Cloud 项目的 ID;如果为 None,则使用默认 project_id。

  • gcp_conn_id (str) – 用于连接 Google Cloud 的连接 ID。

  • api_version (str) – 使用的 API 版本(例如 v1 或 v1beta1)。

  • 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] = ('body', 'gcp_conn_id', 'api_version', 'impersonation_chain')[source]
database_id = '(default)'[source]
body[source]
project_id = None[source]
gcp_conn_id = 'google_cloud_default'[source]
api_version = 'v1'[source]
impersonation_chain = None[source]
execute(context)[source]

创建操作符时实现此方法。

Context 是与渲染 Jinja 模板时使用的相同的字典。

有关更多上下文,请参阅 get_template_context。

此条目是否有帮助?