assert
Checks record-count and field-existence conditions. The pipeline fails if any assertion is not met.
Supported formats: json jsonl csv
Options
At least one option is required.
| Option | Type | Description |
|---|---|---|
min-records | integer | Payload must have at least this many records. Must be ≥ 0. |
max-records | integer | Payload must have at most this many records. Must be ≥ 0. |
records-equal | integer | Payload must have exactly this many records. Must be ≥ 0. |
field-exists | string | The named field must exist in the payload. |
Examples
Assert a minimum and maximum:
yaml
- assert:
min-records: 1
max-records: 10000Assert an exact count:
yaml
- assert:
records-equal: 5Assert a field exists:
yaml
- assert:
field-exists: emailCombined:
yaml
- assert:
min-records: 10
max-records: 1000
field-exists: emailNotes
min-recordsmust be ≤max-recordswhen both are set.records-equalmust fit within themin-records/max-recordsbounds when they are also set.- For CSV,
field-existschecks the header row. - For JSON and JSONL,
field-existspasses if any record contains the field.