Enricher
Enricher is a class that generalize that enrichments providing interface for creation of connector with a lot of database like elasticsearch, mySQL, Redis others.
Enricher
- class moredata.enricher.enricher.Enricher(connector)
Enricher is a wrapper class of interface IEnricherConnector
- Parameters
connector (
IEnricherConnector) – Interface that connects an implementation of enrichment to the class :Enricher:
- connector
Interface that connects an implementation of enrichment to the class :Enricher:
- Type
IEnricherConnector
- property connector
rtype:
IEnricherConnectorgetter method
- enrich(data, **kwargs)
Call enrich function of interface
IEnricherConnector- Parameters
data (
Data) –- Returns
data enriched
- Return type
Data
Enrich Builder
- class moredata.enricher.enricher_builder.EnricherBuilder(data)
EnricherBuilder is a class that override Builder interface and for that implements abstract method with_enrichment.
- Parameters
data (
Data) – Data class is what will be enriched.
- data
- Type
Data
- with_enrichment(connector)
Implementation of abstract method of
BuilderThis method add toDataarray attributeEnricherobjects- Parameters
connector (
Enricher) – a connector that will implementenrich()- Return type
This method return the
Data