Skip to content

definitions

Dagster definition loader for Sling based ingestion assets.

defs()

Construct the Sling specific Dagster Definitions bundle.

Returns:

Type Description
Definitions

dagster.Definitions: Definitions generated by :class:DagsterSlingFactory using the YAML configuration located under the Sling config directory.

Source code in data_foundation/defs/sling/definitions.py
@definitions
def defs() -> Definitions:
    """Construct the Sling specific Dagster ``Definitions`` bundle.

    Returns:
        dagster.Definitions: Definitions generated by :class:`DagsterSlingFactory`
            using the YAML configuration located under the Sling config directory.
    """


    # Resolve the root folder containing Sling YAML configuration files.
    config_dir = Path(__file__).joinpath(*[".."], "sling").resolve()

    return Factory.build_definitions(config_dir)