EnricherCountryRegionSelector Class

Defines CountryRegion selector calculations.

All are members are static functions.

Intialize with none granularity.

Inheritance
EnricherCountryRegionSelector

Constructor

EnricherCountryRegionSelector()

Methods

countryregion_join

Join customer data with public data, with the specified aggregator applied.

process

Enrich customer data with public data using the specified aggregator.

countryregion_join

Join customer data with public data, with the specified aggregator applied.

countryregion_join(env, customer_data: CountryOrRegionData, public_data: CountryOrRegionData, aggregator: Aggregator, join_keys: list | None = None, debug: bool = False) -> Tuple[CountryOrRegionData, CountryOrRegionData, List[Tuple[str, str]]]

Parameters

Name Description
env
Required

The runtime environment.

customer_data
Required

An instance of CountryOrRegionData class for customer data.

public_data
Required

An instance of CountryOrRegionData class for public data.

aggregator
Required

An aggregator.

join_keys

A list of join key pairs.

Default value: None
debug

Indicates whether to print debug logs.

Default value: False

Returns

Type Description

A tuple of altered customer data class instance, altered public data class instance, and a list of join key pairs.

process

Enrich customer data with public data using the specified aggregator.

process(env: RuntimeEnv, customer_data: CountryOrRegionData, public_data: CountryOrRegionData, aggregator: Aggregator, join_keys: list | None = None, debug: bool = False) -> Tuple[CountryOrRegionData, CountryOrRegionData, List[Tuple[str, str]]]

Parameters

Name Description
env
Required

The runtime environment.

customer_data
Required

An instance of CountryOrRegionData class.

public_data
Required

An instance of CountryOrRegionData class.

aggregator
Required

An aggregator.

join_keys

A list of join key pairs.

Default value: None
debug

Indicates whether to print debug logs.

Default value: False

Returns

Type Description

A tuple of altered customer data class instance, altered public data class instance, and a list of join key pairs.