Featuresmith Icon
Featuresmith
  • Docs
  • SDK
  • CLI
  • Examples
  • Roadmap
v0.4.0
Documentation

Getting Started

  • Introduction
  • Installation
  • Quick Start
  • Tutorial Notebooks
  • Benchmarks
  • Development Setup
  • Contributing

Core Concepts

  • Architecture Overview
  • Dataset Layer
  • Connectors
  • Profiling Engine
  • Rule Engine
  • Dataset Review Engine
  • ML Readiness Score
  • Target Leakage Detection
  • Dataset Diff Engine
  • Target Column Concept
  • Mental Model & Workflow
  • Interpreting Findings
  • Workflow Cheat Sheet
  • Beginner Glossary

Python SDK

  • load()
  • profile()
  • analyze()
  • review()
  • diff()
  • score()
  • plan()
  • Dataset
  • Data Models
  • Profile Models
  • Rule & Finding Models
  • Review Models
  • Score Models
  • Leakage Models
  • Diff Models
  • Exceptions
  • Plugins

CLI Reference

  • analyze
  • review
  • diff
  • score
  • plan
  • Configuration

Guides

  • CI/CD Integration
  • Custom Rules
  • Writing Plugins

Resources

  • Release Notes
  • FAQ
  • Troubleshooting
DocsGuide

Getting Started

  • Introduction
  • Installation
  • Quick Start
  • Tutorial Notebooks
  • Benchmarks
  • Development Setup
  • Contributing

Core Concepts

  • Architecture Overview
  • Dataset Layer
  • Connectors
  • Profiling Engine
  • Rule Engine
  • Dataset Review Engine
  • ML Readiness Score
  • Target Leakage Detection
  • Dataset Diff Engine
  • Target Column Concept
  • Mental Model & Workflow
  • Interpreting Findings
  • Workflow Cheat Sheet
  • Beginner Glossary

Python SDK

  • load()
  • profile()
  • analyze()
  • review()
  • diff()
  • score()
  • plan()
  • Dataset
  • Data Models
  • Profile Models
  • Rule & Finding Models
  • Review Models
  • Score Models
  • Leakage Models
  • Diff Models
  • Exceptions
  • Plugins

CLI Reference

  • analyze
  • review
  • diff
  • score
  • plan
  • Configuration

Guides

  • CI/CD Integration
  • Custom Rules
  • Writing Plugins

Resources

  • Release Notes
  • FAQ
  • Troubleshooting
HomeDocsfeaturesmith diff

CLI Reference

featuresmith diff

CLI command reference for snapshot diffs

bash
1featuresmith diff <old> <new> [options]

Compares two dataset snapshots and outputs structural, schema, missingness, duplicate, cardinality, and distribution shifts.

Flags and Options

<old>Required argument: path to the older dataset version (CSV, Excel, Parquet).
<new>Required argument: path to the newer dataset version.
--target TEXTName of the target column in both datasets to compare target leakage changes.
--format [table|json]Output format to display (default: table).
--output PATHPath to save the plain report or JSON output.
--fail-on [info|warning|critical]Severity threshold for CI-gating exit codes (default: critical).
--quietSuppress all standard console report output.
--verboseShow full Python tracebacks on error instead of generic messages.
--versionShow version info and exit.

Exit Codes

The command returns exit codes based on structural regressions and quality drops:

  • 0: Clean — no regression or quality drop meets or exceeds the severity threshold specified in --fail-on.
  • 1: Regressions (e.g. dropped columns, dtype mismatches, increased missingness, or target leakage escalation) meeting or exceeding the threshold were detected.
  • 2: Invalid usage, bad configuration, or target column missing.
  • 3: Source files missing or failed to parse.
  • 4: Internal error.

CLI Syntax Examples

bash
1# Compare two dataset snapshots
2featuresmith diff train_v1.csv train_v2.csv
3
4# Diff target leakage status changes
5featuresmith diff train_v1.csv train_v2.csv --target churn --fail-on warning
6
7# Output JSON report
8featuresmith diff train_v1.csv train_v2.csv --format json --output diff_report.json

Notes and Limitations

  • Target validation: The target column is validated against the schema of both snapshot versions. Missing columns in either version result in an exit code 2.
  • Deterministic summary: Deliberately uses the deterministic statistical profiling engine to generate snapshots, avoiding raw-data re-reads during comparisons.

Related Documentation

See the SDK equivalent fs.diff() and the review CLI reference featuresmith review.

Explore

  • Quick Start
  • Python SDK
  • CLI Reference
  • Examples
Featuresmith Icon
Featuresmith

Open-source data profiling and validation for Python engineers.

Documentation

  • Introduction
  • Quick Start
  • Python SDK
  • CLI Reference

Community

  • GitHub
  • Discussions
  • Issues
  • Contributing

Project

  • Roadmap
  • Release status
  • Benchmarks
  • Changelog
  • Examples

Legal

  • Apache 2.0 License
  • Code of Conduct
  • Security

© 2026 Featuresmith Contributors. Released under the Apache 2.0 License.

Built by Aditya Gangwani in the open.