-
Notifications
You must be signed in to change notification settings - Fork 165
Expand file tree
/
Copy pathdashboard_task.py
More file actions
52 lines (36 loc) · 1.55 KB
/
dashboard_task.py
File metadata and controls
52 lines (36 loc) · 1.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Code generated from jsonschema.json. DO NOT EDIT.
from dataclasses import dataclass
from typing import TYPE_CHECKING, TypedDict
from databricks.bundles.core._transform import _transform
from databricks.bundles.core._transform_to_json import _transform_to_json_value
from databricks.bundles.core._variable import VariableOrOptional
from databricks.bundles.jobs._models.subscription import Subscription, SubscriptionParam
if TYPE_CHECKING:
from typing_extensions import Self
@dataclass(kw_only=True)
class DashboardTask:
"""
Configures the Lakeview Dashboard job task type.
"""
dashboard_id: VariableOrOptional[str] = None
subscription: VariableOrOptional[Subscription] = None
warehouse_id: VariableOrOptional[str] = None
"""
Optional: The warehouse id to execute the dashboard with for the schedule.
If not specified, the default warehouse of the dashboard will be used.
"""
@classmethod
def from_dict(cls, value: "DashboardTaskDict") -> "Self":
return _transform(cls, value)
def as_dict(self) -> "DashboardTaskDict":
return _transform_to_json_value(self) # type:ignore
class DashboardTaskDict(TypedDict, total=False):
""""""
dashboard_id: VariableOrOptional[str]
subscription: VariableOrOptional[SubscriptionParam]
warehouse_id: VariableOrOptional[str]
"""
Optional: The warehouse id to execute the dashboard with for the schedule.
If not specified, the default warehouse of the dashboard will be used.
"""
DashboardTaskParam = DashboardTaskDict | DashboardTask