acryl-datahub 0.15.0.1rc11__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.
- {acryl_datahub-0.15.0.1rc11.dist-info → acryl_datahub-0.15.0.1rc12.dist-info}/METADATA +2381 -2385
- {acryl_datahub-0.15.0.1rc11.dist-info → acryl_datahub-0.15.0.1rc12.dist-info}/RECORD +33 -33
- datahub/__init__.py +1 -1
- datahub/api/circuit_breaker/assertion_circuit_breaker.py +5 -4
- datahub/configuration/common.py +2 -5
- datahub/emitter/mce_builder.py +17 -1
- datahub/emitter/mcp_builder.py +2 -7
- datahub/emitter/mcp_patch_builder.py +2 -2
- datahub/emitter/rest_emitter.py +2 -2
- datahub/ingestion/api/closeable.py +3 -3
- datahub/ingestion/api/ingestion_job_checkpointing_provider_base.py +4 -7
- datahub/ingestion/api/report.py +4 -1
- datahub/ingestion/api/sink.py +4 -3
- datahub/ingestion/api/source_helpers.py +2 -6
- datahub/ingestion/source/bigquery_v2/bigquery_schema.py +5 -20
- datahub/ingestion/source/datahub/datahub_kafka_reader.py +2 -1
- datahub/ingestion/source/gc/dataprocess_cleanup.py +19 -6
- datahub/ingestion/source/s3/source.py +1 -1
- datahub/ingestion/source/sql/hive.py +15 -0
- datahub/ingestion/source/sql/hive_metastore.py +7 -0
- datahub/ingestion/source/sql/mssql/source.py +1 -1
- datahub/ingestion/source/sql/sql_common.py +41 -102
- datahub/ingestion/source/sql/sql_generic_profiler.py +5 -6
- datahub/ingestion/source/sql/sql_report.py +2 -0
- datahub/ingestion/source/state/checkpoint.py +2 -1
- datahub/ingestion/source/tableau/tableau.py +1 -4
- datahub/ingestion/source/unity/proxy.py +8 -27
- datahub/metadata/_urns/urn_defs.py +168 -168
- datahub/utilities/time.py +8 -3
- datahub/utilities/urns/_urn_base.py +5 -7
- {acryl_datahub-0.15.0.1rc11.dist-info → acryl_datahub-0.15.0.1rc12.dist-info}/WHEEL +0 -0
- {acryl_datahub-0.15.0.1rc11.dist-info → acryl_datahub-0.15.0.1rc12.dist-info}/entry_points.txt +0 -0
- {acryl_datahub-0.15.0.1rc11.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
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
|
271
|
+
def _parse_ids(cls, entity_ids: List[str]) -> Self:
|
|
274
272
|
raise NotImplementedError()
|
|
File without changes
|
{acryl_datahub-0.15.0.1rc11.dist-info → acryl_datahub-0.15.0.1rc12.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|