Skip to content

Multiple data requirements for a given source #240

@lewisjared

Description

@lewisjared

The problem

We currently support defining a tuple of data requirements for a metric. Currently if one provides multiple requirements for a given source type, it will silently only use the last one (see snippet below)

    for requirement in metric.data_requirements:
        if requirement.source_type not in data_catalog:
            raise InvalidMetricException(metric, f"No data catalog for source type {requirement.source_type}")

        dataset_groups[requirement.source_type] = extract_covered_datasets(
            data_catalog[requirement.source_type], requirement
        )

Is there ever the need to define multiple data requirements for the same type of data and if so what is the desired behaviour? If not I suggest we raise an exception instead of silently using the last one.

Additional context

After this step in the solve, we do assume that there is a single set of datasets per source type so there would be some cascading changes

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions