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.jsonfile from thezipsname storemapreaddatabase.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
mangoclient, then use thistestdatabase I.e. i.e. without switched all tasks will be done on the databasetestdatabase.Since the
mongoimportcommand is executed on themapreaddatabase, and the defaulttestis not in the database, you will havetestNo collection is visible in the databaseWhen you do
show DBS, it lists all the existing databases. You can see the newMapreadsdatabase to be listed here.zipswhich 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
zipis empty; what you are looking for iszipArchive . Therefore, you need to issue commands:use mapreads;, first to switch to theMapRaddatabase, when you release theshow archive, you will see thezips < / Code> archive.
Comments
Post a Comment