acryl-datahub 0.15.0.2rc2__py3-none-any.whl → 0.15.0.2rc3__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.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/METADATA +2440 -2440
- {acryl_datahub-0.15.0.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/RECORD +33 -33
- datahub/__init__.py +1 -1
- datahub/api/entities/structuredproperties/structuredproperties.py +12 -1
- datahub/cli/specific/structuredproperties_cli.py +84 -0
- datahub/ingestion/api/source.py +2 -0
- datahub/ingestion/source/bigquery_v2/bigquery.py +31 -33
- datahub/ingestion/source/bigquery_v2/bigquery_report.py +0 -3
- datahub/ingestion/source/bigquery_v2/bigquery_schema_gen.py +11 -11
- datahub/ingestion/source/bigquery_v2/lineage.py +7 -7
- datahub/ingestion/source/bigquery_v2/usage.py +57 -57
- datahub/ingestion/source/cassandra/cassandra_profiling.py +24 -24
- datahub/ingestion/source/cassandra/cassandra_utils.py +0 -3
- datahub/ingestion/source/datahub/config.py +6 -0
- datahub/ingestion/source/datahub/datahub_source.py +12 -2
- datahub/ingestion/source/dremio/dremio_reporting.py +0 -3
- datahub/ingestion/source/dremio/dremio_source.py +2 -2
- datahub/ingestion/source/gc/datahub_gc.py +10 -14
- datahub/ingestion/source/looker/looker_config.py +8 -3
- datahub/ingestion/source/redshift/redshift.py +32 -34
- datahub/ingestion/source/redshift/usage.py +29 -29
- datahub/ingestion/source/snowflake/snowflake_report.py +0 -3
- datahub/ingestion/source/snowflake/snowflake_schema_gen.py +18 -16
- datahub/ingestion/source/snowflake/snowflake_usage_v2.py +46 -47
- datahub/ingestion/source/snowflake/snowflake_v2.py +38 -39
- datahub/ingestion/source/sql/teradata.py +2 -2
- datahub/ingestion/source/tableau/tableau.py +119 -31
- datahub/ingestion/source/unity/source.py +71 -71
- datahub/ingestion/source_report/ingestion_stage.py +24 -20
- datahub/utilities/perf_timer.py +11 -6
- {acryl_datahub-0.15.0.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/WHEEL +0 -0
- {acryl_datahub-0.15.0.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/entry_points.txt +0 -0
- {acryl_datahub-0.15.0.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/top_level.txt +0 -0
datahub/utilities/perf_timer.py
CHANGED
|
@@ -57,7 +57,7 @@ class PerfTimer(AbstractContextManager):
|
|
|
57
57
|
self.finish()
|
|
58
58
|
return None
|
|
59
59
|
|
|
60
|
-
def elapsed_seconds(self) -> float:
|
|
60
|
+
def elapsed_seconds(self, digits: int = 4) -> float:
|
|
61
61
|
"""
|
|
62
62
|
Returns the elapsed time in seconds.
|
|
63
63
|
"""
|
|
@@ -65,11 +65,18 @@ class PerfTimer(AbstractContextManager):
|
|
|
65
65
|
return self._past_active_time
|
|
66
66
|
|
|
67
67
|
if self.end_time is None:
|
|
68
|
-
|
|
68
|
+
elapsed = (time.perf_counter() - self.start_time) + (self._past_active_time)
|
|
69
69
|
else:
|
|
70
|
-
|
|
70
|
+
elapsed = (self.end_time - self.start_time) + self._past_active_time
|
|
71
|
+
|
|
72
|
+
return round(elapsed, digits)
|
|
71
73
|
|
|
72
74
|
def assert_timer_is_running(self) -> None:
|
|
75
|
+
if not self.is_running():
|
|
76
|
+
self._error_state = True
|
|
77
|
+
logger.warning("Did you forget to start the timer ?")
|
|
78
|
+
|
|
79
|
+
def is_running(self) -> bool:
|
|
73
80
|
"""
|
|
74
81
|
Returns true if timer is in running state.
|
|
75
82
|
Timer is in NOT in running state if
|
|
@@ -77,9 +84,7 @@ class PerfTimer(AbstractContextManager):
|
|
|
77
84
|
2. it is in paused state.
|
|
78
85
|
3. it had been started and finished in the past but not started again.
|
|
79
86
|
"""
|
|
80
|
-
|
|
81
|
-
self._error_state = True
|
|
82
|
-
logger.warning("Did you forget to start the timer ?")
|
|
87
|
+
return self.start_time is not None and not self.paused and self.end_time is None
|
|
83
88
|
|
|
84
89
|
def __repr__(self) -> str:
|
|
85
90
|
return repr(self.as_obj())
|
|
File without changes
|
{acryl_datahub-0.15.0.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
|
File without changes
|