search

Home  >  Q&A  >  body text

How to write json file to mongodb - Stack Overflow

I have a .json file with tens of thousands of data. I want to import it directly into mongodb. What should I do?

高洛峰高洛峰2749 days ago428

reply all(1)I'll reply

  • 某草草

    某草草2017-05-16 13:38:08

    mongoimport -h host:port -d dbName -c collName filename.json

    mongoimport is a common command for importing json or csv into MongoDB, you can view the documentation, or help:

    mongoimport --help
    

    reply
    0
  • Cancelreply