Run data-quality assertions on a dataset
Run basic data-quality assertions on a CSV dataset, per-column null fraction and minimum row count, and fail the step when a rule is violated.
Install v1.0.1
Installs the template into your Argo namespace. The URL is pinned to this version.
kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/data-quality-check/1.0.1/template.yaml
Or with the Argo CLI:
argo template create -n argo https://catalog.dagweave.com/api/v1/items/data-quality-check/1.0.1/template.yaml
Facts
- Category
- Data
- Tags
- data python
- Entrypoint
check- Template SHA-256
4fd981190a65221d157b0201a27475fc44cb778617e897b4e94d0745abfb23c5- Source
- data-quality-check at catalog commit 67458f7
- API
- item document, latest template.yaml
Images and provenance
Every image is pinned by digest, so a rebuilt tag can never change what this version runs.
| Repository | Tag | Digest |
|---|---|---|
python | 3.15-slim | sha256:94d3426f1def7db4a106a232ac121bfd975393e5dfd40a619b955fae45fe7913 |
Parameters
| Name | Description | Default |
|---|---|---|
dataset-path required |
Path to a CSV dataset (with a header row) to run assertions on. Example /data/export.csv |
none |
max-null-fraction |
Maximum allowed fraction of empty cells per column (0.0-1.0). Example 0.05 |
1.0 |
min-rows |
Minimum number of data rows the dataset must contain (0 = no minimum). | 0 |
WorkflowTemplate
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: data-quality-check
labels:
dagweave.io/catalog-item: data-quality-check
annotations:
# The catalog semver this manifest was authored at. The dagweave app records
# (catalog-item-id, semver) -> content-hash -> base-vN when it mints the tenant
# cluster name via ResolveOrMint. Keep in sync with metadata.yaml `version`.
dagweave.io/catalog-version: "1.0.1"
dagweave.io/catalog-category: "Data"
spec:
entrypoint: check
templates:
- name: check
inputs:
parameters:
# Path to a CSV dataset (with a header row) to run assertions on.
- name: dataset-path
# Maximum allowed fraction of empty cells per column (0.0-1.0).
- name: max-null-fraction
default: "1.0"
# Minimum number of data rows the dataset must contain (0 = no minimum).
- name: min-rows
default: "0"
container:
# Pinned by digest per the catalog convention: an image rebuild can never
# silently change the behaviour of an already-released item version.
# python:3.15-slim
image: python@sha256:94d3426f1def7db4a106a232ac121bfd975393e5dfd40a619b955fae45fe7913
# The script is a static program; all user values arrive via env vars
# (read with os.environ), never interpolated into code or a shell.
command: [python, -c]
args:
- |
import csv, os, sys
path = os.environ["DATASET_PATH"]
max_null = float(os.environ.get("MAX_NULL_FRACTION", "1.0") or "1.0")
min_rows = int(os.environ.get("MIN_ROWS", "0") or "0")
with open(path, newline="") as f:
reader = csv.reader(f)
try:
header = [h.strip() for h in next(reader)]
except StopIteration:
print("FAIL: dataset is empty (no header row)", file=sys.stderr)
sys.exit(1)
nulls = [0] * len(header)
total = 0
for row in reader:
total += 1
for i in range(len(header)):
val = row[i].strip() if i < len(row) else ""
if val == "":
nulls[i] += 1
failures = []
if total < min_rows:
failures.append("row count %d < min %d" % (total, min_rows))
for i, name in enumerate(header):
frac = (nulls[i] / total) if total else 0.0
if frac > max_null:
failures.append("column '%s' null fraction %.3f > %.3f" % (name, frac, max_null))
if failures:
print("FAIL: " + "; ".join(failures), file=sys.stderr)
sys.exit(1)
print("OK: %d rows, %d columns; all null fractions <= %.3f" % (total, len(header), max_null))
env:
- name: DATASET_PATH
value: "{{inputs.parameters.dataset-path}}"
- name: MAX_NULL_FRACTION
value: "{{inputs.parameters.max-null-fraction}}"
- name: MIN_ROWS
value: "{{inputs.parameters.min-rows}}"
Version history
Read from the item's changelog. Each version has its own JSON document; the pinned catalogue vendors the manifest of the latest one, so that is the version that installs.
-
1.0.1 latest 2026-08-18
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.
kubectl apply -n argo -f https://catalog.dagweave.com/api/v1/items/data-quality-check/1.0.1/template.yamlargo template create -n argo https://catalog.dagweave.com/api/v1/items/data-quality-check/1.0.1/template.yaml -
1.0.0 2026-07-16
Initial release.
This release is documented, but its manifest is not vendored here, so it has no install command. Version document
Run it once
After installing, from the command line.
argo submit -n argo --from workflowtemplate/data-quality-check \
-p dataset-path=/data/export.csv
Workflow that references it
A Workflow with the required parameters filled from the examples.
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: data-quality-check-
spec:
workflowTemplateRef:
name: data-quality-check
arguments:
parameters:
- name: dataset-path
value: "/data/export.csv"
As a step of a larger workflow
steps:
- - name: data-quality-check
templateRef:
name: data-quality-check
template: check