gfw.common.beam.transforms.WriteToJson#

class WriteToJson(output_dir='workdir', output_prefix='', **kwargs)[source]#

Writes PCollection as JSON.

Parameters:
  • output_dir (str) – Output directory.

  • output_prefix (str) – Prefix to use in filename/s.

  • **kwargs (Any) – Additional keyword arguments passed to base PTransform class.

Methods

annotations

default_label

default_type_hints

display_data

Returns the display data associated to a pipeline component.

expand

Writes the input PCollection to a JSON file.

from_runner_api

get_resource_hints

get_type_hints

Gets and/or initializes type hints for this object.

get_windowing

Returns the window function to be associated with transform's output.

infer_output_type

register_urn

runner_api_requires_keyed_input

to_runner_api

to_runner_api_parameter

to_runner_api_pickled

type_check_inputs

type_check_inputs_or_outputs

type_check_outputs

with_input_types

Annotates the input type of a PTransform with a type-hint.

with_output_types

Annotates the output type of a PTransform with a type-hint.

with_resource_hints

Adds resource hints to the PTransform.

Attributes

WORKDIR_DEFAULT

label

pipeline

side_inputs

expand(pcoll)[source]#

Writes the input PCollection to a JSON file.

Return type:

PCollection