Skip to content

Pipeline schema

This page is generated from the same JSON schema the extension validates pipeline files against, so it is always exactly what the extension accepts. For the narrative version, read the Pipelines guide.

Add the $schema key to get completion and validation while you type:

{
"$schema": "https://raw.githubusercontent.com/bash-365/csv-vscoode/main/schemas/csvpipe.schema.json",
"name": "Clean sales export",
"steps": [{ "kind": "trim" }]
}

Files named *.csvpipe.json are validated automatically; the $schema key only matters outside VS Code.

Field Type Required Description
name string yes Display name of the pipeline.
description string no —
applyTo array of string no Workspace-relative glob patterns for the files this pipeline applies to (used by onOpen/onSave triggers and for suggestions).
trigger "manual" | "onOpen" | "onSave" no manual: run from the panel or command; onOpen: apply to the document when a matching file opens in the grid (pre-processing, undoable); onSave: run after a matching file is saved (post-processing, e.g. export). Default: "manual".
output object no —
steps array of step yes —

Every step is an object with a kind. Steps run in order, each one receiving the table the previous step produced. All steps also accept the shared fields below.

Field Type Description
label string Optional label shown in logs and the panel.
disabled boolean —
Field Type Required Description
expression string yes JavaScript expression evaluated per row; columns are variables (e.g. price > 5 && contains(name, ‘widget’)).
Field Type Required Description
column string yes Column to add or overwrite.
expression string yes JavaScript expression, e.g. round(price * qty, 2).
Field Type Required Description
from string yes —
to string yes —
Field Type Required Description
columns columns yes —
Field Type Required Description
columns columns yes —
Field Type Required Description
column string yes —
direction "asc" | "desc" no Default: "asc".
Field Type Required Description
columns columns no —
Field Type Required Description
columns columns no —
Field Type Required Description
columns columns no —
case "upper" | "lower" | "title" yes —
Field Type Required Description
columns columns no —
find string yes —
replacement string no Default: "".
regex boolean no Default: false.
caseSensitive boolean no Default: false.
Field Type Required Description
columns columns no —
value string yes —
Field Type Required Description
count integer yes —
offset integer no Default: 0.
Field Type Required Description
column string yes —
separator string yes —
limit integer no Default: 0.
regex boolean no Default: false.
removeSource boolean no Default: false.
Field Type Required Description
columns columns yes —
separator string no Default: " ".
name string yes —
removeSources boolean no Default: false.

Takes no options beyond the shared fields.

Takes no options beyond the shared fields.

Field Type Required Description
count integer yes —
seed integer no Default: 42.
Field Type Required Description
code string yes Function body with columns, rows (array of objects), helpers and table in scope. Return rows, { columns, rows }, or nothing to keep in-place mutations.
Field Type Required Description
path string yes Workspace-relative .js file exporting (table, helpers) => table.
Field Type Required Description
query string yes SQLite query; the current data is available as table csv.
Field Type Required Description
command string yes Shell command run from the workspace root. Receives the data on stdin, must print the result to stdout.
format "csv" | "json" no Default: "csv".