Lesson 08 introduced the CLI commands as individual tools. This lesson shows how the agent composes them into complete workflows that answer the questions you actually ask during a data integration project.
The pattern is always the same:
- You ask a question in business terms.
- The agent selects and runs the right CLI commands.
- The agent combines the results with its own reasoning.
- You review the answer and decide what to do.
Question: "We're changing the format of CUST_ID in the source system. What breaks?"
Agent approach:
- Run
satsuma arrows legacy_sqlserver.CUST_IDto find all arrows that reference this field. - Run
satsuma lineage --from legacy_sqlserverto see which downstream schemas are affected. - Run
satsuma nlto find NL transforms that reference@CUST_IDvia@ref— these are implicit dependencies.
Agent response (example):
CUST_IDis used in 3 arrows:
CUST_ID -> customer_id— generates a UUID viauuid_v5(). Changing the format would change all generated UUIDs.CUST_ID -> legacy_customer_id— direct mapping. Type change may require target column update.@refreference indisplay_nameNL transform — used to check customer type. Logic depends onCUST_TYPE, notCUST_IDdirectly.Downstream impact:
postgres_dbis the only direct target. No further downstream schemas referencepostgres_db.
What you decide: Whether to regenerate UUIDs (breaking change) or maintain a lookup table for backward compatibility.
Question: "Are all target fields mapped? What's missing?"
Agent approach:
- Run
satsuma fields <target_schema>to get the full field list. - Run
satsuma arrowsfor each field to check which have incoming arrows. - Report any target fields with no source arrow.
Alternatively, use satsuma match-fields --source <s> --target <t> for a quick comparison.
Agent response (example):
All 18 fields in
postgres_dbare mapped:
- 14 have direct source arrows
- 3 are computed (no source):
display_name,address_id,migration_timestamp- 1 is derived from a calculation:
loyalty_tier(fromLOYALTY_POINTS)No unmapped target fields found.
Question: "Where does PII flow in this workspace? Is it properly protected?"
Agent approach:
- Run
satsuma find --tag pii pipeline.stmto locate all PII-tagged fields. - For each PII field, run
satsuma arrows <field>to trace where it flows. - Check target field metadata for encryption tags with
satsuma meta. - Report any PII that flows to an unencrypted target.
Agent response (example):
PII fields found:
legacy_sqlserver.EMAIL_ADDR(pii) →postgres_db.email(pii, format email) — no encryptionlegacy_sqlserver.TAX_ID(pii, encrypt) →postgres_db.tax_identifier_encrypted(pii, encrypt AES-256-GCM) — encryptedRisk:
What you decide: Whether email needs encryption, masking, or is acceptable in plaintext.
Question: "I just updated the customer mapping. What changed structurally?"
Agent approach:
- Run
satsuma diff <before> <after>to compare the two versions structurally. - Report added, removed, and modified arrows, fields, and metadata.
Agent response (example):
Structural diff:
- Added: Arrow
LOYALTY_POINTS -> loyalty_tierwith conditionalmap { }- Modified: Arrow
PHONE_NBR -> phone— added| warn_if_invalidto the transform pipeline- Removed: Arrow
NOTES -> notes— the notes field is no longer mappedWarning: Removing the
notesmapping meanspostgres_db.noteswill be NULL for all records. Was this intentional?
The structural diff is more useful than a line-by-line text diff because it understands Satsuma semantics. A reformatted file with no logical changes shows as "no changes."
Question: "What decisions are still unresolved in this workspace?"
Agent approach:
- Run
satsuma warnings pipeline.stmto find all//!and//?comments. - Run
satsuma nlto extract NL transforms that might contain hedging language ("TBD", "unclear", "pending"). - Organize by severity: blocking decisions vs. nice-to-have clarifications.
Agent response (example):
Blocking (3):
//?onlegacy_sqlserver.STATUS_CD— "need status code definitions" (no mapping possible without this)//!oncontainers[]— "no source mapping" (required by target but no data available)//?ondiscount_total— "should refunds reduce discount_total?"Informational (5):
//!onEMAIL_ADDR— "not validated — contains garbage" (mapping handles this withnull_if_invalid)//!onCREATED_DATE— "stored as MM/DD/YYYY string" (mapping parses withparse("MM/DD/YYYY"))- ...
Question: "Give me the full picture of this platform's data flow."
Agent approach:
- Run
satsuma graph --json pipeline.stmto export the complete workspace graph. - Parse the graph to identify source systems, intermediate layers, and final targets.
- Summarize the data flow in business terms.
The --json output includes:
- Nodes — every schema, mapping, and metric with their metadata.
- Edges — every data flow relationship (schema-to-mapping, mapping-to-schema, field-level arrows).
The agent can use this to answer questions like:
- "Which sources feed into the analytics warehouse?"
- "What's the longest data flow path?"
- "Which schemas are leaf nodes (nothing flows out)?"
This is critical. When the agent presents results, some parts are facts and some are interpretations:
| Source | Type | Trust level |
|---|---|---|
| CLI output (schema definitions, arrow lists, field counts) | Deterministic fact | Exact — verified by the parser |
Transform classification ([structural], [nl], etc.) |
Deterministic fact | Exact — determined by syntax |
| Agent's summary of what an NL transform does | Interpretation | Review — the agent might misunderstand intent |
| Agent's recommendation about a risk or gap | Inference | Decide — the agent provides input, you make the call |
When the agent says "this PII field is unencrypted," that's a fact from the metadata. When the agent says "this may be a compliance concern," that's an inference you need to evaluate in your context.
| You ask | Agent runs |
|---|---|
| "What does this workspace contain?" | summary |
| "Show me the customer schema" | schema <name> |
| "What breaks if I change field X?" | arrows + lineage + nl |
| "Are all target fields covered?" | fields + arrows |
| "Where does PII flow?" | find --tag pii + arrows + meta |
| "What changed in this update?" | diff |
| "What's still unresolved?" | warnings |
| "What NL transforms need review?" | nl + arrows (filter [nl] / [mixed]) |
| "Show me the full data flow" | graph --json |
| "Is this file valid?" | validate + lint |
- The agent composes CLI commands into workflows that answer business questions.
- Impact analysis traces field-level arrows, schema-level lineage, and NL
@refreferences. - Coverage checks compare target fields against incoming arrows.
- PII audits trace sensitive data flow and check for encryption.
- Structural diffs understand Satsuma semantics — reformats don't show as changes.
- Always distinguish deterministic CLI output (facts) from agent interpretation (inference).
Next: Lesson 10 — End-to-End Delivery with Satsuma, the CLI, and an Agent — bringing it all together into a real delivery loop.