acryl-datahub 0.15.0.2rc1__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 (34) hide show
  1. {acryl_datahub-0.15.0.2rc1.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/METADATA +2469 -2459
  2. {acryl_datahub-0.15.0.2rc1.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/RECORD +34 -34
  3. {acryl_datahub-0.15.0.2rc1.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/WHEEL +1 -1
  4. datahub/__init__.py +1 -1
  5. datahub/api/entities/structuredproperties/structuredproperties.py +12 -1
  6. datahub/cli/specific/structuredproperties_cli.py +84 -0
  7. datahub/ingestion/api/source.py +2 -0
  8. datahub/ingestion/source/bigquery_v2/bigquery.py +31 -33
  9. datahub/ingestion/source/bigquery_v2/bigquery_report.py +0 -3
  10. datahub/ingestion/source/bigquery_v2/bigquery_schema_gen.py +11 -11
  11. datahub/ingestion/source/bigquery_v2/lineage.py +7 -7
  12. datahub/ingestion/source/bigquery_v2/usage.py +57 -57
  13. datahub/ingestion/source/cassandra/cassandra_profiling.py +24 -24
  14. datahub/ingestion/source/cassandra/cassandra_utils.py +0 -3
  15. datahub/ingestion/source/datahub/config.py +6 -0
  16. datahub/ingestion/source/datahub/datahub_source.py +12 -2
  17. datahub/ingestion/source/dremio/dremio_reporting.py +0 -3
  18. datahub/ingestion/source/dremio/dremio_source.py +2 -2
  19. datahub/ingestion/source/gc/datahub_gc.py +10 -14
  20. datahub/ingestion/source/looker/looker_config.py +8 -3
  21. datahub/ingestion/source/redshift/redshift.py +32 -34
  22. datahub/ingestion/source/redshift/usage.py +29 -29
  23. datahub/ingestion/source/snowflake/snowflake_report.py +0 -3
  24. datahub/ingestion/source/snowflake/snowflake_schema_gen.py +18 -16
  25. datahub/ingestion/source/snowflake/snowflake_usage_v2.py +46 -47
  26. datahub/ingestion/source/snowflake/snowflake_v2.py +38 -39
  27. datahub/ingestion/source/sql/teradata.py +2 -2
  28. datahub/ingestion/source/tableau/tableau.py +119 -31
  29. datahub/ingestion/source/unity/source.py +71 -71
  30. datahub/ingestion/source_report/ingestion_stage.py +24 -20
  31. datahub/utilities/file_backed_collections.py +1 -1
  32. datahub/utilities/perf_timer.py +11 -6
  33. {acryl_datahub-0.15.0.2rc1.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/entry_points.txt +0 -0
  34. {acryl_datahub-0.15.0.2rc1.dist-info → acryl_datahub-0.15.0.2rc3.dist-info}/top_level.txt +0 -0
@@ -243,7 +243,7 @@ class FileBackedDict(MutableMapping[str, _VT], Closeable, Generic[_VT]):
243
243
  # This was added in 3.24.0 from 2018-06-04.
244
244
  # See https://www.sqlite.org/lang_conflict.html
245
245
  if OVERRIDE_SQLITE_VERSION_REQUIREMENT:
246
- self.use_sqlite_on_conflict = False
246
+ self._use_sqlite_on_conflict = False
247
247
  else:
248
248
  raise RuntimeError("SQLite version 3.24.0 or later is required")
249
249
 
@@ -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())