Skip to content

v0.2.2

Choose a tag to compare

@chaturv3di chaturv3di released this 01 Jun 18:28
· 19 commits to main since this release
2edde2c

What's new

Added

  • ValidationResult.referenced_columns — populated on successful spec validation; a dict[str, list[str]] mapping each spec field to the unqualified column names it references. None when the spec is invalid.

    Enables downstream consumers who hold a warehouse connection to verify that every column referenced in a spec is present in the source table before calling compute().

    result = metric_spec.validate()
    if result.valid:
        print(result.referenced_columns)
        # {'numerator': ['revenue'], 'denominator': ['impressions'], 'timestamp_col': ['created_at']}

    Fields extracted per spec type:

    • Metric: "numerator", "denominator" (if set), "timestamp_col", "entities" (if set)
    • Slice leaf: "values[i].where" (one key per value)
    • Slice wildcard: "where"
    • Slice composite: empty dict {}

See the changelog and column introspection docs for details.