acryl-datahub 0.15.0.1rc10__py3-none-any.whl → 0.15.0.1rc12__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.

Files changed (33) hide show
  1. {acryl_datahub-0.15.0.1rc10.dist-info → acryl_datahub-0.15.0.1rc12.dist-info}/METADATA +2376 -2380
  2. {acryl_datahub-0.15.0.1rc10.dist-info → acryl_datahub-0.15.0.1rc12.dist-info}/RECORD +33 -33
  3. datahub/__init__.py +1 -1
  4. datahub/api/circuit_breaker/assertion_circuit_breaker.py +5 -4
  5. datahub/configuration/common.py +2 -5
  6. datahub/emitter/mce_builder.py +17 -1
  7. datahub/emitter/mcp_builder.py +2 -7
  8. datahub/emitter/mcp_patch_builder.py +2 -2
  9. datahub/emitter/rest_emitter.py +2 -2
  10. datahub/ingestion/api/closeable.py +3 -3
  11. datahub/ingestion/api/ingestion_job_checkpointing_provider_base.py +4 -7
  12. datahub/ingestion/api/report.py +4 -1
  13. datahub/ingestion/api/sink.py +4 -3
  14. datahub/ingestion/api/source_helpers.py +2 -6
  15. datahub/ingestion/source/bigquery_v2/bigquery_schema.py +5 -20
  16. datahub/ingestion/source/datahub/datahub_kafka_reader.py +2 -1
  17. datahub/ingestion/source/gc/dataprocess_cleanup.py +19 -6
  18. datahub/ingestion/source/s3/source.py +1 -1
  19. datahub/ingestion/source/sql/hive.py +15 -0
  20. datahub/ingestion/source/sql/hive_metastore.py +7 -0
  21. datahub/ingestion/source/sql/mssql/source.py +1 -1
  22. datahub/ingestion/source/sql/sql_common.py +41 -102
  23. datahub/ingestion/source/sql/sql_generic_profiler.py +5 -6
  24. datahub/ingestion/source/sql/sql_report.py +2 -0
  25. datahub/ingestion/source/state/checkpoint.py +2 -1
  26. datahub/ingestion/source/tableau/tableau.py +14 -6
  27. datahub/ingestion/source/unity/proxy.py +8 -27
  28. datahub/metadata/_urns/urn_defs.py +168 -168
  29. datahub/utilities/time.py +8 -3
  30. datahub/utilities/urns/_urn_base.py +5 -7
  31. {acryl_datahub-0.15.0.1rc10.dist-info → acryl_datahub-0.15.0.1rc12.dist-info}/WHEEL +0 -0
  32. {acryl_datahub-0.15.0.1rc10.dist-info → acryl_datahub-0.15.0.1rc12.dist-info}/entry_points.txt +0 -0
  33. {acryl_datahub-0.15.0.1rc10.dist-info → acryl_datahub-0.15.0.1rc12.dist-info}/top_level.txt +0 -0
datahub/utilities/time.py CHANGED
@@ -1,6 +1,8 @@
1
1
  import time
2
2
  from dataclasses import dataclass
3
- from datetime import datetime, timezone
3
+ from datetime import datetime
4
+
5
+ from datahub.emitter.mce_builder import make_ts_millis, parse_ts_millis
4
6
 
5
7
 
6
8
  def get_current_time_in_seconds() -> int:
@@ -9,12 +11,15 @@ def get_current_time_in_seconds() -> int:
9
11
 
10
12
  def ts_millis_to_datetime(ts_millis: int) -> datetime:
11
13
  """Converts input timestamp in milliseconds to a datetime object with UTC timezone"""
12
- return datetime.fromtimestamp(ts_millis / 1000, tz=timezone.utc)
14
+ return parse_ts_millis(ts_millis)
13
15
 
14
16
 
15
17
  def datetime_to_ts_millis(dt: datetime) -> int:
16
18
  """Converts a datetime object to timestamp in milliseconds"""
17
- return int(round(dt.timestamp() * 1000))
19
+ # TODO: Deprecate these helpers in favor of make_ts_millis and parse_ts_millis.
20
+ # The other ones support None with a typing overload.
21
+ # Also possibly move those helpers to this file.
22
+ return make_ts_millis(dt)
18
23
 
19
24
 
20
25
  @dataclass
@@ -1,9 +1,10 @@
1
1
  import functools
2
2
  import urllib.parse
3
3
  from abc import abstractmethod
4
- from typing import ClassVar, Dict, List, Optional, Type, TypeVar
4
+ from typing import ClassVar, Dict, List, Optional, Type
5
5
 
6
6
  from deprecated import deprecated
7
+ from typing_extensions import Self
7
8
 
8
9
  from datahub.utilities.urns.error import InvalidUrnError
9
10
 
@@ -42,9 +43,6 @@ def _split_entity_id(entity_id: str) -> List[str]:
42
43
  return parts
43
44
 
44
45
 
45
- _UrnSelf = TypeVar("_UrnSelf", bound="Urn")
46
-
47
-
48
46
  @functools.total_ordering
49
47
  class Urn:
50
48
  """
@@ -88,7 +86,7 @@ class Urn:
88
86
  return self._entity_ids
89
87
 
90
88
  @classmethod
91
- def from_string(cls: Type[_UrnSelf], urn_str: str) -> "_UrnSelf":
89
+ def from_string(cls, urn_str: str) -> Self:
92
90
  """
93
91
  Creates an Urn from its string representation.
94
92
 
@@ -174,7 +172,7 @@ class Urn:
174
172
 
175
173
  @classmethod
176
174
  @deprecated(reason="prefer .from_string")
177
- def create_from_string(cls: Type[_UrnSelf], urn_str: str) -> "_UrnSelf":
175
+ def create_from_string(cls, urn_str: str) -> Self:
178
176
  return cls.from_string(urn_str)
179
177
 
180
178
  @deprecated(reason="prefer .entity_ids")
@@ -270,5 +268,5 @@ class _SpecificUrn(Urn):
270
268
 
271
269
  @classmethod
272
270
  @abstractmethod
273
- def _parse_ids(cls: Type[_UrnSelf], entity_ids: List[str]) -> _UrnSelf:
271
+ def _parse_ids(cls, entity_ids: List[str]) -> Self:
274
272
  raise NotImplementedError()