After describing a TSV file, what quality control measures would you use to ensure the table is formatted correctly?
Write a SQL query that audits each imported row against the allowed assay codes and formatting rules for identifiers, calendar dates, numeric results, QC flags, and duplicate sample IDs.
source_row ascendingsource_row, sample_id, issue_count, qc_status, and issuesqc_status must be PASS only when no issues are found; NULL values in validated fields are treated as issues| Column | Type | Description |
|---|---|---|
| source_rowPK | INT | Original row number in the TSV file |
| sample_id | VARCHAR(20) | Imported sample identifier |
| assay_code | VARCHAR(20) | Imported assay code |
| collection_date_text | VARCHAR(10) | Collection date as imported text |
| result_text | VARCHAR(30) | Assay result as imported text |
| qc_flag | VARCHAR(10) | Imported quality-control flag |
| Column | Type | Description |
|---|---|---|
| assay_codePK | VARCHAR(20) | Approved assay code |
| assay_name | VARCHAR(80) | Human-readable assay name |