CSV Contract WorkbenchDefine reusable YAML contracts for CSV files, edit them visually in VS Code, and run the same validations interactively or in unattended workflows. Validator workflows in 0.15Standalone, referenced and inline suite members share the visual contract editor. Add validation presets, edit nested predicates, capture and review versioned schema baselines, and execute full-scope rule previews. Explicitly enable Live tests to rerun valid draft changes; opening a contract never starts database queries. Suite controls include connection provenance and bulk editing, metadata preflight, selective reruns, searchable results, local history and same-connection cross-table checks. See Validator workflows for formats, defaults, examples and current limits; roadmap status identifies the remaining work. Baselines change only through explicit reviewed acceptance. Build contracts visuallyCreate a contract from a CSV to start with its real column names, then set presence and data-quality rules from the workbench. Save one or more local paths or HTTP/HTTPS URLs as test targets when the same contract should run without prompting. Each configured CSV or SQL Server target has a compact Actions menu for enabling, disabling, editing, opening, or removing it. Disabled targets remain in YAML and are excluded from runs until re-enabled. URL targets open in a read-only VS Code document or in the browser. The YAML file remains the source of truth and can always be edited directly with schema-aware IntelliSense.
Configure required and optional columns, null handling, uniqueness, lengths, allowed values, and regular expressions. See failures in contextRun a contract against a CSV and follow live per-target progress while large files are being checked. Review file, column, row, and cell failures directly below the run summary, before the column and row-test editors. Choose Red / green or Gradient directly in the Latest results header. Gradient mode keeps PASS and FAIL semantics unchanged while categorizing results as Clean, Limited impact, Moderate impact, or High impact. On the run screen, the main progress bar changes to the result color when a target completes. Hover over a category or completed bar to see the underlying 0–100 health score and how it is calculated. A completely clean result is the only green state. The preference also applies to suite and workspace reports and is available as
Inspect the selected column and the latest validation result in one workspace. Run workspace test suitesRunning a suite opens a dedicated progress screen immediately. It rolls all test files into an overall suite bar, shows one member bar per referenced or inline contract, and displays compact live target progress beneath each member. Independent targets execute concurrently, and up to four test files run at once by default so large suites do not overwhelm the database. Change Open CSV Contract in the Activity Bar to see every Compare CSV files semanticallyRun CSV Contract: Compare CSV Files Semantically for an order-independent full-row multiset comparison or an explicit keyed comparison. Duplicate keys are surfaced without pairing ambiguous records. Trimming, case folding, blank/null equivalence, date and decimal normalization, ignored columns, keys, and context columns are all opt-in. The aggregate result view keeps diagnostics redacted and bounded. Open complete normal-sized normalized results in the native VS Code diff editor, or save deterministic JSON, CSV, and Markdown evidence locally. The pure TypeScript engine runs in a real VS Code web host through What you can validate
Generate SQL Server staging validation and validate tablesUse the same reviewed contract against SQL Server tables and views. A Windows integrated target can be declared directly with non-secret server and database names; SQL logins and custom connection strings continue to use a secret-backed named profile. In the Workbench, Add table or view uses a profile to browse objects. Execute the contract from the Workbench, Workspace Tests, or CSV Contract: Run Contract. Validation is read-only, runs translatable rules server-side, and feeds the normal report. JavaScript regex rules use an exact read-only client fallback.
For SQL logins, use
You can still generate a standalone read-only script with CSV Contract: Generate SQL Server Staging Validation or The bundled CLI supports unattended generation without a database connection:
See SQL Server staging validation for the complete predicate reference and load-scoping behavior. Import a known staging schemaRun CSV Contract: Import SQL Server Table Schema or select Import table schema in the Workbench. Choose an offline The preview reports added and existing columns, contract-only columns that will remain in place, inferred technical constraints, preserved conflicts, table identity changes, and primary-key identity initialization. Nothing is written until Import Schema is confirmed. Existing descriptions, allowed values, regexes, conditional rules, load scope, detail limit, identities, and manually reviewed constraint values are preserved. Imported SQL type, nullability, length, precision, scale, identity, computed-column, and ordinal metadata remains under The bundled CLI supports the same offline merge:
Omit Get started
The Workbench opens a run view while targets execute in parallel. It shows rows read and groups validated for each target; once a target has been read, grouped checks show progress against its known row count. Workbench runs retain all available issue details for export by default. Set Generated contracts are deliberately conservative: they capture the observed columns and include sample row and cell assertions without guessing business rules. You decide which columns are required, unique, nullable, length-limited, or restricted to known values. Reuse the same contractContracts are plain YAML files designed to live beside the data workflow they protect. A broad schema contract and focused spot-check contracts can be applied to the same CSV. The included Node CLI and PowerShell wrapper use a streaming validator for unattended runs. Compatible contracts share one CSV pass, diagnostics remain bounded, and exact uniqueness checks spill to temporary disk instead of retaining the entire CSV in memory. Group rules are finalized only after EOF: normalized group observations are hash-partitioned to temporary disk during the stream, then reduced partition by partition so required companion rows may appear anywhere in the file. Local by designCSV contents and contracts are processed locally. CSV Contract Workbench does not upload validation data to a hosted service. LicenseThe extension code and documentation are licensed under Apache-2.0. CSV Contract Workbench and its product marks are Incursa brand assets and are not granted under that license. Run from PowerShellThe installed extension includes the PowerShell wrapper and its bundled validation engine. Node must be available on Locate the currently installed extension and run every target configured in a contract:
Run several contracts together:
Configured file paths and URLs are used automatically. Supply Compound suitesUse an ordered Save and reload comparisonsVersion 0.15.3 adds Save comparison setup in comparison results and CSV Contract: Load Comparison Setup in the Command Palette. Shared keyed CSV setups can also run in SSMS Database Tools 0.27.5. See the format and compatibility guide for supported conversions, relative paths, SQL limitations and legacy options. |


