# Register Table Lineage

Record a derivation relationship between an existing source table and result table.

Use it after SQL transformations or table copies to retain the result's origin.

## Select source and result tables

| Setting | Description |
| --- | --- |
| `source_table_ref` | Required existing Catalog table supplying the data |
| `target_table_ref` | Required existing Catalog table containing the derived result |

Both must be valid Catalog table references and must identify different tables. Create the result table and write its data before registering the relationship.

## Use the output

`source_asset_id` and `target_asset_id` identify the two assets. `derivation` describes their `transformed_from` relationship.

This node records the relationship; preceding SQL or table-writing nodes perform the data processing.

## Example: trace a summary table

Flow: SQL Processing creates a result table → Register Table Lineage.

Select the original detail table and summary table. Check the returned asset IDs, then trace the source through asset relationships.

## Related pages

- [Variables and data flow](../../variables-and-data.md)
- [Run and debug](../../run-debug.md)
