Skip to main content

Cookbook

Pick a role and a goal, then jump to a verified command path.

Privacy / compliance

GoalStart here
Find PII in a CSVPII detection
Scan a database for PIIDatabase scanning
Restrict rules to English PIImetacrafter scan file users.csv --contexts pii --langs en
Push labels into DataHubCatalog export

Data engineers

GoalStart here
Classify columns in Parquet / ExcelFile scanning
Scan every file in a directoryscan bulk
Use Metacrafter from PythonPython SDK
Run a shared classifier APIAPI server

Analysts / stewards

GoalStart here
Understand what a column isSemantic labeling
Look up a datatypeRegistry
See loaded rulesrules
Statistics without classificationmetacrafter scan file data.csv --stats-only

Rule authors

GoalStart here
Add a YAML ruleCustom rules
Install the extended packpip install 'metacrafter[rules]'
Filter by country--country-codes us,ca
Hybrid rules + LLMLLM classification

First commands

# Human-readable table
metacrafter scan file data.csv --format short

# PII-focused JSON report
metacrafter scan file users.csv --contexts pii --format full --output-format json -o report.json

# Database
metacrafter scan sql "sqlite:///app.db" --format full -o db.json

# Inspect rules
metacrafter rules list --output-format json