|
14 | 14 |
|
15 | 15 | from __future__ import annotations |
16 | 16 |
|
17 | | -from typing import Any, ClassVar, Union |
| 17 | +from typing import Any, ClassVar, List, Union |
18 | 18 |
|
19 | 19 | from msgspec import UNSET, UnsetType |
20 | 20 |
|
@@ -93,96 +93,102 @@ class ADF(Asset): |
93 | 93 |
|
94 | 94 | type_name: Union[str, UnsetType] = "ADF" |
95 | 95 |
|
96 | | - adf_factory_name: str | None | UnsetType = UNSET |
| 96 | + adf_factory_name: Union[str, None, UnsetType] = UNSET |
97 | 97 | """Defines the name of the factory in which this asset exists.""" |
98 | 98 |
|
99 | | - adf_asset_folder_path: str | None | UnsetType = UNSET |
| 99 | + adf_asset_folder_path: Union[str, None, UnsetType] = UNSET |
100 | 100 | """Defines the folder path in which this ADF asset exists.""" |
101 | 101 |
|
102 | | - input_to_airflow_tasks: list[RelatedAirflowTask] | None | UnsetType = UNSET |
| 102 | + input_to_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET |
103 | 103 | """Tasks to which this asset provides input.""" |
104 | 104 |
|
105 | | - output_from_airflow_tasks: list[RelatedAirflowTask] | None | UnsetType = UNSET |
| 105 | + output_from_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET |
106 | 106 | """Tasks from which this asset is output.""" |
107 | 107 |
|
108 | | - anomalo_checks: list[RelatedAnomaloCheck] | None | UnsetType = UNSET |
| 108 | + anomalo_checks: Union[List[RelatedAnomaloCheck], None, UnsetType] = UNSET |
109 | 109 | """Checks that run on this asset.""" |
110 | 110 |
|
111 | | - application: RelatedApplication | None | UnsetType = UNSET |
| 111 | + application: Union[RelatedApplication, None, UnsetType] = UNSET |
112 | 112 | """Application owning the Asset.""" |
113 | 113 |
|
114 | | - application_field: RelatedApplicationField | None | UnsetType = UNSET |
| 114 | + application_field: Union[RelatedApplicationField, None, UnsetType] = UNSET |
115 | 115 | """ApplicationField owning the Asset.""" |
116 | 116 |
|
117 | | - output_port_data_products: list[RelatedDataProduct] | None | UnsetType = UNSET |
| 117 | + output_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET |
118 | 118 | """Data products for which this asset is an output port.""" |
119 | 119 |
|
120 | | - input_port_data_products: list[RelatedDataProduct] | None | UnsetType = UNSET |
| 120 | + input_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET |
121 | 121 | """Data products for which this asset is an input port.""" |
122 | 122 |
|
123 | | - model_implemented_entities: list[RelatedModelEntity] | None | UnsetType = UNSET |
| 123 | + model_implemented_entities: Union[List[RelatedModelEntity], None, UnsetType] = UNSET |
124 | 124 | """Entities implemented by this asset.""" |
125 | 125 |
|
126 | | - model_implemented_attributes: list[RelatedModelAttribute] | None | UnsetType = UNSET |
| 126 | + model_implemented_attributes: Union[ |
| 127 | + List[RelatedModelAttribute], None, UnsetType |
| 128 | + ] = UNSET |
127 | 129 | """Attributes implemented by this asset.""" |
128 | 130 |
|
129 | | - metrics: list[RelatedMetric] | None | UnsetType = UNSET |
| 131 | + metrics: Union[List[RelatedMetric], None, UnsetType] = UNSET |
130 | 132 | """""" |
131 | 133 |
|
132 | | - dq_base_dataset_rules: list[RelatedDataQualityRule] | None | UnsetType = UNSET |
| 134 | + dq_base_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = UNSET |
133 | 135 | """Rules that are applied on this dataset.""" |
134 | 136 |
|
135 | | - dq_reference_dataset_rules: list[RelatedDataQualityRule] | None | UnsetType = UNSET |
| 137 | + dq_reference_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = ( |
| 138 | + UNSET |
| 139 | + ) |
136 | 140 | """Rules where this dataset is referenced.""" |
137 | 141 |
|
138 | | - meanings: list[RelatedAtlasGlossaryTerm] | None | UnsetType = UNSET |
| 142 | + meanings: Union[List[RelatedAtlasGlossaryTerm], None, UnsetType] = UNSET |
139 | 143 | """Glossary terms that are linked to this asset.""" |
140 | 144 |
|
141 | | - mc_monitors: list[RelatedMCMonitor] | None | UnsetType = UNSET |
| 145 | + mc_monitors: Union[List[RelatedMCMonitor], None, UnsetType] = UNSET |
142 | 146 | """Monitors that observe this asset.""" |
143 | 147 |
|
144 | | - mc_incidents: list[RelatedMCIncident] | None | UnsetType = UNSET |
| 148 | + mc_incidents: Union[List[RelatedMCIncident], None, UnsetType] = UNSET |
145 | 149 | """""" |
146 | 150 |
|
147 | | - partial_child_fields: list[RelatedPartialField] | None | UnsetType = UNSET |
| 151 | + partial_child_fields: Union[List[RelatedPartialField], None, UnsetType] = UNSET |
148 | 152 | """Partial fields contained in the asset.""" |
149 | 153 |
|
150 | | - partial_child_objects: list[RelatedPartialObject] | None | UnsetType = UNSET |
| 154 | + partial_child_objects: Union[List[RelatedPartialObject], None, UnsetType] = UNSET |
151 | 155 | """Partial objects contained in the asset.""" |
152 | 156 |
|
153 | | - input_to_processes: list[RelatedProcess] | None | UnsetType = UNSET |
| 157 | + input_to_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET |
154 | 158 | """Processes to which this asset provides input.""" |
155 | 159 |
|
156 | | - output_from_processes: list[RelatedProcess] | None | UnsetType = UNSET |
| 160 | + output_from_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET |
157 | 161 | """Processes from which this asset is produced as output.""" |
158 | 162 |
|
159 | | - user_def_relationship_to: list[RelatedReferenceable] | None | UnsetType = UNSET |
| 163 | + user_def_relationship_to: Union[List[RelatedReferenceable], None, UnsetType] = UNSET |
160 | 164 | """""" |
161 | 165 |
|
162 | | - user_def_relationship_from: list[RelatedReferenceable] | None | UnsetType = UNSET |
| 166 | + user_def_relationship_from: Union[List[RelatedReferenceable], None, UnsetType] = ( |
| 167 | + UNSET |
| 168 | + ) |
163 | 169 | """""" |
164 | 170 |
|
165 | | - files: list[RelatedFile] | None | UnsetType = UNSET |
| 171 | + files: Union[List[RelatedFile], None, UnsetType] = UNSET |
166 | 172 | """""" |
167 | 173 |
|
168 | | - links: list[RelatedLink] | None | UnsetType = UNSET |
| 174 | + links: Union[List[RelatedLink], None, UnsetType] = UNSET |
169 | 175 | """Links that are attached to this asset.""" |
170 | 176 |
|
171 | | - readme: RelatedReadme | None | UnsetType = UNSET |
| 177 | + readme: Union[RelatedReadme, None, UnsetType] = UNSET |
172 | 178 | """README that is linked to this asset.""" |
173 | 179 |
|
174 | | - schema_registry_subjects: list[RelatedSchemaRegistrySubject] | None | UnsetType = ( |
175 | | - UNSET |
176 | | - ) |
| 180 | + schema_registry_subjects: Union[ |
| 181 | + List[RelatedSchemaRegistrySubject], None, UnsetType |
| 182 | + ] = UNSET |
177 | 183 | """""" |
178 | 184 |
|
179 | | - soda_checks: list[RelatedSodaCheck] | None | UnsetType = UNSET |
| 185 | + soda_checks: Union[List[RelatedSodaCheck], None, UnsetType] = UNSET |
180 | 186 | """""" |
181 | 187 |
|
182 | | - input_to_spark_jobs: list[RelatedSparkJob] | None | UnsetType = UNSET |
| 188 | + input_to_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET |
183 | 189 | """""" |
184 | 190 |
|
185 | | - output_from_spark_jobs: list[RelatedSparkJob] | None | UnsetType = UNSET |
| 191 | + output_from_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET |
186 | 192 | """""" |
187 | 193 |
|
188 | 194 | def __post_init__(self) -> None: |
@@ -243,117 +249,123 @@ def from_json(json_data: str | bytes, serde: Serde | None = None) -> ADF: |
243 | 249 | class ADFAttributes(AssetAttributes): |
244 | 250 | """ADF-specific attributes for nested API format.""" |
245 | 251 |
|
246 | | - adf_factory_name: str | None | UnsetType = UNSET |
| 252 | + adf_factory_name: Union[str, None, UnsetType] = UNSET |
247 | 253 | """Defines the name of the factory in which this asset exists.""" |
248 | 254 |
|
249 | | - adf_asset_folder_path: str | None | UnsetType = UNSET |
| 255 | + adf_asset_folder_path: Union[str, None, UnsetType] = UNSET |
250 | 256 | """Defines the folder path in which this ADF asset exists.""" |
251 | 257 |
|
252 | 258 |
|
253 | 259 | class ADFRelationshipAttributes(AssetRelationshipAttributes): |
254 | 260 | """ADF-specific relationship attributes for nested API format.""" |
255 | 261 |
|
256 | | - input_to_airflow_tasks: list[RelatedAirflowTask] | None | UnsetType = UNSET |
| 262 | + input_to_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET |
257 | 263 | """Tasks to which this asset provides input.""" |
258 | 264 |
|
259 | | - output_from_airflow_tasks: list[RelatedAirflowTask] | None | UnsetType = UNSET |
| 265 | + output_from_airflow_tasks: Union[List[RelatedAirflowTask], None, UnsetType] = UNSET |
260 | 266 | """Tasks from which this asset is output.""" |
261 | 267 |
|
262 | | - anomalo_checks: list[RelatedAnomaloCheck] | None | UnsetType = UNSET |
| 268 | + anomalo_checks: Union[List[RelatedAnomaloCheck], None, UnsetType] = UNSET |
263 | 269 | """Checks that run on this asset.""" |
264 | 270 |
|
265 | | - application: RelatedApplication | None | UnsetType = UNSET |
| 271 | + application: Union[RelatedApplication, None, UnsetType] = UNSET |
266 | 272 | """Application owning the Asset.""" |
267 | 273 |
|
268 | | - application_field: RelatedApplicationField | None | UnsetType = UNSET |
| 274 | + application_field: Union[RelatedApplicationField, None, UnsetType] = UNSET |
269 | 275 | """ApplicationField owning the Asset.""" |
270 | 276 |
|
271 | | - output_port_data_products: list[RelatedDataProduct] | None | UnsetType = UNSET |
| 277 | + output_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET |
272 | 278 | """Data products for which this asset is an output port.""" |
273 | 279 |
|
274 | | - input_port_data_products: list[RelatedDataProduct] | None | UnsetType = UNSET |
| 280 | + input_port_data_products: Union[List[RelatedDataProduct], None, UnsetType] = UNSET |
275 | 281 | """Data products for which this asset is an input port.""" |
276 | 282 |
|
277 | | - model_implemented_entities: list[RelatedModelEntity] | None | UnsetType = UNSET |
| 283 | + model_implemented_entities: Union[List[RelatedModelEntity], None, UnsetType] = UNSET |
278 | 284 | """Entities implemented by this asset.""" |
279 | 285 |
|
280 | | - model_implemented_attributes: list[RelatedModelAttribute] | None | UnsetType = UNSET |
| 286 | + model_implemented_attributes: Union[ |
| 287 | + List[RelatedModelAttribute], None, UnsetType |
| 288 | + ] = UNSET |
281 | 289 | """Attributes implemented by this asset.""" |
282 | 290 |
|
283 | | - metrics: list[RelatedMetric] | None | UnsetType = UNSET |
| 291 | + metrics: Union[List[RelatedMetric], None, UnsetType] = UNSET |
284 | 292 | """""" |
285 | 293 |
|
286 | | - dq_base_dataset_rules: list[RelatedDataQualityRule] | None | UnsetType = UNSET |
| 294 | + dq_base_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = UNSET |
287 | 295 | """Rules that are applied on this dataset.""" |
288 | 296 |
|
289 | | - dq_reference_dataset_rules: list[RelatedDataQualityRule] | None | UnsetType = UNSET |
| 297 | + dq_reference_dataset_rules: Union[List[RelatedDataQualityRule], None, UnsetType] = ( |
| 298 | + UNSET |
| 299 | + ) |
290 | 300 | """Rules where this dataset is referenced.""" |
291 | 301 |
|
292 | | - meanings: list[RelatedAtlasGlossaryTerm] | None | UnsetType = UNSET |
| 302 | + meanings: Union[List[RelatedAtlasGlossaryTerm], None, UnsetType] = UNSET |
293 | 303 | """Glossary terms that are linked to this asset.""" |
294 | 304 |
|
295 | | - mc_monitors: list[RelatedMCMonitor] | None | UnsetType = UNSET |
| 305 | + mc_monitors: Union[List[RelatedMCMonitor], None, UnsetType] = UNSET |
296 | 306 | """Monitors that observe this asset.""" |
297 | 307 |
|
298 | | - mc_incidents: list[RelatedMCIncident] | None | UnsetType = UNSET |
| 308 | + mc_incidents: Union[List[RelatedMCIncident], None, UnsetType] = UNSET |
299 | 309 | """""" |
300 | 310 |
|
301 | | - partial_child_fields: list[RelatedPartialField] | None | UnsetType = UNSET |
| 311 | + partial_child_fields: Union[List[RelatedPartialField], None, UnsetType] = UNSET |
302 | 312 | """Partial fields contained in the asset.""" |
303 | 313 |
|
304 | | - partial_child_objects: list[RelatedPartialObject] | None | UnsetType = UNSET |
| 314 | + partial_child_objects: Union[List[RelatedPartialObject], None, UnsetType] = UNSET |
305 | 315 | """Partial objects contained in the asset.""" |
306 | 316 |
|
307 | | - input_to_processes: list[RelatedProcess] | None | UnsetType = UNSET |
| 317 | + input_to_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET |
308 | 318 | """Processes to which this asset provides input.""" |
309 | 319 |
|
310 | | - output_from_processes: list[RelatedProcess] | None | UnsetType = UNSET |
| 320 | + output_from_processes: Union[List[RelatedProcess], None, UnsetType] = UNSET |
311 | 321 | """Processes from which this asset is produced as output.""" |
312 | 322 |
|
313 | | - user_def_relationship_to: list[RelatedReferenceable] | None | UnsetType = UNSET |
| 323 | + user_def_relationship_to: Union[List[RelatedReferenceable], None, UnsetType] = UNSET |
314 | 324 | """""" |
315 | 325 |
|
316 | | - user_def_relationship_from: list[RelatedReferenceable] | None | UnsetType = UNSET |
| 326 | + user_def_relationship_from: Union[List[RelatedReferenceable], None, UnsetType] = ( |
| 327 | + UNSET |
| 328 | + ) |
317 | 329 | """""" |
318 | 330 |
|
319 | | - files: list[RelatedFile] | None | UnsetType = UNSET |
| 331 | + files: Union[List[RelatedFile], None, UnsetType] = UNSET |
320 | 332 | """""" |
321 | 333 |
|
322 | | - links: list[RelatedLink] | None | UnsetType = UNSET |
| 334 | + links: Union[List[RelatedLink], None, UnsetType] = UNSET |
323 | 335 | """Links that are attached to this asset.""" |
324 | 336 |
|
325 | | - readme: RelatedReadme | None | UnsetType = UNSET |
| 337 | + readme: Union[RelatedReadme, None, UnsetType] = UNSET |
326 | 338 | """README that is linked to this asset.""" |
327 | 339 |
|
328 | | - schema_registry_subjects: list[RelatedSchemaRegistrySubject] | None | UnsetType = ( |
329 | | - UNSET |
330 | | - ) |
| 340 | + schema_registry_subjects: Union[ |
| 341 | + List[RelatedSchemaRegistrySubject], None, UnsetType |
| 342 | + ] = UNSET |
331 | 343 | """""" |
332 | 344 |
|
333 | | - soda_checks: list[RelatedSodaCheck] | None | UnsetType = UNSET |
| 345 | + soda_checks: Union[List[RelatedSodaCheck], None, UnsetType] = UNSET |
334 | 346 | """""" |
335 | 347 |
|
336 | | - input_to_spark_jobs: list[RelatedSparkJob] | None | UnsetType = UNSET |
| 348 | + input_to_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET |
337 | 349 | """""" |
338 | 350 |
|
339 | | - output_from_spark_jobs: list[RelatedSparkJob] | None | UnsetType = UNSET |
| 351 | + output_from_spark_jobs: Union[List[RelatedSparkJob], None, UnsetType] = UNSET |
340 | 352 | """""" |
341 | 353 |
|
342 | 354 |
|
343 | 355 | class ADFNested(AssetNested): |
344 | 356 | """ADF in nested API format for high-performance serialization.""" |
345 | 357 |
|
346 | | - attributes: ADFAttributes | UnsetType = UNSET |
347 | | - relationship_attributes: ADFRelationshipAttributes | UnsetType = UNSET |
348 | | - append_relationship_attributes: ADFRelationshipAttributes | UnsetType = UNSET |
349 | | - remove_relationship_attributes: ADFRelationshipAttributes | UnsetType = UNSET |
| 358 | + attributes: Union[ADFAttributes, UnsetType] = UNSET |
| 359 | + relationship_attributes: Union[ADFRelationshipAttributes, UnsetType] = UNSET |
| 360 | + append_relationship_attributes: Union[ADFRelationshipAttributes, UnsetType] = UNSET |
| 361 | + remove_relationship_attributes: Union[ADFRelationshipAttributes, UnsetType] = UNSET |
350 | 362 |
|
351 | 363 |
|
352 | 364 | # ============================================================================= |
353 | 365 | # CONVERSION HELPERS & CONSTANTS |
354 | 366 | # ============================================================================= |
355 | 367 |
|
356 | | -_ADF_REL_FIELDS: list[str] = [ |
| 368 | +_ADF_REL_FIELDS: List[str] = [ |
357 | 369 | *_ASSET_REL_FIELDS, |
358 | 370 | "input_to_airflow_tasks", |
359 | 371 | "output_from_airflow_tasks", |
|
0 commit comments