grain.experimental.FlatMapTransform#
- class grain.experimental.FlatMapTransform#
Abstract base class for splitting operations of individual elements.
Implementations should be threadsafe since they are often executed in parallel.
- Attributes
max_fan_out: Absolute maximum number of splits that an element can generate. If element splits into number of sub-elements exceeding max_fan_out, an error is raised. In the case of variable fan-out, for performance reasons, please be mindful of the distribution in fan-outs. If the minimum and maximum fan-out in this distribution differ by several orders of magnitude, with a correspondingly very large max_fan_out, performance will degrade. In this case please consider preprocessing your data to keep the max_fan_out reasonable.
- __init__()#
Methods
__init__
()flat_map
(element)splits a single element.
Attributes
max_fan_out