gfw.common.beam.transforms.ApplySlidingWindows#
- class ApplySlidingWindows(period, offset, assign_timestamps=False, timestamp_field='timestamp', **kwargs)[source]#
Applies sliding windows, optionally assigning event timestamps.
- Parameters:
period (float) – The window period (interval between window start times), in seconds.
offset (float) – The offset to apply to window start times, in seconds.
assign_timestamps (bool) – Whether to assign timestamps using a field from each element.
timestamp_field (str) – The name of the field containing the timestamp (UNIX time, in seconds).
**kwargs (Any) – Additional keyword arguments passed to base PTransform class.
Methods
annotationsdefault_labeldefault_type_hintsReturns the display data associated to a pipeline component.
Apply sliding windows to the input PCollection.
from_runner_apiget_resource_hintsGets and/or initializes type hints for this object.
Returns the window function to be associated with transform's output.
infer_output_typeregister_urnrunner_api_requires_keyed_inputto_runner_apito_runner_api_parameterto_runner_api_pickledtype_check_inputstype_check_inputs_or_outputstype_check_outputsAnnotates the input type of a
PTransformwith a type-hint.Annotates the output type of a
PTransformwith a type-hint.Adds resource hints to the
PTransform.Attributes
labelpipelineside_inputs