Import CSV Test Data

Last updated on May 27, 2026

CSV is a tabular format: your column names are arbitrary, so you tell TofuPilot which column feeds each field. That column mapping is the schema. Save it once as a preset and every later file with the same layout imports in one click.

EncodingComma-separated text (RFC 4180)
Extension.csv
DetectionNeeds mapping (you map columns to fields)
OriginGeneric tabular export
Maps toRun, phases, measurements, limits, unit, custom metadata
Runs per fileOne
API importDashboard import (column mapping UI)

Prerequisites

  • A CSV file with a header row.
  • A Procedure to attach the runs to, created in the dashboard. The procedure is chosen on the import page and always overrides any procedure named in the file.

How tabular import works

Unlike OpenHTF or WATS, a CSV has no fixed shape. TofuPilot inspects the uploaded file's headers, then you map each TofuPilot field to one of your columns. The import page pre-selects a saved preset when your headers match it.

  1. Upload. Drop the .csv on the import page. The row shows Needs mapping.
  2. Inspect. Click the row to open the mapping sidebar. TofuPilot reads your headers and a sample of rows to preview the mapping.
  3. Map or pick a preset. Apply a saved preset, or map columns by hand.
  4. Import. The row turns to Mapped; click Import to create the runs.

Field mapping

Map your columns to these run fields. Only serial number, outcome, started at, and ended at are required.

TofuPilot fieldRequiredDescription
Serial numberYesIdentifies the Unit under test. Auto-creates the unit on first sight.
OutcomeYesRun pass/fail. Use a value map to translate your labels (for example PassedPASS).
Started atYesRun start timestamp.
Ended atYesRun end timestamp.
Part numberNoPart the unit belongs to.
Revision numberNoDesign Revision of the part.
Batch numberNoProduction Batch.
Operated byNoOperator name.
DescriptionNoFree-text run note.

Outcome value maps

Your file rarely uses TofuPilot's exact outcome labels. A value map translates each source value to a canonical outcome, so Passed, OK, and 1 can all map to PASS. The same applies to phase outcomes.

Measurements

A CSV stores measurements in one of two layouts. Pick the one that matches your file.

LayoutShapeMap
LongOne row per measurement, with a name column and a value column.Name, value, and optional units, lower limit, upper limit, outcome, and phase columns.
WideOne column per measurement, one row per run.Each measurement column, with optional name, units, fixed lower/upper limits, and phase.
NoneNo measurements, just run-level pass/fail.Nothing to map.

Phases

For the long layout you can map phase data carried on the measurement rows: a phase name column groups measurements into Phases, with optional phase outcome, started, and ended columns. When omitted, TofuPilot derives phase outcomes from their measurements and timing from the run.

Custom metadata

Map extra columns to typed metadata keys:

  • Run metadata attaches the value to the run.
  • Unit metadata attaches the value to the Unit under test (PATCH semantics, so it updates the unit).

Each side accepts up to 50 mapped columns.

Presets

Save a finished mapping as a preset so the next file with the same layout maps itself. When your headers match a preset, the import page pre-selects it and the row goes straight to Mapped. Reuse presets across files on the import page.

Dashboard only

Tabular import (the column-mapping flow) runs entirely on the dashboard: TofuPilot inspects the file's headers, you map columns, and the runs are created in one action. There is no public REST endpoint for tabular import, because the column mapping is a UI concept. To import CSV files, use the procedure's import page.

The public POST /v2/import endpoint covers the structured formats only (OpenHTF, WATS, ATML, NI TestStand, STDF, ATDF), whose shape the parser reads directly. See the REST API reference for those.

TofuPilot flags duplicate files by content hash, so re-importing the same CSV links to the existing run instead of creating a copy.

How is this guide?

On this page