acryl-datahub-cloud 0.3.8rc11__py3-none-any.whl → 0.3.8rc13__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.

@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acryl-datahub-cloud",
3
- "version": "0.3.8rc11",
3
+ "version": "0.3.8rc13",
4
4
  "install_requires": [
5
5
  "avro-gen3==0.7.16",
6
6
  "acryl-datahub"
@@ -112,6 +112,8 @@ class DataHubMetadataSharingSource(Source):
112
112
 
113
113
  if next_scroll_id is None:
114
114
  break
115
+ else:
116
+ scroll_id = next_scroll_id
115
117
 
116
118
  time.sleep(self.config.batch_delay_ms / 1000.0)
117
119
 
@@ -193,8 +195,11 @@ class DataHubMetadataSharingSource(Source):
193
195
  self.report.entities_failed += 1
194
196
 
195
197
  def _determine_lineage_direction(
196
- self, share_config: Dict[str, Any]
198
+ self, share_config: Optional[Dict[str, Any]]
197
199
  ) -> Optional[str]:
200
+ if share_config is None:
201
+ return None
202
+
198
203
  """Determine lineage direction based on share config"""
199
204
  include_upstreams = share_config.get("enableUpstreamLineage", False)
200
205
  include_downstreams = share_config.get(
@@ -396,59 +396,30 @@ class DataHubUsageFeatureReportingSource(StatefulIngestionSourceBase):
396
396
  continue
397
397
 
398
398
  yield {
399
- "timestampMillis": doc["_source"]["timestampMillis"],
400
- "lastObserved": doc["_source"]["systemMetadata"]["lastObserved"],
401
- "urn": doc["_source"]["urn"],
402
- "eventGranularity": (
403
- doc["_source"]["eventGranularity"]
404
- if "eventGranularity" in doc["_source"]
405
- else None
406
- ),
407
- "viewsCount": (
408
- doc["_source"]["viewsCount"]
409
- if "viewsCount" in doc["_source"]
410
- else 0
411
- ),
412
- "uniqueUserCount": (
413
- doc["_source"]["uniqueUserCount"]
414
- if "uniqueUserCount" in doc["_source"]
415
- else None
416
- ),
417
- "userCounts": (
418
- doc["_source"]["event"]["userCounts"]
419
- if "event" in doc["_source"]
420
- and "userCounts" in doc["_source"]["event"]
421
- else []
422
- ),
399
+ "timestampMillis": doc["_source"].get("timestampMillis"),
400
+ "lastObserved": doc["_source"]
401
+ .get("systemMetadata", {})
402
+ .get("lastObserved"),
403
+ "urn": doc["_source"].get("urn"),
404
+ "eventGranularity": doc["_source"].get("eventGranularity"),
405
+ "viewsCount": doc["_source"].get("viewsCount", 0),
406
+ "uniqueUserCount": doc["_source"].get("uniqueUserCount"),
407
+ "userCounts": doc["_source"].get("event", {}).get("userCounts", []),
423
408
  "platform": platform,
424
409
  }
425
410
 
426
411
  def process_query_usage(self, results: Iterable) -> Iterable[Dict]:
427
412
  for doc in results:
428
413
  yield {
429
- "timestampMillis": doc["_source"]["timestampMillis"],
430
- "lastObserved": doc["_source"]["systemMetadata"]["lastObserved"],
431
- "urn": doc["_source"]["urn"],
432
- "eventGranularity": (
433
- doc["_source"]["eventGranularity"]
434
- if "eventGranularity" in doc["_source"]
435
- else None
436
- ),
437
- "queryCount": (
438
- doc["_source"]["queryCount"]
439
- if "queryCount" in doc["_source"]
440
- else 0
441
- ),
442
- "uniqueUserCount": (
443
- doc["_source"]["uniqueUserCount"]
444
- if "uniqueUserCount" in doc["_source"]
445
- else None
446
- ),
447
- "userCounts": (
448
- doc["_source"]["event"]["userCounts"]
449
- if "userCounts" in doc["_source"]["event"]
450
- else []
451
- ),
414
+ "timestampMillis": doc["_source"].get("timestampMillis"),
415
+ "lastObserved": doc["_source"]
416
+ .get("systemMetadata", {})
417
+ .get("lastObserved"),
418
+ "urn": doc["_source"].get("urn"),
419
+ "eventGranularity": doc["_source"].get("eventGranularity"),
420
+ "queryCount": doc["_source"].get("queryCount", 0),
421
+ "uniqueUserCount": doc["_source"].get("uniqueUserCount"),
422
+ "userCounts": doc["_source"].get("event", {}).get("userCounts", []),
452
423
  }
453
424
 
454
425
  def upstream_lineage_batch(self, results: Iterable) -> Iterable[Dict]:
@@ -30,6 +30,7 @@ from ......schema_classes import MLModelFactorsClass
30
30
  from ......schema_classes import MLModelGroupPropertiesClass
31
31
  from ......schema_classes import MLModelPropertiesClass
32
32
  from ......schema_classes import MLPrimaryKeyPropertiesClass
33
+ from ......schema_classes import MLTrainingRunPropertiesClass
33
34
  from ......schema_classes import MetricsClass
34
35
  from ......schema_classes import QuantitativeAnalysesClass
35
36
  from ......schema_classes import SourceCodeClass
@@ -61,6 +62,7 @@ MLModelFactors = MLModelFactorsClass
61
62
  MLModelGroupProperties = MLModelGroupPropertiesClass
62
63
  MLModelProperties = MLModelPropertiesClass
63
64
  MLPrimaryKeyProperties = MLPrimaryKeyPropertiesClass
65
+ MLTrainingRunProperties = MLTrainingRunPropertiesClass
64
66
  Metrics = MetricsClass
65
67
  QuantitativeAnalyses = QuantitativeAnalysesClass
66
68
  SourceCode = SourceCodeClass