databricks-sdk 0.42.0__py3-none-any.whl → 0.43.0__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 databricks-sdk might be problematic. Click here for more details.

@@ -6913,12 +6913,17 @@ class TemporaryCredentials:
6913
6913
  """Server time when the credential will expire, in epoch milliseconds. The API client is advised to
6914
6914
  cache the credential given this expiration time."""
6915
6915
 
6916
+ gcp_oauth_token: Optional[GcpOauthToken] = None
6917
+ """GCP temporary credentials for API authentication. Read more at
6918
+ https://developers.google.com/identity/protocols/oauth2/service-account"""
6919
+
6916
6920
  def as_dict(self) -> dict:
6917
6921
  """Serializes the TemporaryCredentials into a dictionary suitable for use as a JSON request body."""
6918
6922
  body = {}
6919
6923
  if self.aws_temp_credentials: body['aws_temp_credentials'] = self.aws_temp_credentials.as_dict()
6920
6924
  if self.azure_aad: body['azure_aad'] = self.azure_aad.as_dict()
6921
6925
  if self.expiration_time is not None: body['expiration_time'] = self.expiration_time
6926
+ if self.gcp_oauth_token: body['gcp_oauth_token'] = self.gcp_oauth_token.as_dict()
6922
6927
  return body
6923
6928
 
6924
6929
  def as_shallow_dict(self) -> dict:
@@ -6927,6 +6932,7 @@ class TemporaryCredentials:
6927
6932
  if self.aws_temp_credentials: body['aws_temp_credentials'] = self.aws_temp_credentials
6928
6933
  if self.azure_aad: body['azure_aad'] = self.azure_aad
6929
6934
  if self.expiration_time is not None: body['expiration_time'] = self.expiration_time
6935
+ if self.gcp_oauth_token: body['gcp_oauth_token'] = self.gcp_oauth_token
6930
6936
  return body
6931
6937
 
6932
6938
  @classmethod
@@ -6934,7 +6940,8 @@ class TemporaryCredentials:
6934
6940
  """Deserializes the TemporaryCredentials from a dictionary."""
6935
6941
  return cls(aws_temp_credentials=_from_dict(d, 'aws_temp_credentials', AwsCredentials),
6936
6942
  azure_aad=_from_dict(d, 'azure_aad', AzureActiveDirectoryToken),
6937
- expiration_time=d.get('expiration_time', None))
6943
+ expiration_time=d.get('expiration_time', None),
6944
+ gcp_oauth_token=_from_dict(d, 'gcp_oauth_token', GcpOauthToken))
6938
6945
 
6939
6946
 
6940
6947
  @dataclass
@@ -7043,6 +7050,9 @@ class UpdateCatalog:
7043
7050
  new_name: Optional[str] = None
7044
7051
  """New name for the catalog."""
7045
7052
 
7053
+ options: Optional[Dict[str, str]] = None
7054
+ """A map of key-value properties attached to the securable."""
7055
+
7046
7056
  owner: Optional[str] = None
7047
7057
  """Username of current owner of catalog."""
7048
7058
 
@@ -7058,6 +7068,7 @@ class UpdateCatalog:
7058
7068
  if self.isolation_mode is not None: body['isolation_mode'] = self.isolation_mode.value
7059
7069
  if self.name is not None: body['name'] = self.name
7060
7070
  if self.new_name is not None: body['new_name'] = self.new_name
7071
+ if self.options: body['options'] = self.options
7061
7072
  if self.owner is not None: body['owner'] = self.owner
7062
7073
  if self.properties: body['properties'] = self.properties
7063
7074
  return body
@@ -7071,6 +7082,7 @@ class UpdateCatalog:
7071
7082
  if self.isolation_mode is not None: body['isolation_mode'] = self.isolation_mode
7072
7083
  if self.name is not None: body['name'] = self.name
7073
7084
  if self.new_name is not None: body['new_name'] = self.new_name
7085
+ if self.options: body['options'] = self.options
7074
7086
  if self.owner is not None: body['owner'] = self.owner
7075
7087
  if self.properties: body['properties'] = self.properties
7076
7088
  return body
@@ -7084,6 +7096,7 @@ class UpdateCatalog:
7084
7096
  isolation_mode=_enum(d, 'isolation_mode', CatalogIsolationMode),
7085
7097
  name=d.get('name', None),
