D:\tools\mongodb\bin>mongo
100.10.1.17:27017
MongoDB shell
version: 2.2.2
connecting to: 100.10.1.17:27017/test
mongos>
mongos>
mongos>
sh.status();
--- Sharding Status
---
sharding version: { "_id" : 1,
"version" : 3 }
shards:
{
"_id" : "PPSHRD01",
"host" : "PPSHRD01:10001" }
{
"_id" : "PPSHRD02",
"host" : "PPSHRD02:10002" }
databases:
{
"_id" : "admin",
"partitioned" : false,
"primary" : "config" }
{
"_id" : "test",
"partitioned" : true,
"primary" : "PPSHRD01" }
{
"_id" : "mktpdm",
"partitioned" : true,
"primary" : "PPSHRD02" }
{
"_id" : "*",
"partitioned" : false,
"primary" : "PPSHRD01" }
Start
D:\mongo\bin>mongod
--dbpath=D:\mongo\bin\data\db
Import
mongoimport --db
test --collection gtin --type csv --file c:/country.csv --fields
item_sync_fact_id,sync_status,sync_cnt,unique_syncnt,frmcount,frmstatus,frmorgname,frmglobal,tocount,tostatus,torogname,toglobal,day,month,itemname,desc,brickcd,clscd
D:\mongo\bin>mongoimport
--db test --collection gtin --type csv --file d:/mongo/
country.csv --fields
item_sync_fact_id,sync_status,sync_cnt,unique_syncnt,frmcoun
t,frmstatus,frmorgname,frmglobal,tocount,tostatus,torogname,toglobal,day,month,i
temname,desc,brickcd,clscd
connected to:
127.0.0.1
imported 17430
objects
query
{
collectionName :
'gtin',
sort:{frmcount':1},
}
No comments:
Post a Comment