SkilVaultSign inStart free

Catalogue / rawdata-ingest

rawdata-ingest

MITSignedNormalize explicitly mapped CSV records and audit input file identity. Use for changing equipment headers, units, missing measurements, and repeated imports.
---
name: rawdata-ingest
description: Normalize explicitly mapped CSV records and audit input file identity. Use for changing equipment headers, units, missing measurements, and repeated imports.
---

Raw data ingest

Keep source bytes and the original header. Detect a format from its required signature columns, map source columns and units, then normalize rows. Define an explicit missing-value rule. A recorded zero is a measurement. Reject an ambiguous signature or invalid number and point to the source row. Create a new adapter when source formats differ.

The portable CSV example reads UTF-8 or UTF-8 with BOM. Its two synthetic input formats produce the same measurement-records/1 JSON, with elapsed time in seconds and temperature in °C. It retains rows with an observed time and represents absent temperature as JSON null. Run from this folder:

python scripts/normalize_csv.py references/measurements.csv measurements.json
python scripts/check_ingest_identity.py references/measurements.csv references/manifest.json

For a tab-separated export with the same column signatures, run python scripts/normalize_csv.py measurements.tsv measurements.json --delimiter tab. Semicolon exports use --delimiter semicolon. Quote a text field containing the chosen separator according to CSV rules. The default is a comma. The declared units, decimal point, zero and missing-value rules apply to all three delimiters.

Use the sample manifest as a model. existing is an independent prior manifest keyed by dataset ID. candidate.metadata_source_sha256 comes from the file used to derive metadata. new and duplicate exit 0. Changes to content or metadata, identical bytes under another ID, and mismatched metadata source exit 1 for review. Malformed input exits 2. The checker reads files and prints observations. The CSV adapter has no equipment SDK or background watcher.