To import data from the mongodb database today, use the mongoimport command.
Instead, you need to specify the field type, so use
mongoimport –db=users –collection=contacts –type=csv \ |
–columnsHaveTypes \ |
–fields=”name.string(),birthdate.date(2006-01-02),contacted.boolean(),followerCount.int32(),thumbnail.binary(base64)” \ |
–file=/example/file.csv |
Don’t look for this. Go directly to the official website.
mongoimport — MongoDB Database Tools
Because the error is always reported when using mongoimport.
I think the sentence may be wrong. I have checked it over and over again for more than ten times, but it’s a pity that I still can’t.
See the yellow one?That’s the problem.
Do not execute this command in mongo.exe.
It should be executed under external CMD.
Reference from
mongodb – mongoexport E QUERY SyntaxError: Unexpected identifier – Stack Overflow
Similar Posts:
- [Solved] Mongodb startup error: about to fork child process, waiting until server is ready for connections.
- mongodb:E QUERY [thread1] SyntaxError: missing ; before statement @(shell):1:4
- [Solved] Mongodb Error: NETWORK [thread1] Failed to connect to 127.0.0.1:27017
- Raspberry pie: How to Solve Mongodb installation error
- [Solved] MongoDB Start ERROR: child process failed, exited with error number
- [Solved] PHP connect to MongoDB error: Server does not support sessions
- [Solved] Cannot make a static reference to the non-static field logMongoTemplate
- Mongodb Cannot Start: child process failed, exited with error number 100
- MongoDB Startup Error: Failed to connect to 127.0.0.1:27017, reason: errno:111 Connection refused
- No package mongodb-org available. [How to Solve]