aboutsummaryrefslogtreecommitdiffstats
path: root/docs/provenance-lineage.puml
blob: 4e8f68aa1b45fd3897e4e19b9d985e0ec3500de5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
@startuml provenance-lineage
!theme plain
title Provenance and Lineage Tracking

component "Base Tuple\n(employee)" as T1

note right of T1
  **Data:**
  id = 1
  name = "Alice"
  age = 30
  salary = 100000

  **Meta:**
  provenance:
    id: (employee, id)
    name: (employee, name)
    age: (employee, age)
    salary: (employee, salary)
  lineage: (base, employee)
end note

component "After Select\n(age > 25)" as T2

note right of T2
  **Data:**
  id = 1
  name = "Alice"
  age = 30
  salary = 100000

  **Meta:**
  provenance: (same as above)
  lineage:
    select
    fun(T) -> age > 25 end
    (base, employee)
end note

component "After Project\n[name, age]" as T3

note right of T3
  **Data:**
  name = "Alice"
  age = 30

  **Meta:**
  provenance:
    name: (employee, name)
    age: (employee, age)
  lineage:
    project
    [name, age]
    (select, _, (base, employee))
end note

T1 -down-> T2: select operation\nadds to lineage
T2 -down-> T3: project operation\nfilters provenance

note bottom of T3
  **Benefits:**
  - Data source tracking
  - Query result explanation
  - Reproducibility
  - Debugging support
  - Foundation for updatable views
end note

@enduml