【问题标题】:Apache Avro error when loading Firestore data exported Cloud Storage to Big Query加载将 Cloud Storage 导出到 Big Query 的 Firestore 数据时出现 Apache Avro 错误
【发布时间】:2020-02-15 15:47:14
【问题描述】:

我无法弄清楚我在这里做错了什么。

目标是将 Firestore 数据导出到 Cloud Storage,然后将其导入 Big Query。

我所做的是: gcloud beta firestore export gs://[bucket]/bigQuery20191018_userprofile --collection-i ds='用户配置文件'

从 Big Query 中,我尝试在 Web UI 中添加表格,但收到此错误:

读取数据时出错,错误消息:Apache Avro 库无法解析标头并出现以下错误:数据文件无效。 Magic 不匹配:/subrange//bigstore/[bucket]/bigQuery20191018_userprofile/all_namespaces/kind_userprofile/all_namespaces_kind_userprofile.export_metadata

我正在使用特定于集合的文件夹中的 export_metadata。我还以某个特定于该集合的奇怪机会导出了其他集合,但无论来源如何,我都会看到相同的错误。

仅供参考,我只是关注

导出:https://cloud.google.com/firestore/docs/manage-data/export-import

导入:https://cloud.google.com/bigquery/docs/loading-data-cloud-firestore

任何帮助将不胜感激。

谢谢。

【问题讨论】:

    标签: google-cloud-firestore google-bigquery google-cloud-storage


    【解决方案1】:

    我有类似的情况,这是由于在导入时未选择正确的文件格式(Avro 与 Cloud Datastore Backup)。查看documentation 的这一部分,看看是否解决了问题:

    对于文件格式,选择云数据存储备份。云数据存储备份 是 Cloud Firestore 的正确选项。 Cloud Firestore 和云 数据存储共享导出格式。

    【讨论】:

      猜你喜欢
      • 2014-07-09
      • 1970-01-01
      • 2018-12-25
      • 1970-01-01
      • 1970-01-01
      • 2017-12-14
      • 1970-01-01
      • 2017-07-12
      • 1970-01-01
      相关资源
      最近更新 更多