A nice example of mapping and aggregating list of entities using pure python.
- mapping rule input format:
source;destination;source_type;destination_type
winter;Winter;season;season
summer;Summer;season;season
The mapping can go match even by deepest degree of attribute set
- mapping rule output tree:
{
"season": {
"winter": {"_mapping": mapping("season", "Winter")},
"summer": {"_mapping": mapping("season", "Summer")},
}
}
python -m mapreduce
# different output file
python -m mapreduce --output_file=WHERE_TO_WRITE_OUTPUT_STREAM
poetry shell
poetry install
pytest -v