Explore user-defined enrichments
See original GitHub issueFirst attempt: https://github.com/snowplow/snowplow/commit/61ad6f9bfaea7299b21d579289782e54f59c141d#commitcomment-13187113
The current idea is to have users create a class extending IUserEnrichment defining a method which takes an EnrichedEvent and returns Unit, i.e. it mutates the EnrichedEvent in place.
They would specify in the configuration where those classes can be found, what the name of the class is, and whether each class is enabled:
[
{
"class": "com.acme.CustomEnrichment",
"url": "s3://path/to/customenrichment.jar",
"enabled": true
}
]
Each enabled class would then be loaded and instantiated at runtime.
Possible extension to this: the method could be given as additional argument json4s objects containing all contexts and unstructured event JSONs, so that users don’t have to deserialize the EnrichedEvent JSON strings.
Additionally, the method could optionally derived contexts json4s objects.
Issue Analytics
- State:
- Created 8 years ago
- Comments:19 (19 by maintainers)

Top Related StackOverflow Question
I think in a Docker world the idea of having the adapter or enricher connected over the network at runtime is much nicer than modifying the build artifact.
Migrated to https://github.com/snowplow/enrich/issues/253