Datasource lineage

Trace how a datasource was created from raw inputs.
View as Markdown

The Datasource lineage view describes the lineage graph for a datasource.

Use it to understand which raw inputs produced a datasource, how ingestion contributed to the datasource, and which branches or increments are represented in the lineage graph.

When to use

Use caseDescription
Audit datasource provenanceTrace the raw inputs that contributed to a datasource.
Review ingestion historyInspect increments, branches, run IDs, and input file counts.
Understand data volumeReview row counts, train/test split counts, masked rows, and size information.
Build lineage visualisationsUse nodes and edges to render a graph of the datasource lineage.

Generate the view

Generate the Datasource lineage view from a datasource.

POST
/datasources/:datasourceId/views
1curl -X POST https://api.hi.umnai.com/datasources/datasourceId/views \
2 -H "Authorization: Bearer <token>" \
3 -H "Content-Type: application/json" \
4 -d '{
5 "data": [
6 {
7 "view_type": "DATASOURCE_LINEAGE"
8 }
9 ]
10}'
Response
1{
2 "data": [
3 {
4 "view_type": "DATASOURCE_LINEAGE",
5 "view_data": {
6 "nodes": {
7 "columns": [
8 "friendly_label",
9 "node_type",
10 "label",
11 "increment_label",
12 "increment_index",
13 "branch",
14 "source_branch",
15 "n_rows",
16 "n_rows_train",
17 "n_rows_test",
18 "n_rows_masked",
19 "n_input_files",
20 "input_files",
21 "increment_size_mb",
22 "increment_mask_size_mb",
23 "total_increment_size_mb",
24 "increment_run_id",
25 "incremented_at",
26 "datasource_id",
27 "dataset_id",
28 "datasource_name",
29 "dataset_name"
30 ],
31 "index": [
32 0,
33 1,
34 2
35 ],
36 "data": [
37 [
38 "6330f1c8-adult_income-root",
39 "DATASOURCE",
40 "6330f1c8-adult_income-root",
41 "main",
42 0,
43 "main",
44 null,
45 48842,
46 39137,
47 9705,
48 0,
49 2,
50 "[0 1]",
51 5.7087664604,
52 0,
53 5.7087664604,
54 "ba4e1314d6a947a2baad05bc0823b2e8",
55 "2026-01-29 17:31:22",
56 "72ee0da340ef4d4b83fb92d23de60db4",
57 null,
58 "6330f1c8-adult_income-root",
59 null
60 ],
61 [
62 "RAW::0",
63 "RAW",
64 "0",
65 "None",
66 null,
67 "None",
68 null,
69 null,
70 null,
71 null,
72 null,
73 null,
74 "None",
75 null,
76 null,
77 null,
78 "None",
79 "NaT",
80 "None",
81 null,
82 "None",
83 null
84 ],
85 [
86 "RAW::1",
87 "RAW",
88 "1",
89 "None",
90 null,
91 "None",
92 null,
93 null,
94 null,
95 null,
96 null,
97 null,
98 "None",
99 null,
100 null,
101 null,
102 "None",
103 "NaT",
104 "None",
105 null,
106 "None",
107 null
108 ]
109 ],
110 "foreign_keys": [],
111 "labels": [],
112 "types": [
113 {
114 "data_type": "STRING",
115 "format": null
116 },
117 {
118 "data_type": "STRING",
119 "format": null
120 },
121 {
122 "data_type": "STRING",
123 "format": null
124 },
125 {
126 "data_type": "STRING",
127 "format": null
128 },
129 {
130 "data_type": "NUMBER",
131 "format": "INT64"
132 },
133 {
134 "data_type": "STRING",
135 "format": null
136 },
137 {
138 "data_type": "ANY"
139 },
140 {
141 "data_type": "NUMBER",
142 "format": "INT64"
143 },
144 {
145 "data_type": "NUMBER",
146 "format": "INT64"
147 },
148 {
149 "data_type": "NUMBER",
150 "format": "INT64"
151 },
152 {
153 "data_type": "NUMBER",
154 "format": "INT64"
155 },
156 {
157 "data_type": "NUMBER",
158 "format": "INT64"
159 },
160 {
161 "data_type": "STRING",
162 "format": null
163 },
164 {
165 "data_type": "NUMBER",
166 "format": "FLOAT64"
167 },
168 {
169 "data_type": "NUMBER",
170 "format": "INT64"
171 },
172 {
173 "data_type": "NUMBER",
174 "format": "FLOAT64"
175 },
176 {
177 "data_type": "STRING",
178 "format": null
179 },
180 {
181 "data_type": "STRING",
182 "format": null
183 },
184 {
185 "data_type": "STRING",
186 "format": null
187 },
188 {
189 "data_type": "ANY"
190 },
191 {
192 "data_type": "STRING",
193 "format": null
194 },
195 {
196 "data_type": "ANY"
197 }
198 ]
199 },
200 "edges": {
201 "columns": [
202 "link_from",
203 "link_to",
204 "link_type",
205 "source_branch",
206 "target_branch"
207 ],
208 "index": [
209 0,
210 1
211 ],
212 "data": [
213 [
214 "RAW::0",
215 "6330f1c8-adult_income-root",
216 "INGESTION",
217 "",
218 "main"
219 ],
220 [
221 "RAW::1",
222 "6330f1c8-adult_income-root",
223 "INGESTION",
224 "",
225 "main"
226 ]
227 ],
228 "foreign_keys": [],
229 "labels": [],
230 "types": [
231 {
232 "data_type": "STRING",
233 "format": null
234 },
235 {
236 "data_type": "STRING",
237 "format": null
238 },
239 {
240 "data_type": "STRING",
241 "format": null
242 },
243 {
244 "data_type": "STRING",
245 "format": null
246 },
247 {
248 "data_type": "STRING",
249 "format": null
250 }
251 ]
252 }
253 },
254 "views_version": {
255 "major_version": 0,
256 "minor_version": 5,
257 "patch_version": 0,
258 "build_version": "dev76"
259 },
260 "output_version": {
261 "major_version": 1,
262 "minor_version": 0,
263 "patch_version": 3,
264 "build_version": null
265 }
266 }
267 ]
268}

