简体   繁体   English

使用命令行 (Robo 3T) 将 JSON 文件导入到 MongoDB

[英]importing JSON file to MongoDB using command line (Robo 3T)

I want to import a JSON file to MongoDB collection so for that i google it and it show me the followed syntax:我想将一个 JSON 文件导入到 MongoDB 集合中,因此我用谷歌搜索它并显示以下语法:

mongoimport --db <Database Name> --collection <Collection Name> --file <File Path>

and here is the link. 是链接。 I copied the same thing and typed on robo shell it through exception.我复制了同样的东西,并通过异常在 robo shell 上输入了它。 can anybody let me know what am i doing wrong?有人可以让我知道我做错了什么吗?

Thanks in advance提前致谢在此处输入图片说明

To import data into MongoDB use windows command line (cmd) as mongoimport is not mongoDB command.要将数据导入 MongoDB,请使用 Windows 命令行 (cmd),因为mongoimport不是 mongoDB 命令。

NOTE: Make sure that mongoDB paths are added in environmental variables

Check out the screenshot!看看截图! 在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM