gfw.common.beam.pipeline.DagFactory#

class DagFactory(config)[source]#

Abstract base class for DAG factories producing Dag objects.

Provides factory properties for BigQuery read/write clients and helpers.

Methods

build_dag

Builds the DAG.

Attributes

bigquery_helper_factory

Returns a factory for BigQueryHelper instances.

read_from_bigquery_factory

Returns a factory for ReadFromBigQuery clients.

write_to_bigquery_factory

Returns a factory for WriteToPartitionedBigQuery clients.

property read_from_bigquery_factory: Callable[[...], ReadFromBigQuery]#

Returns a factory for ReadFromBigQuery clients.

Uses mocked clients if configured.

property write_to_bigquery_factory: Callable[[...], WriteToBigQuery]#

Returns a factory for WriteToPartitionedBigQuery clients.

Uses mocked clients if configured.

property bigquery_helper_factory: Callable[[...], BigQueryHelper]#

Returns a factory for BigQueryHelper instances.

Returns:

Callable that creates BigQueryHelper instances with the appropriate client factory.

abstractmethod build_dag()[source]#

Builds the DAG.

Must be implemented in subclasses.

Returns:

A tuple of PTransforms representing the DAG components.

Return type:

Dag