AggregatorTop Class

Defines an aggregator that gets the top N based on join keys.

Initialize with top numbers.

Inheritance
AggregatorTop

Constructor

AggregatorTop(n: int = 1)

Parameters

Name Description
n
Default value: 1

Remarks

Aggregators are typically not instantiated directly. Instead, specify the the type of aggregator when using using an enricher such as the HolidayEnricher object.

The process_public_dataset(env, _public_dataset, cols, join_keys) method gets the maximum value.

Methods

get_log_property

Get log property tuple, None if no property.

process_public_dataset

Get the top N values based on the input join keys.

get_log_property

Get log property tuple, None if no property.

get_log_property()

process_public_dataset

Get the top N values based on the input join keys.

process_public_dataset(env: SparkEnv | PandasEnv, _public_dataset: object, cols: object, join_keys: list)

Parameters

Name Description
env
Required

The runtime environment.

_public_dataset
Required

The input public dataset.

cols
Required

The column name list to retrieve.

join_keys
Required

A list of join key pairs.

Returns

Type Description

An aggregated public dataset.