【问题标题】:import firebase generated json dataset to mongodb将firebase生成的json数据集导入mongodb
【发布时间】:2018-04-18 02:04:25
【问题描述】:

我的方法:将 firebase 数据导出为 json 并使用

将它们插入到 mongodb
mongoimport --db firebase --collection examples --file examples.json --jsonArray

我在 linux 上使用 --jsonArray,因为在 linux 上没有它会显示错误 mongodb supplied JSON is too large 但这是另一回事。

在向 mongodb 插入数据后,我的数据看起来像 my data after importing to mongo 所以我要做的是导入数据并让 _id 在 mongodb 成为我的 firebase 孩子的关键 我想使用默认工具来实现这一点,而不是像使用 java 解析数据然后将它们插入到 mongodb 那样的解决方法

【问题讨论】:

    标签: json mongodb firebase firebase-realtime-database


    【解决方案1】:

    我创建了一个休眠持久性来将数据插入到 mongoDB 希望对某人有所帮助。仍然可以解决,但它有所帮助

    【讨论】:

      猜你喜欢
      • 2018-08-14
      • 2020-12-23
      • 2017-11-07
      • 1970-01-01
      • 2015-12-29
      • 2017-09-19
      • 1970-01-01
      • 2021-01-18
      • 2020-04-30
      相关资源
      最近更新 更多