databricks-sdk 0.54.0__py3-none-any.whl → 0.56.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.
- databricks/sdk/__init__.py +304 -278
- databricks/sdk/config.py +15 -4
- databricks/sdk/credentials_provider.py +101 -55
- databricks/sdk/oauth.py +0 -5
- databricks/sdk/oidc.py +206 -0
- databricks/sdk/service/aibuilder.py +364 -0
- databricks/sdk/service/billing.py +150 -169
- databricks/sdk/service/catalog.py +263 -835
- databricks/sdk/service/cleanrooms.py +15 -10
- databricks/sdk/service/compute.py +12 -22
- databricks/sdk/service/dashboards.py +59 -451
- databricks/sdk/service/database.py +1256 -0
- databricks/sdk/service/files.py +2 -0
- databricks/sdk/service/iam.py +6 -6
- databricks/sdk/service/jobs.py +238 -0
- databricks/sdk/service/ml.py +8 -271
- databricks/sdk/service/pipelines.py +45 -1
- databricks/sdk/service/provisioning.py +0 -3
- databricks/sdk/service/qualitymonitorv2.py +275 -0
- databricks/sdk/service/serving.py +76 -4
- databricks/sdk/service/settings.py +982 -99
- databricks/sdk/service/sharing.py +3 -2
- databricks/sdk/service/sql.py +218 -1
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/RECORD +30 -26
- {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/WHEEL +1 -1
- {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.54.0.dist-info → databricks_sdk-0.56.0.dist-info}/top_level.txt +0 -0
|
@@ -102,76 +102,6 @@ class AuthorizationDetailsGrantRule:
|
|
|
102
102
|
return cls(permission_set=d.get("permission_set", None))
|
|
103
103
|
|
|
104
104
|
|
|
105
|
-
@dataclass
|
|
106
|
-
class CancelQueryExecutionResponse:
|
|
107
|
-
status: Optional[List[CancelQueryExecutionResponseStatus]] = None
|
|
108
|
-
|
|
109
|
-
def as_dict(self) -> dict:
|
|
110
|
-
"""Serializes the CancelQueryExecutionResponse into a dictionary suitable for use as a JSON request body."""
|
|
111
|
-
body = {}
|
|
112
|
-
if self.status:
|
|
113
|
-
body["status"] = [v.as_dict() for v in self.status]
|
|
114
|
-
return body
|
|
115
|
-
|
|
116
|
-
def as_shallow_dict(self) -> dict:
|
|
117
|
-
"""Serializes the CancelQueryExecutionResponse into a shallow dictionary of its immediate attributes."""
|
|
118
|
-
body = {}
|
|
119
|
-
if self.status:
|
|
120
|
-
body["status"] = self.status
|
|
121
|
-
return body
|
|
122
|
-
|
|
123
|
-
@classmethod
|
|
124
|
-
def from_dict(cls, d: Dict[str, Any]) -> CancelQueryExecutionResponse:
|
|
125
|
-
"""Deserializes the CancelQueryExecutionResponse from a dictionary."""
|
|
126
|
-
return cls(status=_repeated_dict(d, "status", CancelQueryExecutionResponseStatus))
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
@dataclass
|
|
130
|
-
class CancelQueryExecutionResponseStatus:
|
|
131
|
-
data_token: str
|
|
132
|
-
"""The token to poll for result asynchronously Example:
|
|
133
|
-
EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ"""
|
|
134
|
-
|
|
135
|
-
pending: Optional[Empty] = None
|
|
136
|
-
"""Represents an empty message, similar to google.protobuf.Empty, which is not available in the
|
|
137
|
-
firm right now."""
|
|
138
|
-
|
|
139
|
-
success: Optional[Empty] = None
|
|
140
|
-
"""Represents an empty message, similar to google.protobuf.Empty, which is not available in the
|
|
141
|
-
firm right now."""
|
|
142
|
-
|
|
143
|
-
def as_dict(self) -> dict:
|
|
144
|
-
"""Serializes the CancelQueryExecutionResponseStatus into a dictionary suitable for use as a JSON request body."""
|
|
145
|
-
body = {}
|
|
146
|
-
if self.data_token is not None:
|
|
147
|
-
body["data_token"] = self.data_token
|
|
148
|
-
if self.pending:
|
|
149
|
-
body["pending"] = self.pending.as_dict()
|
|
150
|
-
if self.success:
|
|
151
|
-
body["success"] = self.success.as_dict()
|
|
152
|
-
return body
|
|
153
|
-
|
|
154
|
-
def as_shallow_dict(self) -> dict:
|
|
155
|
-
"""Serializes the CancelQueryExecutionResponseStatus into a shallow dictionary of its immediate attributes."""
|
|
156
|
-
body = {}
|
|
157
|
-
if self.data_token is not None:
|
|
158
|
-
body["data_token"] = self.data_token
|
|
159
|
-
if self.pending:
|
|
160
|
-
body["pending"] = self.pending
|
|
161
|
-
if self.success:
|
|
162
|
-
body["success"] = self.success
|
|
163
|
-
return body
|
|
164
|
-
|
|
165
|
-
@classmethod
|
|
166
|
-
def from_dict(cls, d: Dict[str, Any]) -> CancelQueryExecutionResponseStatus:
|
|
167
|
-
"""Deserializes the CancelQueryExecutionResponseStatus from a dictionary."""
|
|
168
|
-
return cls(
|
|
169
|
-
data_token=d.get("data_token", None),
|
|
170
|
-
pending=_from_dict(d, "pending", Empty),
|
|
171
|
-
success=_from_dict(d, "success", Empty),
|
|
172
|
-
)
|
|
173
|
-
|
|
174
|
-
|
|
175
105
|
@dataclass
|
|
176
106
|
class CronSchedule:
|
|
177
107
|
quartz_cron_expression: str
|
|
@@ -359,94 +289,6 @@ class DeleteSubscriptionResponse:
|
|
|
359
289
|
return cls()
|
|
360
290
|
|
|
361
291
|
|
|
362
|
-
@dataclass
|
|
363
|
-
class Empty:
|
|
364
|
-
"""Represents an empty message, similar to google.protobuf.Empty, which is not available in the
|
|
365
|
-
firm right now."""
|
|
366
|
-
|
|
367
|
-
def as_dict(self) -> dict:
|
|
368
|
-
"""Serializes the Empty into a dictionary suitable for use as a JSON request body."""
|
|
369
|
-
body = {}
|
|
370
|
-
return body
|
|
371
|
-
|
|
372
|
-
def as_shallow_dict(self) -> dict:
|
|
373
|
-
"""Serializes the Empty into a shallow dictionary of its immediate attributes."""
|
|
374
|
-
body = {}
|
|
375
|
-
return body
|
|
376
|
-
|
|
377
|
-
@classmethod
|
|
378
|
-
def from_dict(cls, d: Dict[str, Any]) -> Empty:
|
|
379
|
-
"""Deserializes the Empty from a dictionary."""
|
|
380
|
-
return cls()
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
@dataclass
|
|
384
|
-
class ExecutePublishedDashboardQueryRequest:
|
|
385
|
-
"""Execute query request for published Dashboards. Since published dashboards have the option of
|
|
386
|
-
running as the publisher, the datasets, warehouse_id are excluded from the request and instead
|
|
387
|
-
read from the source (lakeview-config) via the additional parameters (dashboardName and
|
|
388
|
-
dashboardRevisionId)"""
|
|
389
|
-
|
|
390
|
-
dashboard_name: str
|
|
391
|
-
"""Dashboard name and revision_id is required to retrieve PublishedDatasetDataModel which contains
|
|
392
|
-
the list of datasets, warehouse_id, and embedded_credentials"""
|
|
393
|
-
|
|
394
|
-
dashboard_revision_id: str
|
|
395
|
-
|
|
396
|
-
override_warehouse_id: Optional[str] = None
|
|
397
|
-
"""A dashboard schedule can override the warehouse used as compute for processing the published
|
|
398
|
-
dashboard queries"""
|
|
399
|
-
|
|
400
|
-
def as_dict(self) -> dict:
|
|
401
|
-
"""Serializes the ExecutePublishedDashboardQueryRequest into a dictionary suitable for use as a JSON request body."""
|
|
402
|
-
body = {}
|
|
403
|
-
if self.dashboard_name is not None:
|
|
404
|
-
body["dashboard_name"] = self.dashboard_name
|
|
405
|
-
if self.dashboard_revision_id is not None:
|
|
406
|
-
body["dashboard_revision_id"] = self.dashboard_revision_id
|
|
407
|
-
if self.override_warehouse_id is not None:
|
|
408
|
-
body["override_warehouse_id"] = self.override_warehouse_id
|
|
409
|
-
return body
|
|
410
|
-
|
|
411
|
-
def as_shallow_dict(self) -> dict:
|
|
412
|
-
"""Serializes the ExecutePublishedDashboardQueryRequest into a shallow dictionary of its immediate attributes."""
|
|
413
|
-
body = {}
|
|
414
|
-
if self.dashboard_name is not None:
|
|
415
|
-
body["dashboard_name"] = self.dashboard_name
|
|
416
|
-
if self.dashboard_revision_id is not None:
|
|
417
|
-
body["dashboard_revision_id"] = self.dashboard_revision_id
|
|
418
|
-
if self.override_warehouse_id is not None:
|
|
419
|
-
body["override_warehouse_id"] = self.override_warehouse_id
|
|
420
|
-
return body
|
|
421
|
-
|
|
422
|
-
@classmethod
|
|
423
|
-
def from_dict(cls, d: Dict[str, Any]) -> ExecutePublishedDashboardQueryRequest:
|
|
424
|
-
"""Deserializes the ExecutePublishedDashboardQueryRequest from a dictionary."""
|
|
425
|
-
return cls(
|
|
426
|
-
dashboard_name=d.get("dashboard_name", None),
|
|
427
|
-
dashboard_revision_id=d.get("dashboard_revision_id", None),
|
|
428
|
-
override_warehouse_id=d.get("override_warehouse_id", None),
|
|
429
|
-
)
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
@dataclass
|
|
433
|
-
class ExecuteQueryResponse:
|
|
434
|
-
def as_dict(self) -> dict:
|
|
435
|
-
"""Serializes the ExecuteQueryResponse into a dictionary suitable for use as a JSON request body."""
|
|
436
|
-
body = {}
|
|
437
|
-
return body
|
|
438
|
-
|
|
439
|
-
def as_shallow_dict(self) -> dict:
|
|
440
|
-
"""Serializes the ExecuteQueryResponse into a shallow dictionary of its immediate attributes."""
|
|
441
|
-
body = {}
|
|
442
|
-
return body
|
|
443
|
-
|
|
444
|
-
@classmethod
|
|
445
|
-
def from_dict(cls, d: Dict[str, Any]) -> ExecuteQueryResponse:
|
|
446
|
-
"""Deserializes the ExecuteQueryResponse from a dictionary."""
|
|
447
|
-
return cls()
|
|
448
|
-
|
|
449
|
-
|
|
450
292
|
@dataclass
|
|
451
293
|
class GenieAttachment:
|
|
452
294
|
"""Genie AI Response"""
|
|
@@ -687,6 +529,38 @@ class GenieGetMessageQueryResultResponse:
|
|
|
687
529
|
return cls(statement_response=_from_dict(d, "statement_response", sql.StatementResponse))
|
|
688
530
|
|
|
689
531
|
|
|
532
|
+
@dataclass
|
|
533
|
+
class GenieListSpacesResponse:
|
|
534
|
+
next_page_token: Optional[str] = None
|
|
535
|
+
"""Token to get the next page of results"""
|
|
536
|
+
|
|
537
|
+
spaces: Optional[List[GenieSpace]] = None
|
|
538
|
+
"""List of Genie spaces"""
|
|
539
|
+
|
|
540
|
+
def as_dict(self) -> dict:
|
|
541
|
+
"""Serializes the GenieListSpacesResponse into a dictionary suitable for use as a JSON request body."""
|
|
542
|
+
body = {}
|
|
543
|
+
if self.next_page_token is not None:
|
|
544
|
+
body["next_page_token"] = self.next_page_token
|
|
545
|
+
if self.spaces:
|
|
546
|
+
body["spaces"] = [v.as_dict() for v in self.spaces]
|
|
547
|
+
return body
|
|
548
|
+
|
|
549
|
+
def as_shallow_dict(self) -> dict:
|
|
550
|
+
"""Serializes the GenieListSpacesResponse into a shallow dictionary of its immediate attributes."""
|
|
551
|
+
body = {}
|
|
552
|
+
if self.next_page_token is not None:
|
|
553
|
+
body["next_page_token"] = self.next_page_token
|
|
554
|
+
if self.spaces:
|
|
555
|
+
body["spaces"] = self.spaces
|
|
556
|
+
return body
|
|
557
|
+
|
|
558
|
+
@classmethod
|
|
559
|
+
def from_dict(cls, d: Dict[str, Any]) -> GenieListSpacesResponse:
|
|
560
|
+
"""Deserializes the GenieListSpacesResponse from a dictionary."""
|
|
561
|
+
return cls(next_page_token=d.get("next_page_token", None), spaces=_repeated_dict(d, "spaces", GenieSpace))
|
|
562
|
+
|
|
563
|
+
|
|
690
564
|
@dataclass
|
|
691
565
|
class GenieMessage:
|
|
692
566
|
id: str
|
|
@@ -1043,24 +917,6 @@ class GenieStartConversationResponse:
|
|
|
1043
917
|
)
|
|
1044
918
|
|
|
1045
919
|
|
|
1046
|
-
@dataclass
|
|
1047
|
-
class GetPublishedDashboardEmbeddedResponse:
|
|
1048
|
-
def as_dict(self) -> dict:
|
|
1049
|
-
"""Serializes the GetPublishedDashboardEmbeddedResponse into a dictionary suitable for use as a JSON request body."""
|
|
1050
|
-
body = {}
|
|
1051
|
-
return body
|
|
1052
|
-
|
|
1053
|
-
def as_shallow_dict(self) -> dict:
|
|
1054
|
-
"""Serializes the GetPublishedDashboardEmbeddedResponse into a shallow dictionary of its immediate attributes."""
|
|
1055
|
-
body = {}
|
|
1056
|
-
return body
|
|
1057
|
-
|
|
1058
|
-
@classmethod
|
|
1059
|
-
def from_dict(cls, d: Dict[str, Any]) -> GetPublishedDashboardEmbeddedResponse:
|
|
1060
|
-
"""Deserializes the GetPublishedDashboardEmbeddedResponse from a dictionary."""
|
|
1061
|
-
return cls()
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
920
|
@dataclass
|
|
1065
921
|
class GetPublishedDashboardTokenInfoResponse:
|
|
1066
922
|
authorization_details: Optional[List[AuthorizationDetails]] = None
|
|
@@ -1381,80 +1237,6 @@ class MigrateDashboardRequest:
|
|
|
1381
1237
|
)
|
|
1382
1238
|
|
|
1383
1239
|
|
|
1384
|
-
@dataclass
|
|
1385
|
-
class PendingStatus:
|
|
1386
|
-
data_token: str
|
|
1387
|
-
"""The token to poll for result asynchronously Example:
|
|
1388
|
-
EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ"""
|
|
1389
|
-
|
|
1390
|
-
def as_dict(self) -> dict:
|
|
1391
|
-
"""Serializes the PendingStatus into a dictionary suitable for use as a JSON request body."""
|
|
1392
|
-
body = {}
|
|
1393
|
-
if self.data_token is not None:
|
|
1394
|
-
body["data_token"] = self.data_token
|
|
1395
|
-
return body
|
|
1396
|
-
|
|
1397
|
-
def as_shallow_dict(self) -> dict:
|
|
1398
|
-
"""Serializes the PendingStatus into a shallow dictionary of its immediate attributes."""
|
|
1399
|
-
body = {}
|
|
1400
|
-
if self.data_token is not None:
|
|
1401
|
-
body["data_token"] = self.data_token
|
|
1402
|
-
return body
|
|
1403
|
-
|
|
1404
|
-
@classmethod
|
|
1405
|
-
def from_dict(cls, d: Dict[str, Any]) -> PendingStatus:
|
|
1406
|
-
"""Deserializes the PendingStatus from a dictionary."""
|
|
1407
|
-
return cls(data_token=d.get("data_token", None))
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
@dataclass
|
|
1411
|
-
class PollQueryStatusResponse:
|
|
1412
|
-
data: Optional[List[PollQueryStatusResponseData]] = None
|
|
1413
|
-
|
|
1414
|
-
def as_dict(self) -> dict:
|
|
1415
|
-
"""Serializes the PollQueryStatusResponse into a dictionary suitable for use as a JSON request body."""
|
|
1416
|
-
body = {}
|
|
1417
|
-
if self.data:
|
|
1418
|
-
body["data"] = [v.as_dict() for v in self.data]
|
|
1419
|
-
return body
|
|
1420
|
-
|
|
1421
|
-
def as_shallow_dict(self) -> dict:
|
|
1422
|
-
"""Serializes the PollQueryStatusResponse into a shallow dictionary of its immediate attributes."""
|
|
1423
|
-
body = {}
|
|
1424
|
-
if self.data:
|
|
1425
|
-
body["data"] = self.data
|
|
1426
|
-
return body
|
|
1427
|
-
|
|
1428
|
-
@classmethod
|
|
1429
|
-
def from_dict(cls, d: Dict[str, Any]) -> PollQueryStatusResponse:
|
|
1430
|
-
"""Deserializes the PollQueryStatusResponse from a dictionary."""
|
|
1431
|
-
return cls(data=_repeated_dict(d, "data", PollQueryStatusResponseData))
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
@dataclass
|
|
1435
|
-
class PollQueryStatusResponseData:
|
|
1436
|
-
status: QueryResponseStatus
|
|
1437
|
-
|
|
1438
|
-
def as_dict(self) -> dict:
|
|
1439
|
-
"""Serializes the PollQueryStatusResponseData into a dictionary suitable for use as a JSON request body."""
|
|
1440
|
-
body = {}
|
|
1441
|
-
if self.status:
|
|
1442
|
-
body["status"] = self.status.as_dict()
|
|
1443
|
-
return body
|
|
1444
|
-
|
|
1445
|
-
def as_shallow_dict(self) -> dict:
|
|
1446
|
-
"""Serializes the PollQueryStatusResponseData into a shallow dictionary of its immediate attributes."""
|
|
1447
|
-
body = {}
|
|
1448
|
-
if self.status:
|
|
1449
|
-
body["status"] = self.status
|
|
1450
|
-
return body
|
|
1451
|
-
|
|
1452
|
-
@classmethod
|
|
1453
|
-
def from_dict(cls, d: Dict[str, Any]) -> PollQueryStatusResponseData:
|
|
1454
|
-
"""Deserializes the PollQueryStatusResponseData from a dictionary."""
|
|
1455
|
-
return cls(status=_from_dict(d, "status", QueryResponseStatus))
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
1240
|
@dataclass
|
|
1459
1241
|
class PublishRequest:
|
|
1460
1242
|
dashboard_id: Optional[str] = None
|
|
@@ -1550,67 +1332,6 @@ class PublishedDashboard:
|
|
|
1550
1332
|
)
|
|
1551
1333
|
|
|
1552
1334
|
|
|
1553
|
-
@dataclass
|
|
1554
|
-
class QueryResponseStatus:
|
|
1555
|
-
canceled: Optional[Empty] = None
|
|
1556
|
-
"""Represents an empty message, similar to google.protobuf.Empty, which is not available in the
|
|
1557
|
-
firm right now."""
|
|
1558
|
-
|
|
1559
|
-
closed: Optional[Empty] = None
|
|
1560
|
-
"""Represents an empty message, similar to google.protobuf.Empty, which is not available in the
|
|
1561
|
-
firm right now."""
|
|
1562
|
-
|
|
1563
|
-
pending: Optional[PendingStatus] = None
|
|
1564
|
-
|
|
1565
|
-
statement_id: Optional[str] = None
|
|
1566
|
-
"""The statement id in format(01eef5da-c56e-1f36-bafa-21906587d6ba) The statement_id should be
|
|
1567
|
-
identical to data_token in SuccessStatus and PendingStatus. This field is created for audit
|
|
1568
|
-
logging purpose to record the statement_id of all QueryResponseStatus."""
|
|
1569
|
-
|
|
1570
|
-
success: Optional[SuccessStatus] = None
|
|
1571
|
-
|
|
1572
|
-
def as_dict(self) -> dict:
|
|
1573
|
-
"""Serializes the QueryResponseStatus into a dictionary suitable for use as a JSON request body."""
|
|
1574
|
-
body = {}
|
|
1575
|
-
if self.canceled:
|
|
1576
|
-
body["canceled"] = self.canceled.as_dict()
|
|
1577
|
-
if self.closed:
|
|
1578
|
-
body["closed"] = self.closed.as_dict()
|
|
1579
|
-
if self.pending:
|
|
1580
|
-
body["pending"] = self.pending.as_dict()
|
|
1581
|
-
if self.statement_id is not None:
|
|
1582
|
-
body["statement_id"] = self.statement_id
|
|
1583
|
-
if self.success:
|
|
1584
|
-
body["success"] = self.success.as_dict()
|
|
1585
|
-
return body
|
|
1586
|
-
|
|
1587
|
-
def as_shallow_dict(self) -> dict:
|
|
1588
|
-
"""Serializes the QueryResponseStatus into a shallow dictionary of its immediate attributes."""
|
|
1589
|
-
body = {}
|
|
1590
|
-
if self.canceled:
|
|
1591
|
-
body["canceled"] = self.canceled
|
|
1592
|
-
if self.closed:
|
|
1593
|
-
body["closed"] = self.closed
|
|
1594
|
-
if self.pending:
|
|
1595
|
-
body["pending"] = self.pending
|
|
1596
|
-
if self.statement_id is not None:
|
|
1597
|
-
body["statement_id"] = self.statement_id
|
|
1598
|
-
if self.success:
|
|
1599
|
-
body["success"] = self.success
|
|
1600
|
-
return body
|
|
1601
|
-
|
|
1602
|
-
@classmethod
|
|
1603
|
-
def from_dict(cls, d: Dict[str, Any]) -> QueryResponseStatus:
|
|
1604
|
-
"""Deserializes the QueryResponseStatus from a dictionary."""
|
|
1605
|
-
return cls(
|
|
1606
|
-
canceled=_from_dict(d, "canceled", Empty),
|
|
1607
|
-
closed=_from_dict(d, "closed", Empty),
|
|
1608
|
-
pending=_from_dict(d, "pending", PendingStatus),
|
|
1609
|
-
statement_id=d.get("statement_id", None),
|
|
1610
|
-
success=_from_dict(d, "success", SuccessStatus),
|
|
1611
|
-
)
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
1335
|
@dataclass
|
|
1615
1336
|
class Result:
|
|
1616
1337
|
is_truncated: Optional[bool] = None
|
|
@@ -1926,39 +1647,6 @@ class SubscriptionSubscriberUser:
|
|
|
1926
1647
|
return cls(user_id=d.get("user_id", None))
|
|
1927
1648
|
|
|
1928
1649
|
|
|
1929
|
-
@dataclass
|
|
1930
|
-
class SuccessStatus:
|
|
1931
|
-
data_token: str
|
|
1932
|
-
"""The token to poll for result asynchronously Example:
|
|
1933
|
-
EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ"""
|
|
1934
|
-
|
|
1935
|
-
truncated: Optional[bool] = None
|
|
1936
|
-
"""Whether the query result is truncated (either by byte limit or row limit)"""
|
|
1937
|
-
|
|
1938
|
-
def as_dict(self) -> dict:
|
|
1939
|
-
"""Serializes the SuccessStatus into a dictionary suitable for use as a JSON request body."""
|
|
1940
|
-
body = {}
|
|
1941
|
-
if self.data_token is not None:
|
|
1942
|
-
body["data_token"] = self.data_token
|
|
1943
|
-
if self.truncated is not None:
|
|
1944
|
-
body["truncated"] = self.truncated
|
|
1945
|
-
return body
|
|
1946
|
-
|
|
1947
|
-
def as_shallow_dict(self) -> dict:
|
|
1948
|
-
"""Serializes the SuccessStatus into a shallow dictionary of its immediate attributes."""
|
|
1949
|
-
body = {}
|
|
1950
|
-
if self.data_token is not None:
|
|
1951
|
-
body["data_token"] = self.data_token
|
|
1952
|
-
if self.truncated is not None:
|
|
1953
|
-
body["truncated"] = self.truncated
|
|
1954
|
-
return body
|
|
1955
|
-
|
|
1956
|
-
@classmethod
|
|
1957
|
-
def from_dict(cls, d: Dict[str, Any]) -> SuccessStatus:
|
|
1958
|
-
"""Deserializes the SuccessStatus from a dictionary."""
|
|
1959
|
-
return cls(data_token=d.get("data_token", None), truncated=d.get("truncated", None))
|
|
1960
|
-
|
|
1961
|
-
|
|
1962
1650
|
@dataclass
|
|
1963
1651
|
class TextAttachment:
|
|
1964
1652
|
content: Optional[str] = None
|
|
@@ -2382,6 +2070,33 @@ class GenieAPI:
|
|
|
2382
2070
|
res = self._api.do("GET", f"/api/2.0/genie/spaces/{space_id}", headers=headers)
|
|
2383
2071
|
return GenieSpace.from_dict(res)
|
|
2384
2072
|
|
|
2073
|
+
def list_spaces(
|
|
2074
|
+
self, *, page_size: Optional[int] = None, page_token: Optional[str] = None
|
|
2075
|
+
) -> GenieListSpacesResponse:
|
|
2076
|
+
"""List Genie spaces.
|
|
2077
|
+
|
|
2078
|
+
Get list of Genie Spaces.
|
|
2079
|
+
|
|
2080
|
+
:param page_size: int (optional)
|
|
2081
|
+
Maximum number of spaces to return per page
|
|
2082
|
+
:param page_token: str (optional)
|
|
2083
|
+
Pagination token for getting the next page of results
|
|
2084
|
+
|
|
2085
|
+
:returns: :class:`GenieListSpacesResponse`
|
|
2086
|
+
"""
|
|
2087
|
+
|
|
2088
|
+
query = {}
|
|
2089
|
+
if page_size is not None:
|
|
2090
|
+
query["page_size"] = page_size
|
|
2091
|
+
if page_token is not None:
|
|
2092
|
+
query["page_token"] = page_token
|
|
2093
|
+
headers = {
|
|
2094
|
+
"Accept": "application/json",
|
|
2095
|
+
}
|
|
2096
|
+
|
|
2097
|
+
res = self._api.do("GET", "/api/2.0/genie/spaces", query=query, headers=headers)
|
|
2098
|
+
return GenieListSpacesResponse.from_dict(res)
|
|
2099
|
+
|
|
2385
2100
|
def start_conversation(self, space_id: str, content: str) -> Wait[GenieMessage]:
|
|
2386
2101
|
"""Start conversation.
|
|
2387
2102
|
|
|
@@ -2904,23 +2619,6 @@ class LakeviewEmbeddedAPI:
|
|
|
2904
2619
|
def __init__(self, api_client):
|
|
2905
2620
|
self._api = api_client
|
|
2906
2621
|
|
|
2907
|
-
def get_published_dashboard_embedded(self, dashboard_id: str):
|
|
2908
|
-
"""Read a published dashboard in an embedded ui.
|
|
2909
|
-
|
|
2910
|
-
Get the current published dashboard within an embedded context.
|
|
2911
|
-
|
|
2912
|
-
:param dashboard_id: str
|
|
2913
|
-
UUID identifying the published dashboard.
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
"""
|
|
2917
|
-
|
|
2918
|
-
headers = {
|
|
2919
|
-
"Accept": "application/json",
|
|
2920
|
-
}
|
|
2921
|
-
|
|
2922
|
-
self._api.do("GET", f"/api/2.0/lakeview/dashboards/{dashboard_id}/published/embedded", headers=headers)
|
|
2923
|
-
|
|
2924
2622
|
def get_published_dashboard_token_info(
|
|
2925
2623
|
self, dashboard_id: str, *, external_value: Optional[str] = None, external_viewer_id: Optional[str] = None
|
|
2926
2624
|
) -> GetPublishedDashboardTokenInfoResponse:
|
|
@@ -2956,93 +2654,3 @@ class LakeviewEmbeddedAPI:
|
|
|
2956
2654
|
"GET", f"/api/2.0/lakeview/dashboards/{dashboard_id}/published/tokeninfo", query=query, headers=headers
|
|
2957
2655
|
)
|
|
2958
2656
|
return GetPublishedDashboardTokenInfoResponse.from_dict(res)
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
class QueryExecutionAPI:
|
|
2962
|
-
"""Query execution APIs for AI / BI Dashboards"""
|
|
2963
|
-
|
|
2964
|
-
def __init__(self, api_client):
|
|
2965
|
-
self._api = api_client
|
|
2966
|
-
|
|
2967
|
-
def cancel_published_query_execution(
|
|
2968
|
-
self, dashboard_name: str, dashboard_revision_id: str, *, tokens: Optional[List[str]] = None
|
|
2969
|
-
) -> CancelQueryExecutionResponse:
|
|
2970
|
-
"""Cancel the results for the a query for a published, embedded dashboard.
|
|
2971
|
-
|
|
2972
|
-
:param dashboard_name: str
|
|
2973
|
-
:param dashboard_revision_id: str
|
|
2974
|
-
:param tokens: List[str] (optional)
|
|
2975
|
-
Example: EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ
|
|
2976
|
-
|
|
2977
|
-
:returns: :class:`CancelQueryExecutionResponse`
|
|
2978
|
-
"""
|
|
2979
|
-
|
|
2980
|
-
query = {}
|
|
2981
|
-
if dashboard_name is not None:
|
|
2982
|
-
query["dashboard_name"] = dashboard_name
|
|
2983
|
-
if dashboard_revision_id is not None:
|
|
2984
|
-
query["dashboard_revision_id"] = dashboard_revision_id
|
|
2985
|
-
if tokens is not None:
|
|
2986
|
-
query["tokens"] = [v for v in tokens]
|
|
2987
|
-
headers = {
|
|
2988
|
-
"Accept": "application/json",
|
|
2989
|
-
}
|
|
2990
|
-
|
|
2991
|
-
res = self._api.do("DELETE", "/api/2.0/lakeview-query/query/published", query=query, headers=headers)
|
|
2992
|
-
return CancelQueryExecutionResponse.from_dict(res)
|
|
2993
|
-
|
|
2994
|
-
def execute_published_dashboard_query(
|
|
2995
|
-
self, dashboard_name: str, dashboard_revision_id: str, *, override_warehouse_id: Optional[str] = None
|
|
2996
|
-
):
|
|
2997
|
-
"""Execute a query for a published dashboard.
|
|
2998
|
-
|
|
2999
|
-
:param dashboard_name: str
|
|
3000
|
-
Dashboard name and revision_id is required to retrieve PublishedDatasetDataModel which contains the
|
|
3001
|
-
list of datasets, warehouse_id, and embedded_credentials
|
|
3002
|
-
:param dashboard_revision_id: str
|
|
3003
|
-
:param override_warehouse_id: str (optional)
|
|
3004
|
-
A dashboard schedule can override the warehouse used as compute for processing the published
|
|
3005
|
-
dashboard queries
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
"""
|
|
3009
|
-
body = {}
|
|
3010
|
-
if dashboard_name is not None:
|
|
3011
|
-
body["dashboard_name"] = dashboard_name
|
|
3012
|
-
if dashboard_revision_id is not None:
|
|
3013
|
-
body["dashboard_revision_id"] = dashboard_revision_id
|
|
3014
|
-
if override_warehouse_id is not None:
|
|
3015
|
-
body["override_warehouse_id"] = override_warehouse_id
|
|
3016
|
-
headers = {
|
|
3017
|
-
"Accept": "application/json",
|
|
3018
|
-
"Content-Type": "application/json",
|
|
3019
|
-
}
|
|
3020
|
-
|
|
3021
|
-
self._api.do("POST", "/api/2.0/lakeview-query/query/published", body=body, headers=headers)
|
|
3022
|
-
|
|
3023
|
-
def poll_published_query_status(
|
|
3024
|
-
self, dashboard_name: str, dashboard_revision_id: str, *, tokens: Optional[List[str]] = None
|
|
3025
|
-
) -> PollQueryStatusResponse:
|
|
3026
|
-
"""Poll the results for the a query for a published, embedded dashboard.
|
|
3027
|
-
|
|
3028
|
-
:param dashboard_name: str
|
|
3029
|
-
:param dashboard_revision_id: str
|
|
3030
|
-
:param tokens: List[str] (optional)
|
|
3031
|
-
Example: EC0A..ChAB7WCEn_4Qo4vkLqEbXsxxEgh3Y2pbWw45WhoQXgZSQo9aS5q2ZvFcbvbx9CgA-PAEAQ
|
|
3032
|
-
|
|
3033
|
-
:returns: :class:`PollQueryStatusResponse`
|
|
3034
|
-
"""
|
|
3035
|
-
|
|
3036
|
-
query = {}
|
|
3037
|
-
if dashboard_name is not None:
|
|
3038
|
-
query["dashboard_name"] = dashboard_name
|
|
3039
|
-
if dashboard_revision_id is not None:
|
|
3040
|
-
query["dashboard_revision_id"] = dashboard_revision_id
|
|
3041
|
-
if tokens is not None:
|
|
3042
|
-
query["tokens"] = [v for v in tokens]
|
|
3043
|
-
headers = {
|
|
3044
|
-
"Accept": "application/json",
|
|
3045
|
-
}
|
|
3046
|
-
|
|
3047
|
-
res = self._api.do("GET", "/api/2.0/lakeview-query/query/published", query=query, headers=headers)
|
|
3048
|
-
return PollQueryStatusResponse.from_dict(res)
|