# Data pipeline checklist

_Type it, validate it and quarantine the rest before the model reads a row_  
@demotoprod · RAG · also LEVERS · October 2026

CSV has no formal specification, and an ordinary table in one file-based SQL engine will accept text in an integer column. A shifted column can then reach the prompt as plain rows. Four checks type and validate the data, then let the model query the clean store, each sized for an afternoon.

**One schema file the gate checks against**

```
{
  "fields": [
    {"name": "invoice_id", "type": "integer",
     "constraints": {"required": true, "unique": true}},
    {"name": "total_cents", "type": "integer",
     "constraints": {"required": true, "minimum": 0}},
    {"name": "status", "type": "string",
     "constraints": {"enum": ["<your values>"]}}
  ],
  "primaryKey": "invoice_id"
}
```

- [ ] **1. Type every column, and let a failed cast stop the load**

  **What happened.** In an ordinary table of one file-based SQL engine, 'xyz' inserted into an integer column is stored as text; a strict table raises an error. A type-guessing CSV loader samples 20,480 rows by default and falls back to text when nothing else fits.

  **The check.**
  - Name and type every column yourself, NOT NULL where a blank is an error, in strict mode.
  - Give the loader those types instead of letting it detect them, so a bad value raises an error.

  ```
  CREATE TABLE invoices (
    invoice_id  INTEGER NOT NULL PRIMARY KEY,
    total_cents INTEGER NOT NULL CHECK (total_cents >= 0)
  ) STRICT;
  ```

  Source: [STRICT Tables, a file-based SQL engine's documentation, read 27 Oct 2026](https://www.sqlite.org/stricttables.html)

  Source: [CSV auto detection, a second file-based engine's documentation, read 27 Oct 2026](https://duckdb.org/docs/stable/data/csv/auto_detection.html)

- [ ] **2. Check each file against a written schema before any row loads**

  **What happened.** RFC 4180 says each line should contain the same number of fields and the header line is optional, its presence signalled outside the file. A tabular schema standard declares required, unique, minimum, maximum, pattern and enum constraints.

  **The check.**
  - Reject a whole file whose header or field count differs from the schema.
  - Keep the rules (type, required, min, max, pattern, enum) in one schema file; reject any row that breaks one.
  - Test the gate with a broken export: a shifted column, text in a number field.

  Source: [RFC 4180, Common Format and MIME Type for CSV Files, October 2005](https://www.rfc-editor.org/rfc/rfc4180)

  Source: [Table Schema specification, version 1, read 27 Oct 2026](https://specs.frictionlessdata.io/table-schema/)

- [ ] **3. Quarantine rejects with a reason, and stop the run when they pile up**

  **What happened.** A loader that skips bad rows hides them. One CSV reader can store each skipped line with its line number, column, error type (such as a failed cast) and message. One published validation system compares each batch with its schema and alerts the on-call to any disagreement.

  **The check.**
  - Write each rejected row to a quarantine table with file, line, column and reason; drop none silently.
  - Stop the run and call no model when rejects pass a share you set from past clean files.

  Source: [Reading faulty CSV files, a file-based SQL engine's documentation, read 27 Oct 2026](https://duckdb.org/docs/stable/data/csv/reading_faulty_csv_files.html)

  Source: [Data Validation for Machine Learning, 2019](https://mlsys.org/Conferences/2019/doc/2019/167.pdf)

- [ ] **4. Give the model a read-only query tool in place of the rows**

  **What happened.** In a 2023 study, accuracy could fall significantly when the answer sat in the middle of a long input, even for long-context models; one task was key-value lookup among 75 to 300 pairs. One engine's security page says untrusted SQL needs sandboxing.

  **The check.**
  - Expose one tool that runs a single SELECT and returns at most 50 rows; the model never sees the table.
  - Treat the model's SQL as untrusted: attach read-only, switch off external access, lock settings, log every query.

  ```
  ATTACH 'clean.db' AS clean (READ_ONLY);
  SET enable_external_access = false;   -- no ATTACH, COPY or file reads after this
  SET lock_configuration = true;        -- model SQL cannot change settings
  ```

  Source: [Lost in the Middle: How Language Models Use Long Contexts, Jul 2023](https://arxiv.org/pdf/2307.03172v3)

  Source: [Securing a file-based SQL engine, documentation, read 27 Oct 2026](https://duckdb.org/docs/stable/operations_manual/securing_duckdb/overview.html)

Figures are the sources' own: 20,480 is one loader's default sample. The 2023 result is what can happen in the models tested, not what every model does. 50 rows and 'an afternoon' are planning estimates. Code is example syntax for two engines.

The live version of this list, with every source link, is at https://indica-tech.com/checklists/data-pipeline/. The PDF is at https://indica-tech.com/checklists/lead-magnets/LEVERS-data-pipeline-checklist-2026-10.pdf.

---

**Nitish Gautam — Indica Technology Ltd.** Founder-led AI engineering: demo to production, in regulated industries, on fixed scope.

Website https://indica-tech.com · Book a call https://indica-tech.com/#contact · hello@indica-tech.com

YouTube youtube.com/@demotoprod · LinkedIn linkedin.com/company/indica-technology · Instagram and TikTok @demotoprod

_Data pipeline checklist · October 2026 · @demotoprod_
