json - MongoDB - db does not show any collection after mongoimport -
I'm actually searching for MongoDB and Maps, promote inside, but I have a problem. The establishment of Mongodb was successful. After that, I tried to import
$ wget http: /media.mongodb.org/zips.json $ mongoimport - db mapreduce --collection zips --file zips.json
then I call I have received these alerts:
Mongodabi shell version: 2.6.5 connects to: : The test server has startup warnings: 2014-11-04 04 20: 15: 12.280 + 0100 [initandlisten] 2014-11-04 T-20: 15: 12.280 + 0100 [initandlisten] ** Note: This is a 32-bit MongoDB binary 2014-11-04 T 20:15:15 12.280 + 0100 [Initandlisten] ** 32 bit builds are limited to 2 GB data (or at least -General). 2014-11-04 T20: 15: 12.280 + 0100 [initandlisten] ** Note that journaling is deferred for 32 bit and is currently closed 2014-11-04T20: 15: 12.280 + 0100 [initandlisten] ** See http://dochub.mongodb.org/core/32bit 2014-11-04T20: 15: 12.280 + 0100 [initandlisten]
And now when I want to show the archive, I Normally I type:
Show archive
but it does not show any archive << P>
and when I type
show dbs
< / Blockquote>I got the terminal: < / P>
Administrator (empty) Local 0.078GB MapperData 0.078 GB Test (empty) ZIP (empty)
This means that the database ZIP is empty, but when I Open it, there are so many documents.
Can anyone help me? thank you in advanced.
Mongoimport - db mappedred - colonation zip - file zip json
< / Pre>This command imports data in the
zips.json
file from thezips
name storemapread
database.And now when I want to show the archive, I normally type: Show the collection but it does not show any collections. Like this:
By default, when you open a new
mango
client, then use thistest
database I.e. i.e. without switched all tasks will be done on the databasetest
database.Since the
mongoimport
command is executed on themapread
database, and the defaulttest
is not in the database, you will havetest
No collection is visible in the databaseWhen you do
show DBS
, it lists all the existing databases. You can see the newMapreads
database to be listed here.zips
which you see here is a database that you accidentally created, and is not a collection in which you imported the data.Which means the database zip is empty, but when I open it, there are so many documents.
Yes, the database named
zip
is empty; what you are looking for iszip
Archive . Therefore, you need to issue commands:use mapreads;
, first to switch to theMapRad
database, when you release theshow archive
, you will see thezips < / Code> archive.
Comments
Post a Comment