The request only needs view_type set to DATASOURCE_LINEAGE.

Output

The response follows the shared Response structure format.

The Datasource lineage view returns multiple named dataframes inside view_data.

DataframeDescription
nodesLineage graph nodes, including datasource nodes and raw input nodes.
edgesLineage graph edges connecting raw inputs, datasource nodes, and lineage relationships.

Interpret the result

The Datasource lineage view is easiest to read as a graph: start with the nodes, then use the edges to understand how those nodes are connected.

Start with datasource nodes

Use nodes to identify the datasource node and its recorded metadata.

Rows with node_type set to DATASOURCE describe datasource-level lineage information such as row counts, train/test split counts, input file counts, increment metadata, branch information, and datasource identifiers.

Identify raw inputs

Use rows where node_type is RAW to identify raw input nodes.

Raw nodes represent upstream inputs that contributed to the datasource. Their labels can be used to connect the raw source to the datasource through the edges dataframe.

Follow edges

Use edges.link_from and edges.link_to to understand the direction of lineage.

Each edge connects a source node to a target node. link_type describes the relationship, such as ingestion. source_branch and target_branch describe the branch relationship when branch information is available.

Review increments and branches

Use increment_label, increment_index, branch, and source_branch to understand how datasource versions or increments relate to each other.

This is useful when a datasource has been updated over time or when you need to audit which branch produced the current datasource state.

Check data volume

Use n_rows, n_rows_train, n_rows_test, n_rows_masked, n_input_files, increment_size_mb, increment_mask_size_mb, and total_increment_size_mb to review the size and split of each datasource increment.

These fields are useful for verifying that the datasource contains the expected amount of data before onboarding, training, or review.

Field reference

The Datasource lineage view returns dataframes, so individual columns are not documented as standalone API schema properties.

nodes

The nodes dataframe contains the graph nodes.

FieldDescription
friendly_labelHuman-friendly label for the lineage node.
node_typeType of lineage node, such as DATASOURCE or RAW.
labelNode label used to identify the node in the lineage graph.
increment_labelLabel for the datasource increment, when available.
increment_indexIndex of the datasource increment, when available.
branchBranch associated with the node.
source_branchSource branch associated with the node, when available.
n_rowsNumber of rows associated with the node or increment.
n_rows_trainNumber of training rows associated with the node or increment.
n_rows_testNumber of test rows associated with the node or increment.
n_rows_maskedNumber of masked rows associated with the node or increment.
n_input_filesNumber of input files associated with the node or increment.
input_filesInput file references associated with the node or increment.
increment_size_mbSize of the increment in megabytes.
increment_mask_size_mbSize of the increment mask in megabytes.
total_increment_size_mbTotal size of the increment in megabytes.
increment_run_idID of the run that produced the increment.
incremented_atTimestamp when the increment was created.
datasource_idID of the datasource associated with the node.
dataset_idID of the dataset associated with the node, when available.
datasource_nameName of the datasource associated with the node.
dataset_nameName of the dataset associated with the node, when available.

edges

The edges dataframe contains the graph edges.

FieldDescription
link_fromSource node label for the edge.
link_toTarget node label for the edge.
link_typeType of lineage relationship.
source_branchSource branch for the edge, when available.
target_branchTarget branch for the edge, when available.