7086
7098
  new_name=d.get('new_name', None),
7099
+ options=d.get('options', None),
7087
7100
  owner=d.get('owner', None),
7088
7101
  properties=d.get('properties', None))
7089
7102
 
@@ -8986,6 +8999,7 @@ class CatalogsAPI:
8986
8999
  enable_predictive_optimization: Optional[EnablePredictiveOptimization] = None,
8987
9000
  isolation_mode: Optional[CatalogIsolationMode] = None,
8988
9001
  new_name: Optional[str] = None,
9002
+ options: Optional[Dict[str, str]] = None,
8989
9003
  owner: Optional[str] = None,
8990
9004
  properties: Optional[Dict[str, str]] = None) -> CatalogInfo:
8991
9005
  """Update a catalog.
@@ -9003,6 +9017,8 @@ class CatalogsAPI:
9003
9017
  Whether the current securable is accessible from all workspaces or a specific set of workspaces.
9004
9018
  :param new_name: str (optional)
9005
9019
  New name for the catalog.
9020
+ :param options: Dict[str,str] (optional)
9021
+ A map of key-value properties attached to the securable.
9006
9022
  :param owner: str (optional)
9007
9023
  Username of current owner of catalog.
9008
9024
  :param properties: Dict[str,str] (optional)
@@ -9016,6 +9032,7 @@ class CatalogsAPI:
9016
9032
  body['enable_predictive_optimization'] = enable_predictive_optimization.value
9017
9033
  if isolation_mode is not None: body['isolation_mode'] = isolation_mode.value
9018
9034
  if new_name is not None: body['new_name'] = new_name
9035
+ if options is not None: body['options'] = options
9019
9036
  if owner is not None: body['owner'] = owner
9020
9037
  if properties is not None: body['properties'] = properties
9021
9038
  headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
@@ -1228,8 +1228,9 @@ class CleanRoomsAPI:
1228
1228
 
1229
1229
  Create a new clean room with the specified collaborators. This method is asynchronous; the returned
1230
1230
  name field inside the clean_room field can be used to poll the clean room status, using the
1231
- :method:cleanrooms/get method. When this method returns, the cluster will be in a PROVISIONING state.
1232
- The cluster will be usable once it enters an ACTIVE state.
1231
+ :method:cleanrooms/get method. When this method returns, the clean room will be in a PROVISIONING
1232
+ state, with only name, owner, comment, created_at and status populated. The clean room will be usable
1233
+ once it enters an ACTIVE state.
1233
1234
 
1234
1235
  The caller must be a metastore admin or have the **CREATE_CLEAN_ROOM** privilege on the metastore.
1235
1236
 
@@ -20,6 +20,66 @@ from databricks.sdk.service import sql
20
20
  # all definitions in this file are in alphabetical order
21
21
 
22
22
 
23
+ @dataclass
24
+ class CancelQueryExecutionResponse:
25
+ status: Optional[List[CancelQueryExecutionResponseStatus]] = None
26
+
27
+ def as_dict(self) -> dict:
28
+ """Serializes the CancelQueryExecutionResponse into a dictionary suitable for use as a JSON request body."""
29
+ body = {}
30
+ if self.status: body['status'] = [v.as_dict() for v in self.status]
31
+ return body
32
+
33
+ def as_shallow_dict(self) -> dict:
34
+ """Serializes the CancelQueryExecutionResponse into a shallow dictionary of its immediate attributes."""
35
+ body = {}
36
+ if self.status: body['status'] = self.status
37
+ return body
38
+
39
+ @classmethod
40
+ def from_dict(cls, d: Dict[str, any]) -> CancelQueryExecutionResponse:
41
+ """Deserializes the CancelQueryExecutionResponse from a dictionary."""
42
+ return cls(status=_repeated_dict(d, 'status', CancelQueryExecutionResponseStatus))
43
+
44
+
45
+ @dataclass
46
+ class CancelQueryExecutionResponseStatus:
47
+ data_token: str
48
+ """The token to poll for result asynchronously Example:
49
+ EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ"""
50
+
51
+ pending: Optional[Empty] = None
52
+ """Represents an empty message, similar to google.protobuf.Empty, which is not available in the
53
+ firm right now."""
54
+
55
+ success: Optional[Empty] = None
56
+ """Represents an empty message, similar to google.protobuf.Empty, which is not available in the
57
+ firm right now."""
58
+
59
+ def as_dict(self) -> dict:
60
+ """Serializes the CancelQueryExecutionResponseStatus into a dictionary suitable for use as a JSON request body."""
61
+ body = {}
62
+ if self.data_token is not None: body['data_token'] = self.data_token
63
+ if self.pending: body['pending'] = self.pending.as_dict()
64
+ if self.success: body['success'] = self.success.as_dict()
65
+ return body
66
+
67
+ def as_shallow_dict(self) -> dict:
68
+ """Serializes the CancelQueryExecutionResponseStatus into a shallow dictionary of its immediate attributes."""
69
+ body = {}
70
+ if self.data_token is not None: body['data_token'] = self.data_token
71
+ if self.pending: body['pending'] = self.pending
72
+ if self.success: body['success'] = self.success
73
+ return body
74
+
75
+ @classmethod
76
+ def from_dict(cls, d: Dict[str, any]) -> CancelQueryExecutionResponseStatus:
77
+ """Deserializes the CancelQueryExecutionResponseStatus from a dictionary."""
78
+ return cls(data_token=d.get('data_token', None),
79
+ pending=_from_dict(d, 'pending', Empty),
80
+ success=_from_dict(d, 'success', Empty))
81
+
82
+
23
83
  @dataclass
24
84
  class CronSchedule:
25
85
  quartz_cron_expression: str
@@ -207,6 +267,87 @@ class DeleteSubscriptionResponse:
207
267
  return cls()
208
268
 
209
269
 
270
+ @dataclass
271
+ class Empty:
272
+ """Represents an empty message, similar to google.protobuf.Empty, which is not available in the
273
+ firm right now."""
274
+
275
+ def as_dict(self) -> dict:
276
+ """Serializes the Empty into a dictionary suitable for use as a JSON request body."""
277
+ body = {}
278
+ return body
279
+
280
+ def as_shallow_dict(self) -> dict:
281
+ """Serializes the Empty into a shallow dictionary of its immediate attributes."""
282
+ body = {}
283
+ return body
284
+
285
+ @classmethod
286
+ def from_dict(cls, d: Dict[str, any]) -> Empty:
287
+ """Deserializes the Empty from a dictionary."""
288
+ return cls()
289
+
290
+
291
+ @dataclass
292
+ class ExecutePublishedDashboardQueryRequest:
293
+ """Execute query request for published Dashboards. Since published dashboards have the option of
294
+ running as the publisher, the datasets, warehouse_id are excluded from the request and instead
295
+ read from the source (lakeview-config) via the additional parameters (dashboardName and
296
+ dashboardRevisionId)"""
297
+
298
+ dashboard_name: str
299
+ """Dashboard name and revision_id is required to retrieve PublishedDatasetDataModel which contains
300
+ the list of datasets, warehouse_id, and embedded_credentials"""
301
+
302
+ dashboard_revision_id: str
303
+
304
+ override_warehouse_id: Optional[str] = None
305
+ """A dashboard schedule can override the warehouse used as compute for processing the published
306
+ dashboard queries"""
307
+
308
+ def as_dict(self) -> dict:
309
+ """Serializes the ExecutePublishedDashboardQueryRequest into a dictionary suitable for use as a JSON request body."""
310
+ body = {}
311
+ if self.dashboard_name is not None: body['dashboard_name'] = self.dashboard_name
312
+ if self.dashboard_revision_id is not None: body['dashboard_revision_id'] = self.dashboard_revision_id
313
+ if self.override_warehouse_id is not None: body['override_warehouse_id'] = self.override_warehouse_id
314
+ return body
315
+
316
+ def as_shallow_dict(self) -> dict:
317
+ """Serializes the ExecutePublishedDashboardQueryRequest into a shallow dictionary of its immediate attributes."""
318
+ body = {}
319
+ if self.dashboard_name is not None: body['dashboard_name'] = self.dashboard_name
320
+ if self.dashboard_revision_id is not None: body['dashboard_revision_id'] = self.dashboard_revision_id
321
+ if self.override_warehouse_id is not None: body['override_warehouse_id'] = self.override_warehouse_id
322
+ return body
323
+
324
+ @classmethod
325
+ def from_dict(cls, d: Dict[str, any]) -> ExecutePublishedDashboardQueryRequest:
326
+ """Deserializes the ExecutePublishedDashboardQueryRequest from a dictionary."""
327
+ return cls(dashboard_name=d.get('dashboard_name', None),
328
+ dashboard_revision_id=d.get('dashboard_revision_id', None),
329
+ override_warehouse_id=d.get('override_warehouse_id', None))
330
+
331
+
332
+ @dataclass
333
+ class ExecuteQueryResponse:
334
+
335
+ def as_dict(self) -> dict:
336
+ """Serializes the ExecuteQueryResponse into a dictionary suitable for use as a JSON request body."""
337
+ body = {}
338
+ return body
339
+
340
+ def as_shallow_dict(self) -> dict:
341
+ """Serializes the ExecuteQueryResponse into a shallow dictionary of its immediate attributes."""
342
+ body = {}
343
+ return body
344
+
345
+ @classmethod
346
+ def from_dict(cls, d: Dict[str, any]) -> ExecuteQueryResponse:
347
+ """Deserializes the ExecuteQueryResponse from a dictionary."""
348
+ return cls()
349
+
350
+
210
351
  @dataclass
211
352
  class GenieAttachment:
212
353
  """Genie AI Response"""
@@ -513,6 +654,25 @@ class GenieStartConversationResponse:
513
654
  message_id=d.get('message_id', None))
514
655
 
515
656
 
657
+ @dataclass
658
+ class GetPublishedDashboardEmbeddedResponse:
659
+
660
+ def as_dict(self) -> dict:
661
+ """Serializes the GetPublishedDashboardEmbeddedResponse into a dictionary suitable for use as a JSON request body."""
662
+ body = {}
663
+ return body
664
+
665
+ def as_shallow_dict(self) -> dict:
666
+ """Serializes the GetPublishedDashboardEmbeddedResponse into a shallow dictionary of its immediate attributes."""
667
+ body = {}
668
+ return body
669
+
670
+ @classmethod
671
+ def from_dict(cls, d: Dict[str, any]) -> GetPublishedDashboardEmbeddedResponse:
672
+ """Deserializes the GetPublishedDashboardEmbeddedResponse from a dictionary."""
673
+ return cls()
674
+
675
+
516
676
  class LifecycleState(Enum):
517
677
 
518
678
  ACTIVE = 'ACTIVE'
@@ -747,6 +907,74 @@ class MigrateDashboardRequest:
747
907
  update_parameter_syntax=d.get('update_parameter_syntax', None))
748
908
 
749
909
 
910
+ @dataclass
911
+ class PendingStatus:
912
+ data_token: str
913
+ """The token to poll for result asynchronously Example:
914
+ EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ"""
915
+
916
+ def as_dict(self) -> dict:
917
+ """Serializes the PendingStatus into a dictionary suitable for use as a JSON request body."""
918
+ body = {}
919
+ if self.data_token is not None: body['data_token'] = self.data_token
920
+ return body
921
+
922
+ def as_shallow_dict(self) -> dict:
923
+ """Serializes the PendingStatus into a shallow dictionary of its immediate attributes."""
924
+ body = {}
925
+ if self.data_token is not None: body['data_token'] = self.data_token
926
+ return body
927
+
928
+ @classmethod
929
+ def from_dict(cls, d: Dict[str, any]) -> PendingStatus:
930
+ """Deserializes the PendingStatus from a dictionary."""
931
+ return cls(data_token=d.get('data_token', None))
932
+
933
+
934
+ @dataclass
935
+ class PollQueryStatusResponse:
936
+ data: Optional[List[PollQueryStatusResponseData]] = None
937
+
938
+ def as_dict(self) -> dict:
939
+ """Serializes the PollQueryStatusResponse into a dictionary suitable for use as a JSON request body."""
940
+ body = {}
941
+ if self.data: body['data'] = [v.as_dict() for v in self.data]
942
+ return body
943
+
944
+ def as_shallow_dict(self) -> dict:
945
+ """Serializes the PollQueryStatusResponse into a shallow dictionary of its immediate attributes."""
946
+ body = {}
947
+ if self.data: body['data'] = self.data
948
+ return body
949
+
950
+ @classmethod
951
+ def from_dict(cls, d: Dict[str, any]) -> PollQueryStatusResponse:
952
+ """Deserializes the PollQueryStatusResponse from a dictionary."""
953
+ return cls(data=_repeated_dict(d, 'data', PollQueryStatusResponseData))
954
+
955
+
956
+ @dataclass
957
+ class PollQueryStatusResponseData:
958
+ status: QueryResponseStatus
959
+
960
+ def as_dict(self) -> dict:
961
+ """Serializes the PollQueryStatusResponseData into a dictionary suitable for use as a JSON request body."""
962
+ body = {}
963
+ if self.status: body['status'] = self.status.as_dict()
964
+ return body
965
+
966
+ def as_shallow_dict(self) -> dict:
967
+ """Serializes the PollQueryStatusResponseData into a shallow dictionary of its immediate attributes."""
968
+ body = {}
969
+ if self.status: body['status'] = self.status
970
+ return body
971
+
972
+ @classmethod
973
+ def from_dict(cls, d: Dict[str, any]) -> PollQueryStatusResponseData:
974
+ """Deserializes the PollQueryStatusResponseData from a dictionary."""
975
+ return cls(status=_from_dict(d, 'status', QueryResponseStatus))
976
+
977
+
750
978
  @dataclass
751
979
  class PublishRequest:
752
980
  dashboard_id: Optional[str] = None
@@ -895,6 +1123,55 @@ class QueryAttachment:
895
1123
  title=d.get('title', None))
896
1124
 
897
1125
 
1126
+ @dataclass
1127
+ class QueryResponseStatus:
1128
+ canceled: Optional[Empty] = None
1129
+ """Represents an empty message, similar to google.protobuf.Empty, which is not available in the
1130
+ firm right now."""
1131
+
1132
+ closed: Optional[Empty] = None
1133
+ """Represents an empty message, similar to google.protobuf.Empty, which is not available in the
1134
+ firm right now."""
1135
+
1136
+ pending: Optional[PendingStatus] = None
1137
+
1138
+ statement_id: Optional[str] = None
1139
+ """The statement id in format(01eef5da-c56e-1f36-bafa-21906587d6ba) The statement_id should be
1140
+ identical to data_token in SuccessStatus and PendingStatus. This field is created for audit
1141
+ logging purpose to record the statement_id of all QueryResponseStatus."""
1142
+
1143
+ success: Optional[SuccessStatus] = None
1144
+
1145
+ def as_dict(self) -> dict:
1146
+ """Serializes the QueryResponseStatus into a dictionary suitable for use as a JSON request body."""
1147
+ body = {}
1148
+ if self.canceled: body['canceled'] = self.canceled.as_dict()
1149
+ if self.closed: body['closed'] = self.closed.as_dict()
1150
+ if self.pending: body['pending'] = self.pending.as_dict()
1151
+ if self.statement_id is not None: body['statement_id'] = self.statement_id
1152
+ if self.success: body['success'] = self.success.as_dict()
1153
+ return body
1154
+
1155
+ def as_shallow_dict(self) -> dict:
1156
+ """Serializes the QueryResponseStatus into a shallow dictionary of its immediate attributes."""
1157
+ body = {}
1158
+ if self.canceled: body['canceled'] = self.canceled
1159
+ if self.closed: body['closed'] = self.closed
1160
+ if self.pending: body['pending'] = self.pending
1161
+ if self.statement_id is not None: body['statement_id'] = self.statement_id
1162
+ if self.success: body['success'] = self.success
1163
+ return body
1164
+
1165
+ @classmethod
1166
+ def from_dict(cls, d: Dict[str, any]) -> QueryResponseStatus:
1167
+ """Deserializes the QueryResponseStatus from a dictionary."""
1168
+ return cls(canceled=_from_dict(d, 'canceled', Empty),
1169
+ closed=_from_dict(d, 'closed', Empty),
1170
+ pending=_from_dict(d, 'pending', PendingStatus),
1171
+ statement_id=d.get('statement_id', None),
1172
+ success=_from_dict(d, 'success', SuccessStatus))
1173
+
1174
+
898
1175
  @dataclass
899
1176
  class QuerySchema:
900
1177
  columns: Optional[List[QuerySchemaColumn]] = None
@@ -1218,6 +1495,35 @@ class SubscriptionSubscriberUser:
1218
1495
  return cls(user_id=d.get('user_id', None))
1219
1496
 
1220
1497
 
1498
+ @dataclass
1499
+ class SuccessStatus:
1500
+ data_token: str
1501
+ """The token to poll for result asynchronously Example:
1502
+ EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ"""
1503
+
1504
+ truncated: Optional[bool] = None
1505
+ """Whether the query result is truncated (either by byte limit or row limit)"""
1506
+
1507
+ def as_dict(self) -> dict:
1508
+ """Serializes the SuccessStatus into a dictionary suitable for use as a JSON request body."""
1509
+ body = {}
1510
+ if self.data_token is not None: body['data_token'] = self.data_token
1511
+ if self.truncated is not None: body['truncated'] = self.truncated
1512
+ return body
1513
+
1514
+ def as_shallow_dict(self) -> dict:
1515
+ """Serializes the SuccessStatus into a shallow dictionary of its immediate attributes."""
1516
+ body = {}
1517
+ if self.data_token is not None: body['data_token'] = self.data_token
1518
+ if self.truncated is not None: body['truncated'] = self.truncated
1519
+ return body
1520
+
1521
+ @classmethod
1522
+ def from_dict(cls, d: Dict[str, any]) -> SuccessStatus:
1523
+ """Deserializes the SuccessStatus from a dictionary."""
1524
+ return cls(data_token=d.get('data_token', None), truncated=d.get('truncated', None))
1525
+
1526
+
1221
1527
  @dataclass
1222
1528
  class TextAttachment:
1223
1529
  content: Optional[str] = None
@@ -1907,3 +2213,107 @@ class LakeviewAPI:
1907
2213
  body=body,
1908
2214
  headers=headers)
1909
2215
  return Schedule.from_dict(res)
2216
+
2217
+
2218
+ class LakeviewEmbeddedAPI:
2219
+ """Token-based Lakeview APIs for embedding dashboards in external applications."""
2220
+
2221
+ def __init__(self, api_client):
2222
+ self._api = api_client
2223
+
2224
+ def get_published_dashboard_embedded(self, dashboard_id: str):
2225
+ """Read a published dashboard in an embedded ui.
2226
+
2227
+ Get the current published dashboard within an embedded context.
2228
+
2229
+ :param dashboard_id: str
2230
+ UUID identifying the published dashboard.
2231
+
2232
+
2233
+ """
2234
+
2235
+ headers = {'Accept': 'application/json', }
2236
+
2237
+ self._api.do('GET',
2238
+ f'/api/2.0/lakeview/dashboards/{dashboard_id}/published/embedded',
2239
+ headers=headers)
2240
+
2241
+
2242
+ class QueryExecutionAPI:
2243
+ """Query execution APIs for AI / BI Dashboards"""
2244
+
2245
+ def __init__(self, api_client):
2246
+ self._api = api_client
2247
+
2248
+ def cancel_published_query_execution(self,
2249
+ dashboard_name: str,
2250
+ dashboard_revision_id: str,
2251
+ *,
2252
+ tokens: Optional[List[str]] = None) -> CancelQueryExecutionResponse:
2253
+ """Cancel the results for the a query for a published, embedded dashboard.
2254
+
2255
+ :param dashboard_name: str
2256
+ :param dashboard_revision_id: str
2257
+ :param tokens: List[str] (optional)
2258
+ Example: EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ
2259
+
2260
+ :returns: :class:`CancelQueryExecutionResponse`
2261
+ """
2262
+
2263
+ query = {}
2264
+ if dashboard_name is not None: query['dashboard_name'] = dashboard_name
2265
+ if dashboard_revision_id is not None: query['dashboard_revision_id'] = dashboard_revision_id
2266
+ if tokens is not None: query['tokens'] = [v for v in tokens]
2267
+ headers = {'Accept': 'application/json', }
2268
+
2269
+ res = self._api.do('DELETE', '/api/2.0/lakeview-query/query/published', query=query, headers=headers)
2270
+ return CancelQueryExecutionResponse.from_dict(res)
2271
+
2272
+ def execute_published_dashboard_query(self,
2273
+ dashboard_name: str,
2274
+ dashboard_revision_id: str,
2275
+ *,
2276
+ override_warehouse_id: Optional[str] = None):
2277
+ """Execute a query for a published dashboard.
2278
+
2279
+ :param dashboard_name: str
2280
+ Dashboard name and revision_id is required to retrieve PublishedDatasetDataModel which contains the
2281
+ list of datasets, warehouse_id, and embedded_credentials
2282
+ :param dashboard_revision_id: str
2283
+ :param override_warehouse_id: str (optional)
2284
+ A dashboard schedule can override the warehouse used as compute for processing the published
2285
+ dashboard queries
2286
+
2287
+
2288
+ """
2289
+ body = {}
2290
+ if dashboard_name is not None: body['dashboard_name'] = dashboard_name
2291
+ if dashboard_revision_id is not None: body['dashboard_revision_id'] = dashboard_revision_id
2292
+ if override_warehouse_id is not None: body['override_warehouse_id'] = override_warehouse_id
2293
+ headers = {'Accept': 'application/json', 'Content-Type': 'application/json', }
2294
+
2295
+ self._api.do('POST', '/api/2.0/lakeview-query/query/published', body=body, headers=headers)
2296
+
2297
+ def poll_published_query_status(self,
2298
+ dashboard_name: str,
2299
+ dashboard_revision_id: str,
2300
+ *,
2301
+ tokens: Optional[List[str]] = None) -> PollQueryStatusResponse:
2302
+ """Poll the results for the a query for a published, embedded dashboard.
2303
+
2304
+ :param dashboard_name: str
2305
+ :param dashboard_revision_id: str
2306
+ :param tokens: List[str] (optional)
2307
+ Example: EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ
2308
+
2309
+ :returns: :class:`PollQueryStatusResponse`
2310
+ """
2311
+
2312
+ query = {}
2313
+ if dashboard_name is not None: query['dashboard_name'] = dashboard_name
2314
+ if dashboard_revision_id is not None: query['dashboard_revision_id'] = dashboard_revision_id
2315
+ if tokens is not None: query['tokens'] = [v for v in tokens]
2316
+ headers = {'Accept': 'application/json', }
2317
+
2318
+ res = self._api.do('GET', '/api/2.0/lakeview-query/query/published', query=query, headers=headers)
2319
+ return PollQueryStatusResponse.from_dict(res)
@@ -4915,6 +4915,10 @@ class RunTask:
4915
4915
  description: Optional[str] = None
4916
4916
  """An optional description for this task."""
4917
4917
 
4918
+ disabled: Optional[bool] = None
4919
+ """Denotes whether or not the task was disabled by the user. Disabled tasks do not execute and are
4920
+ immediately skipped as soon as they are unblocked."""
4921
+
4918
4922
  effective_performance_target: Optional[PerformanceTarget] = None
4919
4923
  """effective_performance_target is the actual performance target used by the run during execution.
