TimeNearestSelector Class

Defines the time nearest selector with rounding to different time granularities.

Intialize with time granularity.

Inheritance
TimeNearestSelector

Constructor

TimeNearestSelector(_granularity: TimeGranularity, enable_telemetry: bool = True)

Parameters

_granularity
enable_telemetry
default value: True

Methods

process

Enrich customer data with public data using the specified aggregator.

process

Enrich customer data with public data using the specified aggregator.

process(env: RuntimeEnv, customer_data: TimeData, public_data: TimeData, aggregator: Aggregator, join_keys: list | None = None, debug: bool = False)

Parameters

env
RuntimeEnv
Required

The runtime environment.

customer_data
TimeData
Required

An instance of a TimeData derived class.

public_data
TimeData
Required

An instance of a TimeData derived class.

aggregator
Aggregator
Required

An aggregator.

join_keys
list
default value: None

A list of join key pairs.

debug
bool
default value: False

Indicates whether to print debug logs.

Returns

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

Return type