system.access.table_lineage - source and target table meanings
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 09:00 AM
I've been using the system.access.table_lineage table, and I'm trying to understand when the source and target tables are defined.
For example, picking a specific job run and looking at the lineage:
select
source_type,
source_table_full_name,
target_type,
target_table_full_name
from system.access.table_lineage
where 1=1
and entity_id = 279912916130857 and entity_run_id = 335708887601361
order by event_time DESC
LIMIT 1000;
I see a few scenarios:
- source_type = null and target_type =TABLE (I think this is a write to the table)
- source_type = TABLE, target_type = null (I think this is a read of a table)
- source_type = TABLE (table X), target_type = TABLE (table Y) - I don't know what this is
- source_type = VIEW, target_type = TABLE - I don't know what this is
- source_type = TABLE, target_type = VIEW (I think this is a read of the "target" view, indicating it then reads from the "source" of the table)
I looked over the documentation in
DESCRIBE TABLE EXTENDED system.access.table_lineage
but it did not help with my understanding.