Field

class kafkaaggregator.fields.Field(name: str, type: Union[Type[int], Type[float], Type[bytes], Type[str]], source_field_name: Optional[str] = None, operation: Optional[str] = None)

Bases: object

Represents an aggregation field with numeric types.

Parameters:
  • name (str) – Field name.
  • type (int or float or bytes or str) – Field data type.
  • source_field_name (str, optional) – Source field name.
  • operation (str, optional) –

Methods Summary

asdict() Convert field to dict.
astuple() Convert field to tuple.

Methods Documentation

asdict() → Mapping[str, Union[Type[int], Type[float], Type[bytes], Type[str]]]

Convert field to dict.

astuple() → Tuple[str, Union[Type[int], Type[float], Type[bytes], Type[str]]]

Convert field to tuple.