Discover your database schema — tables, columns, types, constraints, and relationships. Scanning is the first step in building context: KTX needs to understand your warehouse structure before it can build semantic sources.
Scan commands live under ktx dev scan. See also the Building Context guide for a walkthrough.
# Run a structural scan of a connectionktx dev scan my-warehouse# Run a scan with LLM enrichmentktx dev scan my-warehouse --mode enriched# Run a scan with relationship detectionktx dev scan my-warehouse --mode relationships# Dry-run a scan (don't write results)ktx dev scan my-warehouse --dry-run# Check the status of a scan runktx dev scan status run-abc123# View the scan reportktx dev scan report run-abc123# View scan report as JSONktx dev scan report run-abc123 --json# List relationship candidates pending reviewktx dev scan relationships run-abc123# List all relationships regardless of statusktx dev scan relationships run-abc123 --status all# Accept a relationship candidatektx dev scan relationships run-abc123 --accept candidate-xyz# Reject a relationship candidate with a notektx dev scan relationships run-abc123 --reject candidate-xyz --note "false positive"# Apply all accepted relationships to the manifestktx dev scan relationship-apply run-abc123 --all-accepted# Preview what would be appliedktx dev scan relationship-apply run-abc123 --all-accepted --dry-run# Export relationship feedback as calibration labelsktx dev scan relationship-feedback --json# Calibrate relationship detection thresholdsktx dev scan relationship-calibration --accept-threshold 0.9 --review-threshold 0.6# Get threshold advice based on review decisionsktx dev scan relationship-thresholds