Actions

NoSQL Zoo: Difference between revisions

From NoSQLZoo

mNo edit summary
No edit summary
Line 13: Line 13:
pp = pprint.PrettyPrinter(indent=4)
pp = pprint.PrettyPrinter(indent=4)
</pre>
</pre>
<div style="height:25em">
{{TopTenTips}}
{{TopTenTips}}
<div style="height:25em" width="80%">
Learn NoSQL using: MongoDB, PyMongo, and Python3.4
Learn NoSQL using: MongoDB, PyMongo, and Python3.4
</div>
<div class=q data-lang="py3">
<div class=q data-lang="py3">
Show all the data concering France.
Show all the data concering France.
Line 23: Line 24:
))
))
</pre>
</pre>
</div>
</div>
</div>
==Tutorials: Learn NoSQL in stages==
==Tutorials: Learn NoSQL in stages==

Revision as of 12:25, 27 July 2015

#ENCODING
import io
import sys
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-16')
#MONGO
from pymongo import MongoClient
client = MongoClient()
client.progzoo.authenticate('scott','tiger')
db = client['progzoo']
#PRETTY
import pprint
pp = pprint.PrettyPrinter(indent=4)

Learn NoSQL using: MongoDB, PyMongo, and Python3.4

Show all the data concering France.

pp.pprint(list(
    db.world.find({"name":"France"})
))

Tutorials: Learn NoSQL in stages

0 FIND basics
Some examples of common queries.
1 AGGREGATE world
In which we query the world collection and make use of aggregate functions.
2 MAPREDUCE basics
Using MapReduce.
3 MAPREDUCE elite
MapReduce questions using the Elite Dangerous dataset.

Reference: How to...

AGGREGATE
MAPREDUCE
NOSQLZOO: 'elite' dataset schema
RegEx Pattern Matching

MongoDB resources

Manuals
MongoDB Documentaion MongoDB Documentation GitHub
Python 3 Documentaion PyMongo API Documentation
Karl Seguin's The Little MongoDB Book
  • You have been served by: dill