Requirements: pymongo:
pip install pymongo
Type is mongo2
Example:
[datastore]
type: mongo2
url: mongodb://localhost:37017/
database: MongoBI
collection: activations
Custom aggregate with function provided in the mapping:
"aggregates": [
{
"name": "subtotal",
}
],
"mappings": {
"subtotas": {
"field": "cart_subtotal",
"group": { "$sum": "$subtotal" }
}
}
To apply a filter for the whole collection:
"browser_options": {
"filter": {
"type": "only_this_type",
"category": 1
}
}