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.

Files changed (33) hide show
  1. {acryl_datahub-0.15.0.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/METADATA +2440 -2440
  2. {acryl_datahub-0.15.0.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/RECORD +33 -33
  3. datahub/__init__.py +1 -1
  4. datahub/api/entities/structuredproperties/structuredproperties.py +12 -1
  5. datahub/cli/specific/structuredproperties_cli.py +84 -0
  6. datahub/ingestion/api/source.py +2 -0
  7. datahub/ingestion/source/bigquery_v2/bigquery.py +31 -33
  8. datahub/ingestion/source/bigquery_v2/bigquery_report.py +0 -3
  9. datahub/ingestion/source/bigquery_v2/bigquery_schema_gen.py +11 -11
  10. datahub/ingestion/source/bigquery_v2/lineage.py +7 -7
  11. datahub/ingestion/source/bigquery_v2/usage.py +57 -57
  12. datahub/ingestion/source/cassandra/cassandra_profiling.py +24 -24
  13. datahub/ingestion/source/cassandra/cassandra_utils.py +0 -3
  14. datahub/ingestion/source/datahub/config.py +6 -0
  15. datahub/ingestion/source/datahub/datahub_source.py +12 -2
  16. datahub/ingestion/source/dremio/dremio_reporting.py +0 -3
  17. datahub/ingestion/source/dremio/dremio_source.py +2 -2
  18. datahub/ingestion/source/gc/datahub_gc.py +10 -14
  19. datahub/ingestion/source/looker/looker_config.py +8 -3
  20. datahub/ingestion/source/redshift/redshift.py +32 -34
  21. datahub/ingestion/source/redshift/usage.py +29 -29
  22. datahub/ingestion/source/snowflake/snowflake_report.py +0 -3
  23. datahub/ingestion/source/snowflake/snowflake_schema_gen.py +18 -16
  24. datahub/ingestion/source/snowflake/snowflake_usage_v2.py +46 -47
  25. datahub/ingestion/source/snowflake/snowflake_v2.py +38 -39
  26. datahub/ingestion/source/sql/teradata.py +2 -2
  27. datahub/ingestion/source/tableau/tableau.py +119 -31
  28. datahub/ingestion/source/unity/source.py +71 -71
  29. datahub/ingestion/source_report/ingestion_stage.py +24 -20
  30. datahub/utilities/perf_timer.py +11 -6
  31. {acryl_datahub-0.15.0.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/WHEEL +0 -0
  32. {acryl_datahub-0.15.0.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/entry_points.txt +0 -0
  33. {acryl_datahub-0.15.0.2rc2.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/top_level.txt +0 -0
@@ -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
- return (time.perf_counter() - self.start_time) + (self._past_active_time)
68
+ elapsed = (time.perf_counter() - self.start_time) + (self._past_active_time)
69
69
  else:
70
- return (self.end_time - self.start_time) + self._past_active_time
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
- if self.start_time is None or self.paused or self.end_time:
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())