Flag Values Outside the Set

Start with four pinned status values. Read the allowed set first, then check each row against that set. The output keeps every original status value and adds status_valid. This is a validation check, not a cleanup or replacement step.

Checking whether each pinned category value belongs to an allowed set without replacing or changing rows.

highlighted = computed this step

Input status column

Start with 4 pinned status rows.

status values\text{status values}
Input Status Valuesrowstatus1paid2pending3refunded4cancelled

Allowed status set

Use the allowed set exactly as written.

allowed status set\text{allowed status set}
Allowed Statusesallowed statuspaidpendingrefunded

Add status_valid

Keep every row unchanged and add status_valid.

validation flag only\text{validation flag only}
Rows with Validation Flagrowstatusstatus_valid1paidtrue2pendingtrue3refundedtrue4cancelledfalse