acryl-datahub 1.2.0.8rc4__py3-none-any.whl → 1.2.0.9rc1__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.

datahub/sdk/dashboard.py CHANGED
@@ -1,7 +1,7 @@
1
1
  from __future__ import annotations
2
2
 
3
3
  from datetime import datetime
4
- from typing import Dict, List, Optional, Type, Union
4
+ from typing import Dict, List, Optional, Sequence, Type, Union
5
5
 
6
6
  from deprecated.sphinx import deprecated
7
7
  from typing_extensions import Self
@@ -73,9 +73,9 @@ class Dashboard(
73
73
  custom_properties: Optional[Dict[str, str]] = None,
74
74
  last_modified: Optional[datetime] = None,
75
75
  last_refreshed: Optional[datetime] = None,
76
- input_datasets: Optional[List[Union[DatasetUrnOrStr, Dataset]]] = None,
77
- charts: Optional[List[Union[ChartUrnOrStr, Chart]]] = None,
78
- dashboards: Optional[List[Union[DashboardUrnOrStr, Dashboard]]] = None,
76
+ input_datasets: Optional[Sequence[Union[DatasetUrnOrStr, Dataset]]] = None,
77
+ charts: Optional[Sequence[Union[ChartUrnOrStr, Chart]]] = None,
78
+ dashboards: Optional[Sequence[Union[DashboardUrnOrStr, Dashboard]]] = None,
79
79
  # Standard aspects.
80
80
  parent_container: ParentContainerInputType | Unset = unset,
81
81
  subtype: Optional[str] = None,
@@ -281,7 +281,7 @@ class Dashboard(
281
281
  ]
282
282
 
283
283
  def set_input_datasets(
284
- self, input_datasets: List[Union[DatasetUrnOrStr, Dataset]]
284
+ self, input_datasets: Sequence[Union[DatasetUrnOrStr, Dataset]]
285
285
  ) -> None:
286
286
  """Set the input datasets of the dashboard."""
287
287
  props = self._ensure_dashboard_props()
@@ -332,7 +332,7 @@ class Dashboard(
332
332
  return []
333
333
  return [ChartUrn.from_string(edge.destinationUrn) for edge in chart_edges]
334
334
 
335
- def set_charts(self, charts: List[Union[ChartUrnOrStr, Chart]]) -> None:
335
+ def set_charts(self, charts: Sequence[Union[ChartUrnOrStr, Chart]]) -> None:
336
336
  """Set the charts of the dashboard."""
337
337
  props = self._ensure_dashboard_props()
338
338
  chart_edges = props.chartEdges or []
@@ -384,7 +384,7 @@ class Dashboard(
384
384
  ]
385
385
 
386
386
  def set_dashboards(
387
- self, dashboards: List[Union[DashboardUrnOrStr, Dashboard]]
387
+ self, dashboards: Sequence[Union[DashboardUrnOrStr, Dashboard]]
388
388
  ) -> None:
389
389
  """Set the dashboards of the dashboard."""
390
390
  props = self._ensure_dashboard_props()
datahub/sdk/dataset.py CHANGED
@@ -46,6 +46,10 @@ from datahub.sdk.entity import Entity, ExtraAspectsType
46
46
  from datahub.utilities.sentinels import Unset, unset
47
47
 
48
48
  SchemaFieldInputType: TypeAlias = Union[
49
+ # There is no Enum variant for schema field types because that would force users to do a mapping
50
+ # to our enum from the raw source type, so additional complexity on their side.
51
+ # To avoid that, the raw source native type can be provided as a string,
52
+ # and we will do the mapping internally (in sql_types.py)
49
53
  Tuple[str, str], # (name, type)
50
54
  Tuple[str, str, str], # (name, type, description)
51
55
  models.SchemaFieldClass,