_combine_contract_checks
Internal helper
This page documents an internal implementation helper, not a primary public API.
Source code in src/fabricops_kit/quality.py
| def _combine_contract_checks(dataset_name: str, table_name: str, contract_type: str, checks: list[dict]) -> dict:
statuses = [c.get("status") for c in checks]
failed_blocking = [c for c in checks if c.get("status") == "failed" and c.get("action") == "block"]
status = "failed" if failed_blocking else ("warning" if "failed" in statuses or "warning" in statuses else "passed")
return {"dataset_name": dataset_name, "table_name": table_name, "contract_type": contract_type, "status": status, "can_continue": not failed_blocking, "checks": checks}
|