Skip to content

Commit 0e0a7d9

Browse files
authored
spark agent #917 Add Column Level Lineage support into HttpOpenLineag… (#919)
* spark agent #917 Add Column Level Lineage support into HttpOpenLineageDispatcher - SchemaDatasetFacet - ColumnLineageDatasetFacet
1 parent d094160 commit 0e0a7d9

29 files changed

Lines changed: 1173 additions & 67 deletions

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,6 @@ metastore_db/
7777

7878
#JEnv
7979
.java-version
80+
81+
# Project specific
82+
local/

core/pom.xml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -237,17 +237,6 @@
237237
<language />
238238
</configuration>
239239
</execution>
240-
<execution>
241-
<id>swagger.openlineage.api.v0_3_1</id>
242-
<goals>
243-
<goal>generate</goal>
244-
</goals>
245-
<configuration>
246-
<inputSpec>${project.basedir}/src/main/resources/api/openlineage/OpenLineage.yml</inputSpec>
247-
<modelPackage>za.co.absa.spline.producer.model.openlineage.v0_3_1</modelPackage>
248-
<language />
249-
</configuration>
250-
</execution>
251240
</executions>
252241
</plugin>
253242
<plugin>
Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
{
2+
"$schema": "https://json-schema.org/draft/2020-12/schema",
3+
"$id": "https://openlineage.io/spec/facets/1-2-0/ColumnLineageDatasetFacet.json",
4+
"$defs": {
5+
"ColumnLineageDatasetFacet": {
6+
"allOf": [
7+
{
8+
"$ref": "https://openlineage.io/spec/2-0-2/OpenLineage.json#/$defs/DatasetFacet"
9+
},
10+
{
11+
"type": "object",
12+
"properties": {
13+
"fields": {
14+
"description": "Column level lineage that maps output fields into input fields used to evaluate them.",
15+
"type": "object",
16+
"additionalProperties": {
17+
"type": "object",
18+
"properties": {
19+
"inputFields": {
20+
"type": "array",
21+
"items": {
22+
"$ref": "#/$defs/InputField"
23+
}
24+
},
25+
"transformationDescription": {
26+
"type": "string",
27+
"description": "a string representation of the transformation applied",
28+
"deprecated": true
29+
},
30+
"transformationType": {
31+
"type": "string",
32+
"description": "IDENTITY|MASKED reflects a clearly defined behavior. IDENTITY: exact same as input; MASKED: no original data available (like a hash of PII for example)",
33+
"deprecated": true
34+
}
35+
},
36+
"additionalProperties": true,
37+
"required": ["inputFields"]
38+
}
39+
},
40+
"dataset": {
41+
"description": "Column level lineage that affects the whole dataset. This includes filtering, sorting, grouping (aggregates), joining, window functions, etc.",
42+
"type": "array",
43+
"items": {
44+
"$ref": "#/$defs/InputField"
45+
}
46+
}
47+
},
48+
"additionalProperties": true,
49+
"required": ["fields"]
50+
}
51+
],
52+
"type": "object"
53+
},
54+
"InputField": {
55+
"description": "Represents a single dependency on some field (column).",
56+
"type": "object",
57+
"properties": {
58+
"namespace": {
59+
"type": "string",
60+
"description": "The input dataset namespace"
61+
},
62+
"name": {
63+
"type": "string",
64+
"description": "The input dataset name"
65+
},
66+
"field": {
67+
"type": "string",
68+
"description": "The input field"
69+
},
70+
"transformations": {
71+
"type": "array",
72+
"items": {
73+
"type": "object",
74+
"properties": {
75+
"type": {
76+
"description": "The type of the transformation. Allowed values are: DIRECT, INDIRECT",
77+
"type": "string"
78+
},
79+
"subtype": {
80+
"type": "string",
81+
"description": "The subtype of the transformation"
82+
},
83+
"description": {
84+
"type": "string",
85+
"description": "a string representation of the transformation applied"
86+
},
87+
"masking": {
88+
"type": "boolean",
89+
"description": "is transformation masking the data or not"
90+
}
91+
},
92+
"required": ["type"],
93+
"additionalProperties": true
94+
}
95+
}
96+
},
97+
"additionalProperties": true,
98+
"required": ["namespace", "name", "field"]
99+
}
100+
},
101+
"type": "object",
102+
"properties": {
103+
"columnLineage": {
104+
"$ref": "#/$defs/ColumnLineageDatasetFacet"
105+
}
106+
}
107+
}

core/src/main/resources/api/openlineage/OpenLineage.json renamed to core/src/main/resources/api/openlineage/OpenLineage.v1.0.2.json

File renamed without changes.

core/src/main/resources/api/openlineage/OpenLineage.yml renamed to core/src/main/resources/api/openlineage/OpenLineage.v1.0.2.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ paths:
1818
content:
1919
application/json:
2020
schema:
21-
$ref: 'OpenLineage.json#/$defs/RunEvent'
21+
$ref: 'OpenLineage.v1.0.2.json#/$defs/RunEvent'
2222
responses:
2323
'200':
2424
description: OK
25-

0 commit comments

Comments
 (0)