acryl-datahub-cloud 0.3.12rc1__py3-none-any.whl → 0.3.12rc4__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-cloud might be problematic. Click here for more details.
- acryl_datahub_cloud/_codegen_config.json +1 -1
- acryl_datahub_cloud/datahub_forms_notifications/forms_notifications_source.py +559 -0
- acryl_datahub_cloud/datahub_forms_notifications/get_search_results_total.gql +14 -0
- acryl_datahub_cloud/datahub_forms_notifications/query.py +17 -0
- acryl_datahub_cloud/datahub_forms_notifications/scroll_forms_for_notification.gql +29 -0
- acryl_datahub_cloud/datahub_forms_notifications/send_form_notification_request.gql +5 -0
- acryl_datahub_cloud/datahub_usage_reporting/query_builder.py +48 -8
- acryl_datahub_cloud/datahub_usage_reporting/usage_feature_reporter.py +49 -40
- acryl_datahub_cloud/metadata/_urns/urn_defs.py +1842 -1786
- acryl_datahub_cloud/metadata/com/linkedin/pegasus2avro/application/__init__.py +19 -0
- acryl_datahub_cloud/metadata/com/linkedin/pegasus2avro/form/__init__.py +4 -0
- acryl_datahub_cloud/metadata/com/linkedin/pegasus2avro/notification/__init__.py +19 -0
- acryl_datahub_cloud/metadata/com/linkedin/pegasus2avro/settings/global/__init__.py +2 -0
- acryl_datahub_cloud/metadata/schema.avsc +24861 -24050
- acryl_datahub_cloud/metadata/schema_classes.py +1031 -631
- acryl_datahub_cloud/metadata/schemas/ApplicationKey.avsc +31 -0
- acryl_datahub_cloud/metadata/schemas/ApplicationProperties.avsc +72 -0
- acryl_datahub_cloud/metadata/schemas/Applications.avsc +38 -0
- acryl_datahub_cloud/metadata/schemas/AssertionAnalyticsRunEvent.avsc +40 -7
- acryl_datahub_cloud/metadata/schemas/AssertionInfo.avsc +27 -6
- acryl_datahub_cloud/metadata/schemas/AssertionRunEvent.avsc +31 -7
- acryl_datahub_cloud/metadata/schemas/AssertionsSummary.avsc +14 -0
- acryl_datahub_cloud/metadata/schemas/ChartKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/ConstraintInfo.avsc +12 -1
- acryl_datahub_cloud/metadata/schemas/ContainerKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/CorpGroupKey.avsc +2 -1
- acryl_datahub_cloud/metadata/schemas/CorpUserKey.avsc +2 -1
- acryl_datahub_cloud/metadata/schemas/DashboardKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/DataFlowKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/DataHubPolicyInfo.avsc +12 -1
- acryl_datahub_cloud/metadata/schemas/DataJobKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/DataProductKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/DataProductProperties.avsc +1 -1
- acryl_datahub_cloud/metadata/schemas/DatasetKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/FormAssignmentStatus.avsc +36 -0
- acryl_datahub_cloud/metadata/schemas/FormInfo.avsc +6 -0
- acryl_datahub_cloud/metadata/schemas/FormKey.avsc +2 -1
- acryl_datahub_cloud/metadata/schemas/FormNotifications.avsc +69 -0
- acryl_datahub_cloud/metadata/schemas/FormSettings.avsc +3 -0
- acryl_datahub_cloud/metadata/schemas/GlobalSettingsInfo.avsc +22 -0
- acryl_datahub_cloud/metadata/schemas/GlossaryTermKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/MLFeatureKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/MLFeatureTableKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/MLModelGroupKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/MLModelKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/MLPrimaryKeyKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/MetadataChangeEvent.avsc +12 -1
- acryl_datahub_cloud/metadata/schemas/MonitorInfo.avsc +27 -6
- acryl_datahub_cloud/metadata/schemas/NotebookKey.avsc +1 -0
- acryl_datahub_cloud/metadata/schemas/NotificationRequest.avsc +1 -0
- acryl_datahub_cloud/notifications/__init__.py +0 -0
- acryl_datahub_cloud/notifications/notification_recipient_builder.py +399 -0
- acryl_datahub_cloud/sdk/__init__.py +29 -0
- acryl_datahub_cloud/{_sdk_extras → sdk}/assertion.py +501 -193
- acryl_datahub_cloud/sdk/assertion_input/__init__.py +0 -0
- acryl_datahub_cloud/{_sdk_extras → sdk/assertion_input}/assertion_input.py +733 -189
- acryl_datahub_cloud/sdk/assertion_input/freshness_assertion_input.py +261 -0
- acryl_datahub_cloud/sdk/assertion_input/smart_column_metric_assertion_input.py +947 -0
- acryl_datahub_cloud/sdk/assertions_client.py +1639 -0
- acryl_datahub_cloud/sdk/entities/__init__.py +0 -0
- acryl_datahub_cloud/{_sdk_extras → sdk}/entities/assertion.py +5 -2
- acryl_datahub_cloud/{_sdk_extras → sdk}/subscription_client.py +146 -33
- {acryl_datahub_cloud-0.3.12rc1.dist-info → acryl_datahub_cloud-0.3.12rc4.dist-info}/METADATA +48 -43
- {acryl_datahub_cloud-0.3.12rc1.dist-info → acryl_datahub_cloud-0.3.12rc4.dist-info}/RECORD +72 -54
- {acryl_datahub_cloud-0.3.12rc1.dist-info → acryl_datahub_cloud-0.3.12rc4.dist-info}/entry_points.txt +1 -0
- acryl_datahub_cloud/_sdk_extras/__init__.py +0 -19
- acryl_datahub_cloud/_sdk_extras/assertions_client.py +0 -717
- /acryl_datahub_cloud/{_sdk_extras/entities → datahub_forms_notifications}/__init__.py +0 -0
- /acryl_datahub_cloud/{_sdk_extras → sdk}/entities/monitor.py +0 -0
- /acryl_datahub_cloud/{_sdk_extras → sdk}/entities/subscription.py +0 -0
- /acryl_datahub_cloud/{_sdk_extras → sdk}/errors.py +0 -0
- /acryl_datahub_cloud/{_sdk_extras → sdk}/resolver_client.py +0 -0
- {acryl_datahub_cloud-0.3.12rc1.dist-info → acryl_datahub_cloud-0.3.12rc4.dist-info}/WHEEL +0 -0
- {acryl_datahub_cloud-0.3.12rc1.dist-info → acryl_datahub_cloud-0.3.12rc4.dist-info}/top_level.txt +0 -0
|
File without changes
|
|
@@ -15,7 +15,7 @@ from typing_extensions import (
|
|
|
15
15
|
assert_never,
|
|
16
16
|
)
|
|
17
17
|
|
|
18
|
-
from acryl_datahub_cloud.
|
|
18
|
+
from acryl_datahub_cloud.sdk.errors import SDKNotYetSupportedError
|
|
19
19
|
from datahub.emitter.enum_helpers import get_enum_options
|
|
20
20
|
from datahub.emitter.mce_builder import make_ts_millis
|
|
21
21
|
from datahub.errors import SdkUsageError
|
|
@@ -34,7 +34,7 @@ AssertionInfoInputType: TypeAlias = Union[
|
|
|
34
34
|
models.FreshnessAssertionInfoClass,
|
|
35
35
|
models.VolumeAssertionInfoClass,
|
|
36
36
|
models.SqlAssertionInfoClass,
|
|
37
|
-
|
|
37
|
+
models.FieldAssertionInfoClass,
|
|
38
38
|
# TODO: models.SchemaAssertionInfoClass,
|
|
39
39
|
# TODO: models.CustomAssertionInfoClass,
|
|
40
40
|
]
|
|
@@ -189,6 +189,9 @@ class Assertion(HasPlatformInstance, HasTags, Entity):
|
|
|
189
189
|
elif isinstance(assertion, models.SqlAssertionInfoClass):
|
|
190
190
|
info.sqlAssertion = assertion
|
|
191
191
|
info.type = models.AssertionTypeClass.SQL
|
|
192
|
+
elif isinstance(assertion, models.FieldAssertionInfoClass):
|
|
193
|
+
info.fieldAssertion = assertion
|
|
194
|
+
info.type = models.AssertionTypeClass.FIELD
|
|
192
195
|
else:
|
|
193
196
|
assert_never(assertion)
|
|
194
197
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
from datetime import datetime, timezone
|
|
3
|
-
from typing import Dict, List, Optional, Tuple, Union
|
|
3
|
+
from typing import Dict, List, Optional, Sequence, Tuple, Union
|
|
4
4
|
|
|
5
5
|
from typing_extensions import TypeAlias
|
|
6
6
|
|
|
7
7
|
import datahub.metadata.schema_classes as models
|
|
8
|
-
from acryl_datahub_cloud.
|
|
9
|
-
from acryl_datahub_cloud.
|
|
8
|
+
from acryl_datahub_cloud.sdk.entities.assertion import Assertion
|
|
9
|
+
from acryl_datahub_cloud.sdk.entities.subscription import Subscription
|
|
10
10
|
from datahub.emitter.enum_helpers import get_enum_options
|
|
11
11
|
from datahub.emitter.mce_builder import make_ts_millis
|
|
12
12
|
from datahub.errors import SdkUsageError
|
|
@@ -61,7 +61,9 @@ class SubscriptionClient:
|
|
|
61
61
|
*,
|
|
62
62
|
urn: Union[str, DatasetUrn, AssertionUrn],
|
|
63
63
|
subscriber_urn: SubscriberInputType,
|
|
64
|
-
entity_change_types: Optional[
|
|
64
|
+
entity_change_types: Optional[
|
|
65
|
+
Sequence[Union[str, models.EntityChangeTypeClass]]
|
|
66
|
+
] = None,
|
|
65
67
|
) -> None:
|
|
66
68
|
"""
|
|
67
69
|
Create a subscription to receive notifications for entity changes.
|
|
@@ -163,7 +165,9 @@ class SubscriptionClient:
|
|
|
163
165
|
self,
|
|
164
166
|
*,
|
|
165
167
|
urn: Union[str, DatasetUrn, AssertionUrn],
|
|
166
|
-
entity_change_types: Optional[
|
|
168
|
+
entity_change_types: Optional[
|
|
169
|
+
Sequence[Union[str, models.EntityChangeTypeClass]]
|
|
170
|
+
] = None,
|
|
167
171
|
subscriber_urn: Optional[SubscriberInputType] = None,
|
|
168
172
|
) -> List[Subscription]:
|
|
169
173
|
"""
|
|
@@ -191,7 +195,9 @@ class SubscriptionClient:
|
|
|
191
195
|
*,
|
|
192
196
|
urn: Union[str, DatasetUrn, AssertionUrn],
|
|
193
197
|
subscriber_urn: SubscriberInputType,
|
|
194
|
-
entity_change_types: Optional[
|
|
198
|
+
entity_change_types: Optional[
|
|
199
|
+
List[Union[str, models.EntityChangeTypeClass]]
|
|
200
|
+
] = None,
|
|
195
201
|
) -> None:
|
|
196
202
|
"""
|
|
197
203
|
Remove subscriptions for entity change notifications.
|
|
@@ -212,6 +218,12 @@ class SubscriptionClient:
|
|
|
212
218
|
(prevents assertion-level subscription from silently upgrading to dataset-level)
|
|
213
219
|
- Deletes entire subscription if no change types remain
|
|
214
220
|
|
|
221
|
+
**Warning behavior:**
|
|
222
|
+
- If entity_change_types is explicitly provided:
|
|
223
|
+
* Warns about change types that don't exist in the subscription
|
|
224
|
+
* For assertions: warns about change types that don't include the assertion in their filter
|
|
225
|
+
- If entity_change_types is None (using defaults), no warnings are logged
|
|
226
|
+
|
|
215
227
|
Args:
|
|
216
228
|
urn: URN (string or URN object) of the dataset or assertion to unsubscribe from.
|
|
217
229
|
subscriber_urn: User or group URN to unsubscribe.
|
|
@@ -225,9 +237,8 @@ class SubscriptionClient:
|
|
|
225
237
|
|
|
226
238
|
Raises:
|
|
227
239
|
SdkUsageError: If URN format is invalid, entity not found, or empty change types list.
|
|
228
|
-
SdkUsageError: For assertion unsubscription - if
|
|
229
|
-
|
|
230
|
-
ASSERTION_ERROR) are provided.
|
|
240
|
+
SdkUsageError: For assertion unsubscription - if not assertion-related change types
|
|
241
|
+
(ASSERTION_PASSED, ASSERTION_FAILED, ASSERTION_ERROR) are provided.
|
|
231
242
|
|
|
232
243
|
Note:
|
|
233
244
|
This method is experimental and may change in future versions.
|
|
@@ -237,22 +248,16 @@ class SubscriptionClient:
|
|
|
237
248
|
# Parse URN string if needed
|
|
238
249
|
parsed_urn = self._maybe_parse_urn(urn)
|
|
239
250
|
|
|
240
|
-
# For assertion case, fail as requested
|
|
241
|
-
if isinstance(parsed_urn, AssertionUrn):
|
|
242
|
-
raise SdkUsageError(
|
|
243
|
-
"Assertion unsubscription is not yet implemented. Only dataset unsubscription is currently supported."
|
|
244
|
-
)
|
|
245
|
-
|
|
246
251
|
dataset_urn: DatasetUrn
|
|
247
252
|
assertion_urn: Optional[AssertionUrn]
|
|
248
253
|
dataset_urn, assertion_urn = (
|
|
249
254
|
(parsed_urn, None)
|
|
250
255
|
if isinstance(parsed_urn, DatasetUrn)
|
|
251
|
-
else self._fetch_dataset_from_assertion(parsed_urn)
|
|
256
|
+
else self._fetch_dataset_from_assertion(parsed_urn)
|
|
252
257
|
)
|
|
253
258
|
|
|
254
259
|
logger.info(
|
|
255
|
-
f"Unsubscribing from dataset={dataset_urn} for subscriber={subscriber_urn} with change types: {entity_change_types}"
|
|
260
|
+
f"Unsubscribing from dataset={dataset_urn}{f' assertion={assertion_urn}' if assertion_urn else ''} for subscriber={subscriber_urn} with change types: {entity_change_types}"
|
|
256
261
|
)
|
|
257
262
|
|
|
258
263
|
# Find existing subscription
|
|
@@ -284,9 +289,7 @@ class SubscriptionClient:
|
|
|
284
289
|
# Get the change types to remove (validated input or defaults)
|
|
285
290
|
change_types_to_remove = self._get_entity_change_types(
|
|
286
291
|
assertion_scope=assertion_urn is not None,
|
|
287
|
-
entity_change_types=
|
|
288
|
-
if entity_change_types
|
|
289
|
-
else None,
|
|
292
|
+
entity_change_types=entity_change_types,
|
|
290
293
|
)
|
|
291
294
|
|
|
292
295
|
# Remove the specified change types
|
|
@@ -294,8 +297,13 @@ class SubscriptionClient:
|
|
|
294
297
|
raise SdkUsageError(
|
|
295
298
|
f"Subscription {subscription_entity.urn} has no change types to remove"
|
|
296
299
|
)
|
|
300
|
+
# Determine if we should warn about missing items (only when user explicitly provided change types)
|
|
301
|
+
warn_if_missing = entity_change_types is not None
|
|
297
302
|
updated_change_types = self._remove_change_types(
|
|
298
|
-
subscription_entity.info.entityChangeTypes,
|
|
303
|
+
subscription_entity.info.entityChangeTypes,
|
|
304
|
+
change_types_to_remove,
|
|
305
|
+
assertion_urn_to_remove=assertion_urn,
|
|
306
|
+
warn_if_missing=warn_if_missing,
|
|
299
307
|
)
|
|
300
308
|
|
|
301
309
|
# If no change types remain, delete the subscription
|
|
@@ -315,7 +323,9 @@ class SubscriptionClient:
|
|
|
315
323
|
def _get_entity_change_types(
|
|
316
324
|
self,
|
|
317
325
|
assertion_scope: bool,
|
|
318
|
-
entity_change_types: Optional[
|
|
326
|
+
entity_change_types: Optional[
|
|
327
|
+
Sequence[Union[str, models.EntityChangeTypeClass]]
|
|
328
|
+
] = None,
|
|
319
329
|
) -> List[str]:
|
|
320
330
|
"""Get entity change types with validation and defaults.
|
|
321
331
|
|
|
@@ -337,10 +347,13 @@ class SubscriptionClient:
|
|
|
337
347
|
if len(entity_change_types) == 0:
|
|
338
348
|
raise SdkUsageError("Entity change types cannot be an empty list.")
|
|
339
349
|
|
|
350
|
+
# Convert all entity change types to strings
|
|
351
|
+
entity_change_type_strs = [str(ect) for ect in entity_change_types]
|
|
352
|
+
|
|
340
353
|
all_options = get_enum_options(models.EntityChangeTypeClass)
|
|
341
|
-
if any([ect not in all_options for ect in
|
|
354
|
+
if any([ect not in all_options for ect in entity_change_type_strs]):
|
|
342
355
|
raise SdkUsageError(
|
|
343
|
-
f"Invalid entity change types provided: {
|
|
356
|
+
f"Invalid entity change types provided: {entity_change_type_strs}. "
|
|
344
357
|
f"Valid options are: {all_options}"
|
|
345
358
|
)
|
|
346
359
|
|
|
@@ -348,7 +361,7 @@ class SubscriptionClient:
|
|
|
348
361
|
if assertion_scope:
|
|
349
362
|
invalid_types = [
|
|
350
363
|
ect
|
|
351
|
-
for ect in
|
|
364
|
+
for ect in entity_change_type_strs
|
|
352
365
|
if ect not in ASSERTION_RELATED_ENTITY_CHANGE_TYPES
|
|
353
366
|
]
|
|
354
367
|
if invalid_types:
|
|
@@ -358,7 +371,7 @@ class SubscriptionClient:
|
|
|
358
371
|
f"Valid types: {list(ASSERTION_RELATED_ENTITY_CHANGE_TYPES)}"
|
|
359
372
|
)
|
|
360
373
|
|
|
361
|
-
return
|
|
374
|
+
return entity_change_type_strs
|
|
362
375
|
|
|
363
376
|
# If no specific change types are provided, return defaults based on scope
|
|
364
377
|
if assertion_scope:
|
|
@@ -474,20 +487,93 @@ class SubscriptionClient:
|
|
|
474
487
|
|
|
475
488
|
return existing_filter
|
|
476
489
|
|
|
490
|
+
def _remove_change_types_filter(
|
|
491
|
+
self,
|
|
492
|
+
entity_change_type: str,
|
|
493
|
+
existing_filter: Optional[models.EntityChangeDetailsFilterClass],
|
|
494
|
+
assertion_urn_to_remove: Optional[AssertionUrn] = None,
|
|
495
|
+
warn_if_missing: bool = True,
|
|
496
|
+
) -> Optional[models.EntityChangeDetailsFilterClass]:
|
|
497
|
+
"""Remove assertion URN from existing filter.
|
|
498
|
+
|
|
499
|
+
Args:
|
|
500
|
+
entity_change_type: The entity change type, used only for better logging messages
|
|
501
|
+
existing_filter: Existing filter from the subscription
|
|
502
|
+
assertion_urn_to_remove: Assertion URN to remove from the filter
|
|
503
|
+
warn_if_missing: Whether to log warning if assertion is not found in filter
|
|
504
|
+
|
|
505
|
+
Returns:
|
|
506
|
+
Updated filter with assertion URN removed, or None if no assertions remain
|
|
507
|
+
(indicating the entire change type should be removed).
|
|
508
|
+
"""
|
|
509
|
+
if not existing_filter:
|
|
510
|
+
# No filter means dataset-level subscription, assertion is not included
|
|
511
|
+
if assertion_urn_to_remove and warn_if_missing:
|
|
512
|
+
logger.warning(
|
|
513
|
+
f"Assertion {assertion_urn_to_remove.urn()} is not included in entity change type '{entity_change_type}' and will be ignored"
|
|
514
|
+
)
|
|
515
|
+
return existing_filter
|
|
516
|
+
|
|
517
|
+
if not assertion_urn_to_remove:
|
|
518
|
+
# If no assertion URN to remove, just return the existing filter
|
|
519
|
+
return existing_filter
|
|
520
|
+
|
|
521
|
+
if (
|
|
522
|
+
existing_filter.includeAssertions is None
|
|
523
|
+
or len(existing_filter.includeAssertions) == 0
|
|
524
|
+
):
|
|
525
|
+
# Empty includeAssertions means dataset-level subscription, assertion is not included
|
|
526
|
+
if warn_if_missing:
|
|
527
|
+
logger.warning(
|
|
528
|
+
f"Assertion {assertion_urn_to_remove.urn()} is not included in entity change type '{entity_change_type}' and will be ignored"
|
|
529
|
+
)
|
|
530
|
+
return existing_filter
|
|
531
|
+
|
|
532
|
+
assertion_urn_str = assertion_urn_to_remove.urn()
|
|
533
|
+
if assertion_urn_str not in existing_filter.includeAssertions:
|
|
534
|
+
# Assertion not found in filter
|
|
535
|
+
if warn_if_missing:
|
|
536
|
+
logger.warning(
|
|
537
|
+
f"Assertion {assertion_urn_str} is not included in entity change type '{entity_change_type}' and will be ignored"
|
|
538
|
+
)
|
|
539
|
+
return existing_filter
|
|
540
|
+
|
|
541
|
+
# Remove the assertion from the list
|
|
542
|
+
updated_assertions = [
|
|
543
|
+
urn for urn in existing_filter.includeAssertions if urn != assertion_urn_str
|
|
544
|
+
]
|
|
545
|
+
|
|
546
|
+
if not updated_assertions:
|
|
547
|
+
# No assertions remain, return None to indicate change type should be removed
|
|
548
|
+
return None
|
|
549
|
+
|
|
550
|
+
# Return updated filter with remaining assertions
|
|
551
|
+
existing_filter.includeAssertions = updated_assertions
|
|
552
|
+
return existing_filter
|
|
553
|
+
|
|
477
554
|
def _remove_change_types(
|
|
478
555
|
self,
|
|
479
556
|
existing_change_types: List[models.EntityChangeDetailsClass],
|
|
480
557
|
change_types_to_remove: List[str],
|
|
558
|
+
assertion_urn_to_remove: Optional[AssertionUrn] = None,
|
|
559
|
+
warn_if_missing: bool = True,
|
|
481
560
|
) -> List[models.EntityChangeDetailsClass]:
|
|
482
561
|
"""Remove specified change types from subscription, returning a new list.
|
|
483
562
|
|
|
563
|
+
For dataset unsubscription, removes entire change types.
|
|
564
|
+
For assertion unsubscription, removes assertion from change type filters,
|
|
565
|
+
and removes entire change type if no assertions remain.
|
|
566
|
+
|
|
484
567
|
Args:
|
|
485
568
|
existing_change_types: Current entity change types from the subscription.
|
|
486
569
|
Never None since this method is only called for existing subscriptions.
|
|
487
570
|
change_types_to_remove: List of change type strings to remove (must not be empty)
|
|
571
|
+
assertion_urn_to_remove: Optional assertion URN to remove from filters.
|
|
572
|
+
If None, performs dataset-level removal (removes entire change types).
|
|
573
|
+
warn_if_missing: Whether to log warnings about missing change types or assertions.
|
|
488
574
|
|
|
489
575
|
Returns:
|
|
490
|
-
New list of EntityChangeDetailsClass with specified change types removed
|
|
576
|
+
New list of EntityChangeDetailsClass with specified change types or assertions removed
|
|
491
577
|
|
|
492
578
|
Note:
|
|
493
579
|
This method does not modify existing_change_types in-place; it returns a new list.
|
|
@@ -508,16 +594,43 @@ class SubscriptionClient:
|
|
|
508
594
|
nonexistent_change_types = (
|
|
509
595
|
change_types_to_remove_set - existing_change_types_set
|
|
510
596
|
)
|
|
511
|
-
if nonexistent_change_types:
|
|
597
|
+
if nonexistent_change_types and warn_if_missing:
|
|
512
598
|
logger.warning(
|
|
513
599
|
f"The following change types do not exist in the subscription and will be ignored: {sorted(nonexistent_change_types)}"
|
|
514
600
|
)
|
|
515
601
|
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
602
|
+
if assertion_urn_to_remove is None:
|
|
603
|
+
# Dataset-level removal: remove entire change types
|
|
604
|
+
return [
|
|
605
|
+
ect
|
|
606
|
+
for ect in existing_change_types
|
|
607
|
+
if str(ect.entityChangeType) not in change_types_to_remove_set
|
|
608
|
+
]
|
|
609
|
+
else:
|
|
610
|
+
# Assertion-level removal: remove assertion from filters
|
|
611
|
+
result = []
|
|
612
|
+
for ect in existing_change_types:
|
|
613
|
+
if str(ect.entityChangeType) not in change_types_to_remove_set:
|
|
614
|
+
# Keep change types not being removed
|
|
615
|
+
result.append(ect)
|
|
616
|
+
else:
|
|
617
|
+
# Remove assertion from this change type's filter
|
|
618
|
+
updated_filter = self._remove_change_types_filter(
|
|
619
|
+
entity_change_type=str(ect.entityChangeType),
|
|
620
|
+
existing_filter=ect.filter,
|
|
621
|
+
assertion_urn_to_remove=assertion_urn_to_remove,
|
|
622
|
+
warn_if_missing=warn_if_missing,
|
|
623
|
+
)
|
|
624
|
+
if updated_filter is not None:
|
|
625
|
+
# Keep change type with updated filter
|
|
626
|
+
result.append(
|
|
627
|
+
models.EntityChangeDetailsClass(
|
|
628
|
+
entityChangeType=ect.entityChangeType,
|
|
629
|
+
filter=updated_filter,
|
|
630
|
+
)
|
|
631
|
+
)
|
|
632
|
+
# If updated_filter is None, the change type is removed entirely
|
|
633
|
+
return result
|
|
521
634
|
|
|
522
635
|
def _maybe_parse_urn(
|
|
523
636
|
self, urn: Union[str, DatasetUrn, AssertionUrn]
|
{acryl_datahub_cloud-0.3.12rc1.dist-info → acryl_datahub_cloud-0.3.12rc4.dist-info}/METADATA
RENAMED
|
@@ -1,92 +1,97 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: acryl-datahub-cloud
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.12rc4
|
|
4
4
|
Requires-Dist: avro-gen3==0.7.16
|
|
5
5
|
Requires-Dist: acryl-datahub
|
|
6
|
+
Requires-Dist: croniter
|
|
7
|
+
Requires-Dist: pytz
|
|
8
|
+
Requires-Dist: types-croniter
|
|
6
9
|
Provides-Extra: datahub-lineage-features
|
|
7
|
-
Requires-Dist: duckdb; extra == "datahub-lineage-features"
|
|
8
|
-
Requires-Dist: opensearch-py==2.4.2; extra == "datahub-lineage-features"
|
|
9
10
|
Requires-Dist: pandas; extra == "datahub-lineage-features"
|
|
11
|
+
Requires-Dist: opensearch-py==2.4.2; extra == "datahub-lineage-features"
|
|
10
12
|
Requires-Dist: pyarrow; extra == "datahub-lineage-features"
|
|
13
|
+
Requires-Dist: duckdb; extra == "datahub-lineage-features"
|
|
11
14
|
Requires-Dist: pydantic<2; extra == "datahub-lineage-features"
|
|
12
15
|
Provides-Extra: datahub-reporting-forms
|
|
13
|
-
Requires-Dist: duckdb; extra == "datahub-reporting-forms"
|
|
14
|
-
Requires-Dist: boto3; extra == "datahub-reporting-forms"
|
|
15
16
|
Requires-Dist: pandas; extra == "datahub-reporting-forms"
|
|
16
17
|
Requires-Dist: pyarrow; extra == "datahub-reporting-forms"
|
|
17
|
-
Requires-Dist:
|
|
18
|
+
Requires-Dist: duckdb; extra == "datahub-reporting-forms"
|
|
18
19
|
Requires-Dist: termcolor==2.5.0; extra == "datahub-reporting-forms"
|
|
20
|
+
Requires-Dist: pydantic<2; extra == "datahub-reporting-forms"
|
|
21
|
+
Requires-Dist: boto3; extra == "datahub-reporting-forms"
|
|
19
22
|
Provides-Extra: datahub-reporting-extract-graph
|
|
20
|
-
Requires-Dist: duckdb; extra == "datahub-reporting-extract-graph"
|
|
21
|
-
Requires-Dist: opensearch-py==2.4.2; extra == "datahub-reporting-extract-graph"
|
|
22
|
-
Requires-Dist: boto3; extra == "datahub-reporting-extract-graph"
|
|
23
23
|
Requires-Dist: pandas; extra == "datahub-reporting-extract-graph"
|
|
24
|
+
Requires-Dist: opensearch-py==2.4.2; extra == "datahub-reporting-extract-graph"
|
|
24
25
|
Requires-Dist: pyarrow; extra == "datahub-reporting-extract-graph"
|
|
26
|
+
Requires-Dist: duckdb; extra == "datahub-reporting-extract-graph"
|
|
25
27
|
Requires-Dist: pydantic<2; extra == "datahub-reporting-extract-graph"
|
|
28
|
+
Requires-Dist: boto3; extra == "datahub-reporting-extract-graph"
|
|
26
29
|
Provides-Extra: datahub-reporting-extract-sql
|
|
27
|
-
Requires-Dist: duckdb; extra == "datahub-reporting-extract-sql"
|
|
28
|
-
Requires-Dist: boto3; extra == "datahub-reporting-extract-sql"
|
|
29
30
|
Requires-Dist: pandas; extra == "datahub-reporting-extract-sql"
|
|
30
31
|
Requires-Dist: pyarrow; extra == "datahub-reporting-extract-sql"
|
|
32
|
+
Requires-Dist: duckdb; extra == "datahub-reporting-extract-sql"
|
|
31
33
|
Requires-Dist: pydantic<2; extra == "datahub-reporting-extract-sql"
|
|
34
|
+
Requires-Dist: boto3; extra == "datahub-reporting-extract-sql"
|
|
32
35
|
Provides-Extra: datahub-usage-reporting
|
|
33
|
-
Requires-Dist: numpy<2; extra == "datahub-usage-reporting"
|
|
34
|
-
Requires-Dist: scipy<=1.14.1; extra == "datahub-usage-reporting"
|
|
35
36
|
Requires-Dist: pandas; extra == "datahub-usage-reporting"
|
|
36
37
|
Requires-Dist: opensearch-py==2.4.2; extra == "datahub-usage-reporting"
|
|
37
|
-
Requires-Dist: pydantic<2; extra == "datahub-usage-reporting"
|
|
38
|
-
Requires-Dist: elasticsearch==7.13.4; extra == "datahub-usage-reporting"
|
|
39
38
|
Requires-Dist: duckdb; extra == "datahub-usage-reporting"
|
|
40
|
-
Requires-Dist: polars==1.
|
|
41
|
-
Requires-Dist:
|
|
39
|
+
Requires-Dist: polars==1.30.0; extra == "datahub-usage-reporting"
|
|
40
|
+
Requires-Dist: elasticsearch==7.13.4; extra == "datahub-usage-reporting"
|
|
41
|
+
Requires-Dist: termcolor==2.5.0; extra == "datahub-usage-reporting"
|
|
42
42
|
Requires-Dist: boto3; extra == "datahub-usage-reporting"
|
|
43
43
|
Requires-Dist: pyarrow; extra == "datahub-usage-reporting"
|
|
44
|
-
Requires-Dist:
|
|
44
|
+
Requires-Dist: numpy<2; extra == "datahub-usage-reporting"
|
|
45
|
+
Requires-Dist: scipy<=1.14.1; extra == "datahub-usage-reporting"
|
|
46
|
+
Requires-Dist: pyarrow<=18.0.0; extra == "datahub-usage-reporting"
|
|
47
|
+
Requires-Dist: pydantic<2; extra == "datahub-usage-reporting"
|
|
45
48
|
Provides-Extra: datahub-metadata-sharing
|
|
46
49
|
Requires-Dist: tenacity; extra == "datahub-metadata-sharing"
|
|
47
50
|
Provides-Extra: datahub-action-request-owner
|
|
48
51
|
Requires-Dist: tenacity; extra == "datahub-action-request-owner"
|
|
49
52
|
Provides-Extra: acryl-cs-issues
|
|
50
53
|
Requires-Dist: slack-sdk; extra == "acryl-cs-issues"
|
|
51
|
-
Requires-Dist: openai; extra == "acryl-cs-issues"
|
|
52
|
-
Requires-Dist: zenpy; extra == "acryl-cs-issues"
|
|
53
54
|
Requires-Dist: jinja2; extra == "acryl-cs-issues"
|
|
55
|
+
Requires-Dist: zenpy; extra == "acryl-cs-issues"
|
|
56
|
+
Requires-Dist: openai; extra == "acryl-cs-issues"
|
|
57
|
+
Provides-Extra: datahub-forms-notifications
|
|
58
|
+
Requires-Dist: tenacity; extra == "datahub-forms-notifications"
|
|
54
59
|
Provides-Extra: all
|
|
60
|
+
Requires-Dist: pandas; extra == "all"
|
|
61
|
+
Requires-Dist: opensearch-py==2.4.2; extra == "all"
|
|
62
|
+
Requires-Dist: jinja2; extra == "all"
|
|
63
|
+
Requires-Dist: openai; extra == "all"
|
|
55
64
|
Requires-Dist: scipy<=1.14.1; extra == "all"
|
|
56
65
|
Requires-Dist: tenacity; extra == "all"
|
|
57
|
-
Requires-Dist: jinja2; extra == "all"
|
|
58
|
-
Requires-Dist: pandas; extra == "all"
|
|
59
|
-
Requires-Dist: elasticsearch==7.13.4; extra == "all"
|
|
60
66
|
Requires-Dist: duckdb; extra == "all"
|
|
61
|
-
Requires-Dist:
|
|
62
|
-
Requires-Dist:
|
|
63
|
-
Requires-Dist: pyarrow; extra == "all"
|
|
67
|
+
Requires-Dist: polars==1.30.0; extra == "all"
|
|
68
|
+
Requires-Dist: elasticsearch==7.13.4; extra == "all"
|
|
64
69
|
Requires-Dist: termcolor==2.5.0; extra == "all"
|
|
65
|
-
Requires-Dist: numpy<2; extra == "all"
|
|
66
|
-
Requires-Dist: opensearch-py==2.4.2; extra == "all"
|
|
67
|
-
Requires-Dist: pydantic<2; extra == "all"
|
|
68
70
|
Requires-Dist: zenpy; extra == "all"
|
|
69
|
-
Requires-Dist: polars==1.23.0; extra == "all"
|
|
70
|
-
Requires-Dist: slack-sdk; extra == "all"
|
|
71
71
|
Requires-Dist: boto3; extra == "all"
|
|
72
|
+
Requires-Dist: pyarrow; extra == "all"
|
|
73
|
+
Requires-Dist: numpy<2; extra == "all"
|
|
74
|
+
Requires-Dist: slack-sdk; extra == "all"
|
|
75
|
+
Requires-Dist: pyarrow<=18.0.0; extra == "all"
|
|
76
|
+
Requires-Dist: pydantic<2; extra == "all"
|
|
72
77
|
Provides-Extra: dev
|
|
73
|
-
Requires-Dist: numpy<2; extra == "dev"
|
|
74
|
-
Requires-Dist: scipy<=1.14.1; extra == "dev"
|
|
75
|
-
Requires-Dist: tenacity; extra == "dev"
|
|
76
|
-
Requires-Dist: jinja2; extra == "dev"
|
|
77
78
|
Requires-Dist: pandas; extra == "dev"
|
|
78
79
|
Requires-Dist: opensearch-py==2.4.2; extra == "dev"
|
|
79
|
-
Requires-Dist:
|
|
80
|
+
Requires-Dist: tenacity; extra == "dev"
|
|
81
|
+
Requires-Dist: jinja2; extra == "dev"
|
|
82
|
+
Requires-Dist: openai; extra == "dev"
|
|
83
|
+
Requires-Dist: duckdb; extra == "dev"
|
|
84
|
+
Requires-Dist: polars==1.30.0; extra == "dev"
|
|
80
85
|
Requires-Dist: elasticsearch==7.13.4; extra == "dev"
|
|
86
|
+
Requires-Dist: termcolor==2.5.0; extra == "dev"
|
|
81
87
|
Requires-Dist: zenpy; extra == "dev"
|
|
82
|
-
Requires-Dist: duckdb; extra == "dev"
|
|
83
|
-
Requires-Dist: polars==1.23.0; extra == "dev"
|
|
84
|
-
Requires-Dist: slack-sdk; extra == "dev"
|
|
85
|
-
Requires-Dist: openai; extra == "dev"
|
|
86
|
-
Requires-Dist: pyarrow<=18.0.0; extra == "dev"
|
|
87
88
|
Requires-Dist: boto3; extra == "dev"
|
|
88
|
-
Requires-Dist: acryl-datahub[dev]; extra == "dev"
|
|
89
89
|
Requires-Dist: pyarrow; extra == "dev"
|
|
90
|
-
Requires-Dist:
|
|
90
|
+
Requires-Dist: acryl-datahub[dev]; extra == "dev"
|
|
91
|
+
Requires-Dist: numpy<2; extra == "dev"
|
|
92
|
+
Requires-Dist: scipy<=1.14.1; extra == "dev"
|
|
93
|
+
Requires-Dist: slack-sdk; extra == "dev"
|
|
94
|
+
Requires-Dist: pyarrow<=18.0.0; extra == "dev"
|
|
95
|
+
Requires-Dist: pydantic<2; extra == "dev"
|
|
91
96
|
Dynamic: provides-extra
|
|
92
97
|
Dynamic: requires-dist
|