4920
4924
  effective_performance_target can differ from performance_target depending on if the job was
@@ -5069,6 +5073,7 @@ class RunTask:
5069
5073
  if self.dbt_task: body['dbt_task'] = self.dbt_task.as_dict()
5070
5074
  if self.depends_on: body['depends_on'] = [v.as_dict() for v in self.depends_on]
5071
5075
  if self.description is not None: body['description'] = self.description
5076
+ if self.disabled is not None: body['disabled'] = self.disabled
5072
5077
  if self.effective_performance_target is not None:
5073
5078
  body['effective_performance_target'] = self.effective_performance_target.value
5074
5079
  if self.email_notifications: body['email_notifications'] = self.email_notifications.as_dict()
@@ -5116,6 +5121,7 @@ class RunTask:
5116
5121
  if self.dbt_task: body['dbt_task'] = self.dbt_task
5117
5122
  if self.depends_on: body['depends_on'] = self.depends_on
5118
5123
  if self.description is not None: body['description'] = self.description
5124
+ if self.disabled is not None: body['disabled'] = self.disabled
5119
5125
  if self.effective_performance_target is not None:
5120
5126
  body['effective_performance_target'] = self.effective_performance_target
5121
5127
  if self.email_notifications: body['email_notifications'] = self.email_notifications
@@ -5164,6 +5170,7 @@ class RunTask:
5164
5170
  dbt_task=_from_dict(d, 'dbt_task', DbtTask),
5165
5171
  depends_on=_repeated_dict(d, 'depends_on', TaskDependency),
5166
5172
  description=d.get('description', None),
5173
+ disabled=d.get('disabled', None),
5167
5174
  effective_performance_target=_enum(d, 'effective_performance_target', PerformanceTarget),
5168
5175
  email_notifications=_from_dict(d, 'email_notifications', JobEmailNotifications),
5169
5176
  end_time=d.get('end_time', None),