Can't access collection from the shell - SyntaxError: missing ; before statement (shell):1

前端 未结 3 389
眼角桃花
眼角桃花 2021-01-17 23:51

I wrote a script that uses mongoimport to load csv files into mongodb. When I run this for two similar csv files (of the same type) both upload fine, however I can only acce

相关标签:
3条回答
  • 2021-01-18 00:13

    This works for me when my collection names include special characters:

    db["3mLgQAYJCq6_20110802"].findOne();
    
    0 讨论(0)
  • 2021-01-18 00:13

    The collection name should start with a letter or the underscore.You can get the info about the naming convention for the collections in mongodb from below link- http://www.mongodb.org/display/DOCS/Collections

    0 讨论(0)
  • 2021-01-18 00:25

    lovely collection names... it's probably because it's starts with a 3.

    0 讨论(0)
提交回复
热议问题