acryl-datahub-cloud 0.3.12rc7__py3-none-any.whl → 0.3.12rc9__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 +13 -3
- acryl_datahub_cloud/datahub_reporting/datahub_form_reporting.py +29 -13
- acryl_datahub_cloud/metadata/_urns/urn_defs.py +1898 -1898
- acryl_datahub_cloud/metadata/schema.avsc +18520 -18981
- acryl_datahub_cloud/metadata/schema_classes.py +671 -671
- acryl_datahub_cloud/metadata/schemas/ConstraintInfo.avsc +1 -1
- acryl_datahub_cloud/metadata/schemas/DataHubPolicyInfo.avsc +1 -1
- acryl_datahub_cloud/metadata/schemas/MetadataChangeEvent.avsc +1 -1
- acryl_datahub_cloud/metadata/schemas/SubscriptionKey.avsc +2 -1
- acryl_datahub_cloud/metadata/schemas/UsageFeatures.avsc +9 -0
- acryl_datahub_cloud/sdk/assertion/assertion_base.py +19 -2
- acryl_datahub_cloud/sdk/assertion_input/volume_assertion_input.py +47 -27
- acryl_datahub_cloud/sdk/assertions_client.py +211 -98
- acryl_datahub_cloud/sdk/subscription_client.py +47 -11
- {acryl_datahub_cloud-0.3.12rc7.dist-info → acryl_datahub_cloud-0.3.12rc9.dist-info}/METADATA +41 -41
- {acryl_datahub_cloud-0.3.12rc7.dist-info → acryl_datahub_cloud-0.3.12rc9.dist-info}/RECORD +20 -20
- {acryl_datahub_cloud-0.3.12rc7.dist-info → acryl_datahub_cloud-0.3.12rc9.dist-info}/WHEEL +0 -0
- {acryl_datahub_cloud-0.3.12rc7.dist-info → acryl_datahub_cloud-0.3.12rc9.dist-info}/entry_points.txt +0 -0
- {acryl_datahub_cloud-0.3.12rc7.dist-info → acryl_datahub_cloud-0.3.12rc9.dist-info}/top_level.txt +0 -0
|
@@ -119,10 +119,16 @@ class DataHubFormsNotificationsSource(Source):
|
|
|
119
119
|
for urn, form in self.get_forms():
|
|
120
120
|
if not self.is_form_complete(urn, form.type):
|
|
121
121
|
assignees = self.get_form_assignees(urn, form)
|
|
122
|
-
self.process_notify_on_publish(
|
|
122
|
+
self.process_notify_on_publish(
|
|
123
|
+
assignees, form.name, urn, form.description
|
|
124
|
+
)
|
|
123
125
|
|
|
124
126
|
def process_notify_on_publish(
|
|
125
|
-
self,
|
|
127
|
+
self,
|
|
128
|
+
form_assignees: List[str],
|
|
129
|
+
form_name: str,
|
|
130
|
+
form_urn: str,
|
|
131
|
+
form_details: str | None,
|
|
126
132
|
) -> None:
|
|
127
133
|
"""
|
|
128
134
|
Take in form assignees, find the ones who haven't been notified on publish, and build a notification for them.
|
|
@@ -139,12 +145,16 @@ class DataHubFormsNotificationsSource(Source):
|
|
|
139
145
|
self.report.notifications_sent += recipient_count
|
|
140
146
|
self.report.forms_count += 1
|
|
141
147
|
|
|
148
|
+
parameters = [{"key": "formName", "value": form_name}]
|
|
149
|
+
if form_details is not None:
|
|
150
|
+
parameters.append({"key": "formDetails", "value": form_details})
|
|
151
|
+
|
|
142
152
|
response = self.execute_graphql_with_retry(
|
|
143
153
|
GRAPHQL_SEND_FORM_NOTIFICATION_REQUEST,
|
|
144
154
|
variables={
|
|
145
155
|
"input": {
|
|
146
156
|
"type": "BROADCAST_COMPLIANCE_FORM_PUBLISH",
|
|
147
|
-
"parameters":
|
|
157
|
+
"parameters": parameters,
|
|
148
158
|
"recipients": self.recipient_builder.convert_recipients_to_json_objects(
|
|
149
159
|
recipients
|
|
150
160
|
),
|
|
@@ -10,7 +10,7 @@ from pydantic import BaseModel
|
|
|
10
10
|
from acryl_datahub_cloud.elasticsearch.graph_service import BaseModelRow
|
|
11
11
|
from datahub.emitter.mcp import MetadataChangeProposalWrapper
|
|
12
12
|
from datahub.ingestion.graph.client import DataHubGraph
|
|
13
|
-
from datahub.ingestion.graph.filters import
|
|
13
|
+
from datahub.ingestion.graph.filters import RawSearchFilter
|
|
14
14
|
from datahub.metadata.schema_classes import (
|
|
15
15
|
DomainPropertiesClass,
|
|
16
16
|
FormAssociationClass,
|
|
@@ -149,7 +149,7 @@ class DataHubFormReportingData(FormData):
|
|
|
149
149
|
)
|
|
150
150
|
)
|
|
151
151
|
|
|
152
|
-
def get_form_existence_or_filters(self) ->
|
|
152
|
+
def get_form_existence_or_filters(self) -> RawSearchFilter:
|
|
153
153
|
"""
|
|
154
154
|
Datasets must either have completedForms or incompleteForms assigned to
|
|
155
155
|
them
|
|
@@ -157,25 +157,41 @@ class DataHubFormReportingData(FormData):
|
|
|
157
157
|
if self.allowed_forms:
|
|
158
158
|
return [
|
|
159
159
|
{
|
|
160
|
-
"
|
|
161
|
-
|
|
162
|
-
|
|
160
|
+
"and": [
|
|
161
|
+
{
|
|
162
|
+
"field": "completedForms",
|
|
163
|
+
"condition": "EQUAL",
|
|
164
|
+
"values": self.allowed_forms,
|
|
165
|
+
}
|
|
166
|
+
]
|
|
163
167
|
},
|
|
164
168
|
{
|
|
165
|
-
"
|
|
166
|
-
|
|
167
|
-
|
|
169
|
+
"and": [
|
|
170
|
+
{
|
|
171
|
+
"field": "incompleteForms",
|
|
172
|
+
"condition": "EQUAL",
|
|
173
|
+
"values": self.allowed_forms,
|
|
174
|
+
}
|
|
175
|
+
]
|
|
168
176
|
},
|
|
169
177
|
]
|
|
170
178
|
else:
|
|
171
179
|
return [
|
|
172
180
|
{
|
|
173
|
-
"
|
|
174
|
-
|
|
181
|
+
"and": [
|
|
182
|
+
{
|
|
183
|
+
"field": "completedForms",
|
|
184
|
+
"condition": "EXISTS",
|
|
185
|
+
}
|
|
186
|
+
]
|
|
175
187
|
},
|
|
176
188
|
{
|
|
177
|
-
"
|
|
178
|
-
|
|
189
|
+
"and": [
|
|
190
|
+
{
|
|
191
|
+
"field": "incompleteForms",
|
|
192
|
+
"condition": "EXISTS",
|
|
193
|
+
}
|
|
194
|
+
]
|
|
179
195
|
},
|
|
180
196
|
]
|
|
181
197
|
|
|
@@ -293,7 +309,7 @@ class DataHubFormReportingData(FormData):
|
|
|
293
309
|
extra_fields = [f for f in self.DataHubDatasetSearchRow.__fields__]
|
|
294
310
|
# TODO: Replace with the new search/filter SDK.
|
|
295
311
|
result = self.graph.get_results_by_filter(
|
|
296
|
-
extra_or_filters=
|
|
312
|
+
extra_or_filters=self.get_form_existence_or_filters(),
|
|
297
313
|
extra_source_fields=extra_fields,
|
|
298
314
|
skip_cache=True,
|
|
299
315
|
)
|