acryl-datahub 1.1.0.4rc3__py3-none-any.whl → 1.1.0.5rc1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of acryl-datahub might be problematic. Click here for more details.
- {acryl_datahub-1.1.0.4rc3.dist-info → acryl_datahub-1.1.0.5rc1.dist-info}/METADATA +2355 -2355
- {acryl_datahub-1.1.0.4rc3.dist-info → acryl_datahub-1.1.0.5rc1.dist-info}/RECORD +26 -23
- {acryl_datahub-1.1.0.4rc3.dist-info → acryl_datahub-1.1.0.5rc1.dist-info}/entry_points.txt +1 -0
- datahub/_version.py +1 -1
- datahub/ingestion/api/sink.py +3 -0
- datahub/ingestion/run/pipeline.py +1 -1
- datahub/ingestion/sink/datahub_rest.py +12 -0
- datahub/ingestion/source/mock_data/__init__.py +0 -0
- datahub/ingestion/source/mock_data/datahub_mock_data.py +384 -0
- datahub/ingestion/source/mock_data/table_naming_helper.py +91 -0
- datahub/ingestion/source/preset.py +1 -1
- datahub/metadata/_internal_schema_classes.py +3 -0
- datahub/metadata/schema.avsc +2 -0
- datahub/metadata/schemas/ContainerProperties.avsc +2 -0
- datahub/metadata/schemas/DataFlowInfo.avsc +2 -0
- datahub/metadata/schemas/DataJobInfo.avsc +2 -0
- datahub/metadata/schemas/DataProcessKey.avsc +2 -0
- datahub/metadata/schemas/DatasetKey.avsc +2 -0
- datahub/metadata/schemas/IcebergWarehouseInfo.avsc +2 -0
- datahub/metadata/schemas/MLModelDeploymentKey.avsc +2 -0
- datahub/metadata/schemas/MLModelGroupKey.avsc +2 -0
- datahub/metadata/schemas/MLModelKey.avsc +2 -0
- datahub/metadata/schemas/MetadataChangeEvent.avsc +2 -0
- {acryl_datahub-1.1.0.4rc3.dist-info → acryl_datahub-1.1.0.5rc1.dist-info}/WHEEL +0 -0
- {acryl_datahub-1.1.0.4rc3.dist-info → acryl_datahub-1.1.0.5rc1.dist-info}/licenses/LICENSE +0 -0
- {acryl_datahub-1.1.0.4rc3.dist-info → acryl_datahub-1.1.0.5rc1.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
from typing import Dict
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class TableNamingHelper:
|
|
5
|
+
"""
|
|
6
|
+
Helper class for managing table naming conventions in mock data generation.
|
|
7
|
+
|
|
8
|
+
Table naming pattern: "hops_{lineage_hops}_f_{lineage_fan_out}_h{level}_t{table_index}"
|
|
9
|
+
"""
|
|
10
|
+
|
|
11
|
+
@staticmethod
|
|
12
|
+
def generate_table_name(
|
|
13
|
+
lineage_hops: int, lineage_fan_out: int, level: int, table_index: int
|
|
14
|
+
) -> str:
|
|
15
|
+
"""
|
|
16
|
+
Generate a table name following the standard naming convention.
|
|
17
|
+
|
|
18
|
+
Args:
|
|
19
|
+
lineage_hops: Total number of hops in the lineage graph
|
|
20
|
+
lineage_fan_out: Number of downstream tables per upstream table
|
|
21
|
+
level: Level of the table in the lineage graph (0-based)
|
|
22
|
+
table_index: Index of the table within its level (0-based)
|
|
23
|
+
|
|
24
|
+
Returns:
|
|
25
|
+
Table name following the pattern: "hops_{lineage_hops}_f_{lineage_fan_out}_h{level}_t{table_index}"
|
|
26
|
+
"""
|
|
27
|
+
return f"hops_{lineage_hops}_f_{lineage_fan_out}_h{level}_t{table_index}"
|
|
28
|
+
|
|
29
|
+
@staticmethod
|
|
30
|
+
def parse_table_name(table_name: str) -> Dict[str, int]:
|
|
31
|
+
"""
|
|
32
|
+
Parse a table name to extract its components.
|
|
33
|
+
|
|
34
|
+
Args:
|
|
35
|
+
table_name: Table name following the standard naming convention
|
|
36
|
+
|
|
37
|
+
Returns:
|
|
38
|
+
Dictionary containing parsed components:
|
|
39
|
+
- lineage_hops: Total number of hops in the lineage graph
|
|
40
|
+
- lineage_fan_out: Number of downstream tables per upstream table
|
|
41
|
+
- level: Level of the table in the lineage graph (0-based)
|
|
42
|
+
- table_index: Index of the table within its level (0-based)
|
|
43
|
+
|
|
44
|
+
Raises:
|
|
45
|
+
ValueError: If the table name doesn't follow the expected pattern
|
|
46
|
+
"""
|
|
47
|
+
try:
|
|
48
|
+
# Expected pattern: "hops_{lineage_hops}_f_{lineage_fan_out}_h{level}_t{table_index}"
|
|
49
|
+
parts = table_name.split("_")
|
|
50
|
+
|
|
51
|
+
if (
|
|
52
|
+
len(parts) != 6
|
|
53
|
+
or parts[0] != "hops"
|
|
54
|
+
or parts[2] != "f"
|
|
55
|
+
or not parts[4].startswith("h")
|
|
56
|
+
or not parts[5].startswith("t")
|
|
57
|
+
):
|
|
58
|
+
raise ValueError(f"Invalid table name format: {table_name}")
|
|
59
|
+
|
|
60
|
+
lineage_hops = int(parts[1])
|
|
61
|
+
lineage_fan_out = int(parts[3]) # lineage_fan_out is at index 3
|
|
62
|
+
level = int(parts[4][1:]) # Remove 'h' prefix from parts[4]
|
|
63
|
+
table_index = int(parts[5][1:]) # Remove 't' prefix from parts[5]
|
|
64
|
+
|
|
65
|
+
return {
|
|
66
|
+
"lineage_hops": lineage_hops,
|
|
67
|
+
"lineage_fan_out": lineage_fan_out,
|
|
68
|
+
"level": level,
|
|
69
|
+
"table_index": table_index,
|
|
70
|
+
}
|
|
71
|
+
except (ValueError, IndexError) as e:
|
|
72
|
+
raise ValueError(
|
|
73
|
+
f"Failed to parse table name '{table_name}': {str(e)}"
|
|
74
|
+
) from e
|
|
75
|
+
|
|
76
|
+
@staticmethod
|
|
77
|
+
def is_valid_table_name(table_name: str) -> bool:
|
|
78
|
+
"""
|
|
79
|
+
Check if a table name follows the expected naming convention.
|
|
80
|
+
|
|
81
|
+
Args:
|
|
82
|
+
table_name: Table name to validate
|
|
83
|
+
|
|
84
|
+
Returns:
|
|
85
|
+
True if the table name follows the expected pattern, False otherwise
|
|
86
|
+
"""
|
|
87
|
+
try:
|
|
88
|
+
TableNamingHelper.parse_table_name(table_name)
|
|
89
|
+
return True
|
|
90
|
+
except ValueError:
|
|
91
|
+
return False
|
|
@@ -69,7 +69,7 @@ class PresetConfig(SupersetConfig):
|
|
|
69
69
|
|
|
70
70
|
@platform_name("Preset")
|
|
71
71
|
@config_class(PresetConfig)
|
|
72
|
-
@support_status(SupportStatus.
|
|
72
|
+
@support_status(SupportStatus.CERTIFIED)
|
|
73
73
|
@capability(
|
|
74
74
|
SourceCapability.DELETION_DETECTION, "Optionally enabled via stateful_ingestion"
|
|
75
75
|
)
|
datahub/metadata/schema.avsc
CHANGED
|
@@ -9508,6 +9508,7 @@
|
|
|
9508
9508
|
"QA": "Designates quality assurance fabrics",
|
|
9509
9509
|
"RVW": "Designates review fabrics",
|
|
9510
9510
|
"SANDBOX": "Designates sandbox fabrics",
|
|
9511
|
+
"SBX": "Alternative spelling for sandbox",
|
|
9511
9512
|
"SIT": "System Integration Testing",
|
|
9512
9513
|
"STG": "Designates staging fabrics",
|
|
9513
9514
|
"TEST": "Designates testing fabrics",
|
|
@@ -9531,6 +9532,7 @@
|
|
|
9531
9532
|
"PRD",
|
|
9532
9533
|
"TST",
|
|
9533
9534
|
"SIT",
|
|
9535
|
+
"SBX",
|
|
9534
9536
|
"SANDBOX"
|
|
9535
9537
|
],
|
|
9536
9538
|
"doc": "Fabric group type"
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
"QA": "Designates quality assurance fabrics",
|
|
100
100
|
"RVW": "Designates review fabrics",
|
|
101
101
|
"SANDBOX": "Designates sandbox fabrics",
|
|
102
|
+
"SBX": "Alternative spelling for sandbox",
|
|
102
103
|
"SIT": "System Integration Testing",
|
|
103
104
|
"STG": "Designates staging fabrics",
|
|
104
105
|
"TEST": "Designates testing fabrics",
|
|
@@ -122,6 +123,7 @@
|
|
|
122
123
|
"PRD",
|
|
123
124
|
"TST",
|
|
124
125
|
"SIT",
|
|
126
|
+
"SBX",
|
|
125
127
|
"SANDBOX"
|
|
126
128
|
],
|
|
127
129
|
"doc": "Fabric group type"
|
|
@@ -153,6 +153,7 @@
|
|
|
153
153
|
"QA": "Designates quality assurance fabrics",
|
|
154
154
|
"RVW": "Designates review fabrics",
|
|
155
155
|
"SANDBOX": "Designates sandbox fabrics",
|
|
156
|
+
"SBX": "Alternative spelling for sandbox",
|
|
156
157
|
"SIT": "System Integration Testing",
|
|
157
158
|
"STG": "Designates staging fabrics",
|
|
158
159
|
"TEST": "Designates testing fabrics",
|
|
@@ -176,6 +177,7 @@
|
|
|
176
177
|
"PRD",
|
|
177
178
|
"TST",
|
|
178
179
|
"SIT",
|
|
180
|
+
"SBX",
|
|
179
181
|
"SANDBOX"
|
|
180
182
|
],
|
|
181
183
|
"doc": "Fabric group type"
|
|
@@ -219,6 +219,7 @@
|
|
|
219
219
|
"QA": "Designates quality assurance fabrics",
|
|
220
220
|
"RVW": "Designates review fabrics",
|
|
221
221
|
"SANDBOX": "Designates sandbox fabrics",
|
|
222
|
+
"SBX": "Alternative spelling for sandbox",
|
|
222
223
|
"SIT": "System Integration Testing",
|
|
223
224
|
"STG": "Designates staging fabrics",
|
|
224
225
|
"TEST": "Designates testing fabrics",
|
|
@@ -242,6 +243,7 @@
|
|
|
242
243
|
"PRD",
|
|
243
244
|
"TST",
|
|
244
245
|
"SIT",
|
|
246
|
+
"SBX",
|
|
245
247
|
"SANDBOX"
|
|
246
248
|
],
|
|
247
249
|
"doc": "Fabric group type"
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
"QA": "Designates quality assurance fabrics",
|
|
53
53
|
"RVW": "Designates review fabrics",
|
|
54
54
|
"SANDBOX": "Designates sandbox fabrics",
|
|
55
|
+
"SBX": "Alternative spelling for sandbox",
|
|
55
56
|
"SIT": "System Integration Testing",
|
|
56
57
|
"STG": "Designates staging fabrics",
|
|
57
58
|
"TEST": "Designates testing fabrics",
|
|
@@ -75,6 +76,7 @@
|
|
|
75
76
|
"PRD",
|
|
76
77
|
"TST",
|
|
77
78
|
"SIT",
|
|
79
|
+
"SBX",
|
|
78
80
|
"SANDBOX"
|
|
79
81
|
],
|
|
80
82
|
"doc": "Fabric group type"
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"QA": "Designates quality assurance fabrics",
|
|
90
90
|
"RVW": "Designates review fabrics",
|
|
91
91
|
"SANDBOX": "Designates sandbox fabrics",
|
|
92
|
+
"SBX": "Alternative spelling for sandbox",
|
|
92
93
|
"SIT": "System Integration Testing",
|
|
93
94
|
"STG": "Designates staging fabrics",
|
|
94
95
|
"TEST": "Designates testing fabrics",
|
|
@@ -112,6 +113,7 @@
|
|
|
112
113
|
"PRD",
|
|
113
114
|
"TST",
|
|
114
115
|
"SIT",
|
|
116
|
+
"SBX",
|
|
115
117
|
"SANDBOX"
|
|
116
118
|
],
|
|
117
119
|
"doc": "Fabric group type"
|
|
@@ -64,6 +64,7 @@
|
|
|
64
64
|
"QA": "Designates quality assurance fabrics",
|
|
65
65
|
"RVW": "Designates review fabrics",
|
|
66
66
|
"SANDBOX": "Designates sandbox fabrics",
|
|
67
|
+
"SBX": "Alternative spelling for sandbox",
|
|
67
68
|
"SIT": "System Integration Testing",
|
|
68
69
|
"STG": "Designates staging fabrics",
|
|
69
70
|
"TEST": "Designates testing fabrics",
|
|
@@ -87,6 +88,7 @@
|
|
|
87
88
|
"PRD",
|
|
88
89
|
"TST",
|
|
89
90
|
"SIT",
|
|
91
|
+
"SBX",
|
|
90
92
|
"SANDBOX"
|
|
91
93
|
],
|
|
92
94
|
"doc": "Fabric group type"
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"QA": "Designates quality assurance fabrics",
|
|
61
61
|
"RVW": "Designates review fabrics",
|
|
62
62
|
"SANDBOX": "Designates sandbox fabrics",
|
|
63
|
+
"SBX": "Alternative spelling for sandbox",
|
|
63
64
|
"SIT": "System Integration Testing",
|
|
64
65
|
"STG": "Designates staging fabrics",
|
|
65
66
|
"TEST": "Designates testing fabrics",
|
|
@@ -83,6 +84,7 @@
|
|
|
83
84
|
"PRD",
|
|
84
85
|
"TST",
|
|
85
86
|
"SIT",
|
|
87
|
+
"SBX",
|
|
86
88
|
"SANDBOX"
|
|
87
89
|
],
|
|
88
90
|
"doc": "Fabric group type"
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
"QA": "Designates quality assurance fabrics",
|
|
68
68
|
"RVW": "Designates review fabrics",
|
|
69
69
|
"SANDBOX": "Designates sandbox fabrics",
|
|
70
|
+
"SBX": "Alternative spelling for sandbox",
|
|
70
71
|
"SIT": "System Integration Testing",
|
|
71
72
|
"STG": "Designates staging fabrics",
|
|
72
73
|
"TEST": "Designates testing fabrics",
|
|
@@ -90,6 +91,7 @@
|
|
|
90
91
|
"PRD",
|
|
91
92
|
"TST",
|
|
92
93
|
"SIT",
|
|
94
|
+
"SBX",
|
|
93
95
|
"SANDBOX"
|
|
94
96
|
],
|
|
95
97
|
"doc": "Fabric group type"
|
|
@@ -81,6 +81,7 @@
|
|
|
81
81
|
"QA": "Designates quality assurance fabrics",
|
|
82
82
|
"RVW": "Designates review fabrics",
|
|
83
83
|
"SANDBOX": "Designates sandbox fabrics",
|
|
84
|
+
"SBX": "Alternative spelling for sandbox",
|
|
84
85
|
"SIT": "System Integration Testing",
|
|
85
86
|
"STG": "Designates staging fabrics",
|
|
86
87
|
"TEST": "Designates testing fabrics",
|
|
@@ -104,6 +105,7 @@
|
|
|
104
105
|
"PRD",
|
|
105
106
|
"TST",
|
|
106
107
|
"SIT",
|
|
108
|
+
"SBX",
|
|
107
109
|
"SANDBOX"
|
|
108
110
|
],
|
|
109
111
|
"doc": "Fabric group type"
|
|
@@ -2430,6 +2430,7 @@
|
|
|
2430
2430
|
"QA": "Designates quality assurance fabrics",
|
|
2431
2431
|
"RVW": "Designates review fabrics",
|
|
2432
2432
|
"SANDBOX": "Designates sandbox fabrics",
|
|
2433
|
+
"SBX": "Alternative spelling for sandbox",
|
|
2433
2434
|
"SIT": "System Integration Testing",
|
|
2434
2435
|
"STG": "Designates staging fabrics",
|
|
2435
2436
|
"TEST": "Designates testing fabrics",
|
|
@@ -2453,6 +2454,7 @@
|
|
|
2453
2454
|
"PRD",
|
|
2454
2455
|
"TST",
|
|
2455
2456
|
"SIT",
|
|
2457
|
+
"SBX",
|
|
2456
2458
|
"SANDBOX"
|
|
2457
2459
|
],
|
|
2458
2460
|
"doc": "Fabric group type"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|