11.25 Line numbers and the flagged dataset
Enable [output].flagged_dataset=true to write qc_flagged_data.csv. It preserves the dataset as read and adds QC_FLAG, containing unique line-level check IDs separated by |.
Figure 11.9. The flagged copy is a line-indexed review surface. It does not apply corrections.
Why it helps
An analyst can filter QC_FLAG for TIM01 or COV03 and view the whole row context. Multiple IDs on one row are expected because one source defect can have several consequences.
The generated copy uses the source delimiter style and appends one column. Blank lines stay blank. Findings without a positive source line cannot be attached to a row.
Line numbers are physical
They identify the received text, including its header and blank lines. If the dataset is re-exported, line numbers can shift. Preserve the exact input hash with the findings. Use ID/TIME and other keys as supporting context, not as a replacement when duplicates exist.
Never correct the flagged copy
Investigate the authoritative source, make a controlled correction in the upstream or analysis-data process, version the dataset, and rerun. Editing QC_FLAG or other cells in the review copy breaks the evidence link.
Spreadsheet use
If the flagged copy is opened in a spreadsheet, import every identifier as text and numeric measures with explicit locale. Do not save back over the CSV. Filtering can hide rows, scientific notation can alter long IDs, and auto-date conversion can corrupt time-like fields. Export reviewer notes to a separate controlled file keyed by check ID, source hash and line/subject context.
Common mistakes
- Treating
QC_FLAGas one overall pass/fail field. - Editing and then modeling from the flagged copy.
- Using old line numbers against a new export.
- Expecting aggregate findings to appear on a row.
Checklist
- Pair flags with the exact source hash.
- Filter by check ID and inspect surrounding rows.
- Correct upstream and create a new version.
- Rerun and compare finding IDs/counts.
Further reading
See checklist/findings, output integrity and remediation.