link_field_lineage
Traces ONE lineage link from a source field (or from an entire source block, when fromFieldId is omitted or null) to a target field of an ERD entity — it answers 'where does this field come from?'. Required: a unique id, fromCellId, toCellId and toFieldId. The source and target blocks and the fields must already exist AND the field must belong to the block you name (a field id of another entity is refused): create them first with add_data_source, add_entity or add_field. REFUSED with an error, nothing written, on an unknown block or field or on an id that already exists. Optional: transformLogic (the ETL/SQL step in a few words), isPii (default false; flip it later with mark_field_pii) and notes. Nothing is overwritten: a second link with a new id adds another path. Remove one with delete_field_lineage.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Unique ID of the lineage relation | |
| isPii | No | PII flag for governance (default false) | |
| notes | No | Free notes on this lineage link | |
| toCellId | Yes | Target ERD entity | |
| toFieldId | Yes | Target ERD field | |
| fromCellId | Yes | Source block (typically kind=data-source) | |
| fromFieldId | No | ID of the source field (null if the source is an entire data-source block) | |
| transformLogic | No | ETL/SQL/short description | |
| expectedProjectId | No | UUID of the project targeted by THIS call. ACTUALLY targets this project instead of the session project. Refused without changing anything if access is not granted. |