{
  "name": "data-quality-check",
  "title": "Run data-quality assertions on a dataset",
  "category": "Data",
  "tags": [
    "data",
    "python"
  ],
  "version": "1.0.1",
  "date": "2026-08-18",
  "notes": "Repin python:3.13-slim on the current digest. Same tag, CPython 3.13.14 to 3.13.15, and Entrypoint, Cmd, User and WorkingDir are identical on both. The repin clears nothing: util-linux CVE-2026-53615 is on the new bytes too. What it buys is a record that holds, because an OS baseline covers a pin only while that pin is its tag's head, and this one had fallen behind. pip also moves 26.1.2 to 26.2.1, which ships an SBOM of its vendored tree, so trivy now reports the msgpack and setuptools the old pin already vendored without declaring; both are recorded in hack/image-cve-exceptions.txt. This item runs python -c over the stdlib and never invokes pip.",
  "latest": true,
  "installable": true,
  "url": "https://catalog.dagweave.com/api/v1/items/data-quality-check/1.0.1.json",
  "templateUrl": "https://catalog.dagweave.com/api/v1/items/data-quality-check/1.0.1/template.yaml",
  "entrypoint": "check",
  "parameters": [
    {
      "name": "dataset-path",
      "title": "Dataset path",
      "description": "Path to a CSV dataset (with a header row) to run assertions on.",
      "type": "string",
      "required": true,
      "example": "/data/export.csv"
    },
    {
      "name": "max-null-fraction",
      "title": "Max null fraction",
      "description": "Maximum allowed fraction of empty cells per column (0.0-1.0).",
      "type": "string",
      "required": false,
      "default": "1.0",
      "example": "0.05"
    },
    {
      "name": "min-rows",
      "title": "Minimum rows",
      "description": "Minimum number of data rows the dataset must contain (0 = no minimum).",
      "type": "string",
      "required": false,
      "default": "0"
    }
  ],
  "images": [
    {
      "ref": "python@sha256:94d3426f1def7db4a106a232ac121bfd975393e5dfd40a619b955fae45fe7913",
      "repository": "python",
      "tag": "3.15-slim",
      "digest": "sha256:94d3426f1def7db4a106a232ac121bfd975393e5dfd40a619b955fae45fe7913"
    }
  ],
  "install": {
    "kubectl": "kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/data-quality-check/1.0.1/template.yaml",
    "argo": "argo template create -n argo https://catalog.dagweave.com/api/v1/items/data-quality-check/1.0.1/template.yaml"
  },
  "template": "apiVersion: argoproj.io/v1alpha1\nkind: WorkflowTemplate\nmetadata:\n  name: data-quality-check\n  labels:\n    dagweave.io/catalog-item: data-quality-check\n  annotations:\n    # The catalog semver this manifest was authored at. The dagweave app records\n    # (catalog-item-id, semver) -\u003e content-hash -\u003e base-vN when it mints the tenant\n    # cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.\n    dagweave.io/catalog-version: \"1.0.1\"\n    dagweave.io/catalog-category: \"Data\"\nspec:\n  entrypoint: check\n  templates:\n    - name: check\n      inputs:\n        parameters:\n          # Path to a CSV dataset (with a header row) to run assertions on.\n          - name: dataset-path\n          # Maximum allowed fraction of empty cells per column (0.0-1.0).\n          - name: max-null-fraction\n            default: \"1.0\"\n          # Minimum number of data rows the dataset must contain (0 = no minimum).\n          - name: min-rows\n            default: \"0\"\n      container:\n        # Pinned by digest per the catalog convention: an image rebuild can never\n        # silently change the behaviour of an already-released item version.\n        # python:3.15-slim\n        image: python@sha256:94d3426f1def7db4a106a232ac121bfd975393e5dfd40a619b955fae45fe7913\n        # The script is a static program; all user values arrive via env vars\n        # (read with os.environ), never interpolated into code or a shell.\n        command: [python, -c]\n        args:\n          - |\n            import csv, os, sys\n            path = os.environ[\"DATASET_PATH\"]\n            max_null = float(os.environ.get(\"MAX_NULL_FRACTION\", \"1.0\") or \"1.0\")\n            min_rows = int(os.environ.get(\"MIN_ROWS\", \"0\") or \"0\")\n            with open(path, newline=\"\") as f:\n                reader = csv.reader(f)\n                try:\n                    header = [h.strip() for h in next(reader)]\n                except StopIteration:\n                    print(\"FAIL: dataset is empty (no header row)\", file=sys.stderr)\n                    sys.exit(1)\n                nulls = [0] * len(header)\n                total = 0\n                for row in reader:\n                    total += 1\n                    for i in range(len(header)):\n                        val = row[i].strip() if i \u003c len(row) else \"\"\n                        if val == \"\":\n                            nulls[i] += 1\n            failures = []\n            if total \u003c min_rows:\n                failures.append(\"row count %d \u003c min %d\" % (total, min_rows))\n            for i, name in enumerate(header):\n                frac = (nulls[i] / total) if total else 0.0\n                if frac \u003e max_null:\n                    failures.append(\"column '%s' null fraction %.3f \u003e %.3f\" % (name, frac, max_null))\n            if failures:\n                print(\"FAIL: \" + \"; \".join(failures), file=sys.stderr)\n                sys.exit(1)\n            print(\"OK: %d rows, %d columns; all null fractions \u003c= %.3f\" % (total, len(header), max_null))\n        env:\n          - name: DATASET_PATH\n            value: \"{{inputs.parameters.dataset-path}}\"\n          - name: MAX_NULL_FRACTION\n            value: \"{{inputs.parameters.max-null-fraction}}\"\n          - name: MIN_ROWS\n            value: \"{{inputs.parameters.min-rows}}\"\n",
  "templateSha256": "4fd981190a65221d157b0201a27475fc44cb778617e897b4e94d0745abfb23c5",
  "source": "https://github.com/dagweave/catalog/tree/67458f74dbbf913b03177f3cefc69424be85eb1d/catalog/data-quality-check",
  "catalogSha": "67458f74dbbf913b03177f3cefc69424be85eb1d"
}
