users.csv like following;
(after execute this command, the following output occured)
Tue Aug 14 14:02:45 creating new connection to:127.0.0.1
Tue Aug 14 14:02:45 BackgroundJob starting: ConnectBG
Tue Aug 14 14:02:45 connected connection!
connected to: 127.0.0.1
Tue Aug 14 14:02:45 ns: test.user
Tue Aug 14 14:02:45 filesize: 31
Tue Aug 14 14:02:45 got line:ercan,can,eng
Tue Aug 14 14:02:45 got line:can,ercan,author
Tue Aug 14 14:02:45 got line:
Tue Aug 14 14:02:45 got line:
imported 2 objects
ercan,can,engineer
can,ercan,author
can,ercan,author
$sudo mongoimport -v -d test -c user -f firstName,lastName,job --type csv --file users.csv
(after execute this command, the following output occured)
Tue Aug 14 14:02:45 creating new connection to:127.0.0.1
Tue Aug 14 14:02:45 BackgroundJob starting: ConnectBG
Tue Aug 14 14:02:45 connected connection!
connected to: 127.0.0.1
Tue Aug 14 14:02:45 ns: test.user
Tue Aug 14 14:02:45 filesize: 31
Tue Aug 14 14:02:45 got line:ercan,can,eng
Tue Aug 14 14:02:45 got line:can,ercan,author
Tue Aug 14 14:02:45 got line:
Tue Aug 14 14:02:45 got line:
imported 2 objects
Comments
Post a Comment