databricks-sdk 0.69.0__py3-none-any.whl → 0.71.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 +24 -24
- databricks/sdk/dbutils.py +17 -0
- databricks/sdk/mixins/files.py +10 -10
- databricks/sdk/service/agentbricks.py +2 -0
- databricks/sdk/service/apps.py +10 -0
- databricks/sdk/service/billing.py +13 -3
- databricks/sdk/service/catalog.py +131 -47
- databricks/sdk/service/cleanrooms.py +11 -3
- databricks/sdk/service/compute.py +64 -0
- databricks/sdk/service/dashboards.py +10 -0
- databricks/sdk/service/database.py +12 -0
- databricks/sdk/service/dataquality.py +201 -52
- databricks/sdk/service/files.py +7 -72
- databricks/sdk/service/iam.py +26 -36
- databricks/sdk/service/iamv2.py +6 -0
- databricks/sdk/service/jobs.py +86 -154
- databricks/sdk/service/marketplace.py +18 -0
- databricks/sdk/service/ml.py +464 -13
- databricks/sdk/service/oauth2.py +37 -19
- databricks/sdk/service/pipelines.py +25 -2
- databricks/sdk/service/provisioning.py +19 -1
- databricks/sdk/service/qualitymonitorv2.py +2 -0
- databricks/sdk/service/serving.py +16 -21
- databricks/sdk/service/settings.py +45 -72
- databricks/sdk/service/settingsv2.py +2 -0
- databricks/sdk/service/sharing.py +23 -69
- databricks/sdk/service/sql.py +85 -62
- databricks/sdk/service/tags.py +2 -0
- databricks/sdk/service/vectorsearch.py +8 -0
- databricks/sdk/service/workspace.py +18 -91
- databricks/sdk/version.py +1 -1
- {databricks_sdk-0.69.0.dist-info → databricks_sdk-0.71.0.dist-info}/METADATA +1 -1
- {databricks_sdk-0.69.0.dist-info → databricks_sdk-0.71.0.dist-info}/RECORD +37 -37
- {databricks_sdk-0.69.0.dist-info → databricks_sdk-0.71.0.dist-info}/WHEEL +0 -0
- {databricks_sdk-0.69.0.dist-info → databricks_sdk-0.71.0.dist-info}/licenses/LICENSE +0 -0
- {databricks_sdk-0.69.0.dist-info → databricks_sdk-0.71.0.dist-info}/licenses/NOTICE +0 -0
- {databricks_sdk-0.69.0.dist-info → databricks_sdk-0.71.0.dist-info}/top_level.txt +0 -0
|
@@ -163,7 +163,7 @@ class DataProfilingConfig:
|
|
|
163
163
|
"""The warehouse for dashboard creation"""
|
|
164
164
|
|
|
165
165
|
inference_log: Optional[InferenceLogConfig] = None
|
|
166
|
-
"""Configuration for monitoring inference log tables."""
|
|
166
|
+
"""`Analysis Configuration` for monitoring inference log tables."""
|
|
167
167
|
|
|
168
168
|
latest_monitor_failure_message: Optional[str] = None
|
|
169
169
|
"""The latest error message for a monitor failure."""
|
|
@@ -196,13 +196,13 @@ class DataProfilingConfig:
|
|
|
196
196
|
high-cardinality columns, only the top 100 unique values by frequency will generate slices."""
|
|
197
197
|
|
|
198
198
|
snapshot: Optional[SnapshotConfig] = None
|
|
199
|
-
"""Configuration for monitoring snapshot tables."""
|
|
199
|
+
"""`Analysis Configuration` for monitoring snapshot tables."""
|
|
200
200
|
|
|
201
201
|
status: Optional[DataProfilingStatus] = None
|
|
202
202
|
"""The data profiling monitor status."""
|
|
203
203
|
|
|
204
204
|
time_series: Optional[TimeSeriesConfig] = None
|
|
205
|
-
"""Configuration for monitoring time series tables."""
|
|
205
|
+
"""`Analysis Configuration` for monitoring time series tables."""
|
|
206
206
|
|
|
207
207
|
warehouse_id: Optional[str] = None
|
|
208
208
|
"""Optional argument to specify the warehouse for dashboard creation. If not specified, the first
|
|
@@ -556,13 +556,24 @@ class Monitor:
|
|
|
556
556
|
"""The type of the monitored object. Can be one of the following: `schema` or `table`."""
|
|
557
557
|
|
|
558
558
|
object_id: str
|
|
559
|
-
"""The UUID of the request object.
|
|
559
|
+
"""The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
560
|
+
|
|
561
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
562
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
563
|
+
|
|
564
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
565
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
566
|
+
|
|
567
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
568
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
569
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id"""
|
|
560
570
|
|
|
561
571
|
anomaly_detection_config: Optional[AnomalyDetectionConfig] = None
|
|
562
572
|
"""Anomaly Detection Configuration, applicable to `schema` object types."""
|
|
563
573
|
|
|
564
574
|
data_profiling_config: Optional[DataProfilingConfig] = None
|
|
565
|
-
"""Data Profiling Configuration, applicable to `table` object types
|
|
575
|
+
"""Data Profiling Configuration, applicable to `table` object types. Exactly one `Analysis
|
|
576
|
+
Configuration` must be present."""
|
|
566
577
|
|
|
567
578
|
def as_dict(self) -> dict:
|
|
568
579
|
"""Serializes the Monitor into a dictionary suitable for use as a JSON request body."""
|
|
@@ -664,7 +675,17 @@ class Refresh:
|
|
|
664
675
|
"""The type of the monitored object. Can be one of the following: `schema`or `table`."""
|
|
665
676
|
|
|
666
677
|
object_id: str
|
|
667
|
-
"""The UUID of the request object.
|
|
678
|
+
"""The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
679
|
+
|
|
680
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
681
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
682
|
+
|
|
683
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
684
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
685
|
+
|
|
686
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
687
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
688
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id"""
|
|
668
689
|
|
|
669
690
|
end_time_ms: Optional[int] = None
|
|
670
691
|
"""Time when the refresh ended (milliseconds since 1/1/1970 UTC)."""
|
|
@@ -826,12 +847,28 @@ class DataQualityAPI:
|
|
|
826
847
|
self._api = api_client
|
|
827
848
|
|
|
828
849
|
def cancel_refresh(self, object_type: str, object_id: str, refresh_id: int) -> CancelRefreshResponse:
|
|
829
|
-
"""Cancels a data quality monitor refresh. Currently only supported for the `table` `object_type`.
|
|
850
|
+
"""Cancels a data quality monitor refresh. Currently only supported for the `table` `object_type`. The
|
|
851
|
+
call must be made in the same workspace as where the monitor was created.
|
|
852
|
+
|
|
853
|
+
The caller must have either of the following sets of permissions: 1. **MANAGE** and **USE_CATALOG** on
|
|
854
|
+
the table's parent catalog. 2. **USE_CATALOG** on the table's parent catalog, and **MANAGE** and
|
|
855
|
+
**USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the table's parent catalog,
|
|
856
|
+
**USE_SCHEMA** on the table's parent schema, and **MANAGE** on the table.
|
|
830
857
|
|
|
831
858
|
:param object_type: str
|
|
832
859
|
The type of the monitored object. Can be one of the following: `schema` or `table`.
|
|
833
860
|
:param object_id: str
|
|
834
|
-
The UUID of the request object.
|
|
861
|
+
The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
862
|
+
|
|
863
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
864
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
865
|
+
|
|
866
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
867
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
868
|
+
|
|
869
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
870
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
871
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
|
|
835
872
|
:param refresh_id: int
|
|
836
873
|
Unique id of the refresh operation.
|
|
837
874
|
|
|
@@ -854,19 +891,25 @@ class DataQualityAPI:
|
|
|
854
891
|
"""Create a data quality monitor on a Unity Catalog object. The caller must provide either
|
|
855
892
|
`anomaly_detection_config` for a schema monitor or `data_profiling_config` for a table monitor.
|
|
856
893
|
|
|
857
|
-
For the `table` `object_type`, the caller must either
|
|
858
|
-
|
|
859
|
-
**
|
|
860
|
-
**
|
|
861
|
-
parent catalog
|
|
894
|
+
For the `table` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
895
|
+
**MANAGE** and **USE_CATALOG** on the table's parent catalog, **USE_SCHEMA** on the table's parent
|
|
896
|
+
schema, and **SELECT** on the table 2. **USE_CATALOG** on the table's parent catalog, **MANAGE** and
|
|
897
|
+
**USE_SCHEMA** on the table's parent schema, and **SELECT** on the table. 3. **USE_CATALOG** on the
|
|
898
|
+
table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **MANAGE** and **SELECT** on
|
|
899
|
+
the table.
|
|
862
900
|
|
|
863
901
|
Workspace assets, such as the dashboard, will be created in the workspace where this call was made.
|
|
864
902
|
|
|
903
|
+
For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
904
|
+
**MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
|
|
905
|
+
parent catalog, and **MANAGE** and **USE_SCHEMA** on the schema.
|
|
906
|
+
|
|
865
907
|
:param monitor: :class:`Monitor`
|
|
866
908
|
The monitor to create.
|
|
867
909
|
|
|
868
910
|
:returns: :class:`Monitor`
|
|
869
911
|
"""
|
|
912
|
+
|
|
870
913
|
body = monitor.as_dict()
|
|
871
914
|
headers = {
|
|
872
915
|
"Accept": "application/json",
|
|
@@ -877,22 +920,34 @@ class DataQualityAPI:
|
|
|
877
920
|
return Monitor.from_dict(res)
|
|
878
921
|
|
|
879
922
|
def create_refresh(self, object_type: str, object_id: str, refresh: Refresh) -> Refresh:
|
|
880
|
-
"""Creates a refresh. Currently only supported for the `table` `object_type`.
|
|
923
|
+
"""Creates a refresh. Currently only supported for the `table` `object_type`. The call must be made in
|
|
924
|
+
the same workspace as where the monitor was created.
|
|
881
925
|
|
|
882
|
-
The caller must either
|
|
883
|
-
table's parent catalog
|
|
884
|
-
|
|
885
|
-
|
|
926
|
+
The caller must have either of the following sets of permissions: 1. **MANAGE** and **USE_CATALOG** on
|
|
927
|
+
the table's parent catalog. 2. **USE_CATALOG** on the table's parent catalog, and **MANAGE** and
|
|
928
|
+
**USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the table's parent catalog,
|
|
929
|
+
**USE_SCHEMA** on the table's parent schema, and **MANAGE** on the table.
|
|
886
930
|
|
|
887
931
|
:param object_type: str
|
|
888
932
|
The type of the monitored object. Can be one of the following: `schema`or `table`.
|
|
889
933
|
:param object_id: str
|
|
890
|
-
The UUID of the request object.
|
|
934
|
+
The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
935
|
+
|
|
936
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
937
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
938
|
+
|
|
939
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
940
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
941
|
+
|
|
942
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
943
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
944
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
|
|
891
945
|
:param refresh: :class:`Refresh`
|
|
892
946
|
The refresh to create
|
|
893
947
|
|
|
894
948
|
:returns: :class:`Refresh`
|
|
895
949
|
"""
|
|
950
|
+
|
|
896
951
|
body = refresh.as_dict()
|
|
897
952
|
headers = {
|
|
898
953
|
"Accept": "application/json",
|
|
@@ -907,18 +962,32 @@ class DataQualityAPI:
|
|
|
907
962
|
def delete_monitor(self, object_type: str, object_id: str):
|
|
908
963
|
"""Delete a data quality monitor on Unity Catalog object.
|
|
909
964
|
|
|
910
|
-
For the `table` `object_type`, the caller must either
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
the table's parent schema
|
|
965
|
+
For the `table` `object_type`, the caller must have either of the following sets of permissions:
|
|
966
|
+
**MANAGE** and **USE_CATALOG** on the table's parent catalog. **USE_CATALOG** on the table's parent
|
|
967
|
+
catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. **USE_CATALOG** on the
|
|
968
|
+
table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **MANAGE** on the table.
|
|
914
969
|
|
|
915
970
|
Note that the metric tables and dashboard will not be deleted as part of this call; those assets must
|
|
916
971
|
be manually cleaned up (if desired).
|
|
917
972
|
|
|
973
|
+
For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
974
|
+
**MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
|
|
975
|
+
parent catalog, and **MANAGE** and **USE_SCHEMA** on the schema.
|
|
976
|
+
|
|
918
977
|
:param object_type: str
|
|
919
978
|
The type of the monitored object. Can be one of the following: `schema` or `table`.
|
|
920
979
|
:param object_id: str
|
|
921
|
-
The UUID of the request object.
|
|
980
|
+
The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
981
|
+
|
|
982
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
983
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
984
|
+
|
|
985
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
986
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
987
|
+
|
|
988
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
989
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
990
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
|
|
922
991
|
|
|
923
992
|
|
|
924
993
|
"""
|
|
@@ -935,7 +1004,17 @@ class DataQualityAPI:
|
|
|
935
1004
|
:param object_type: str
|
|
936
1005
|
The type of the monitored object. Can be one of the following: `schema` or `table`.
|
|
937
1006
|
:param object_id: str
|
|
938
|
-
The UUID of the request object.
|
|
1007
|
+
The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
1008
|
+
|
|
1009
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
1010
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
1011
|
+
|
|
1012
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
1013
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
1014
|
+
|
|
1015
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
1016
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
1017
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
|
|
939
1018
|
:param refresh_id: int
|
|
940
1019
|
Unique id of the refresh operation.
|
|
941
1020
|
|
|
@@ -951,21 +1030,35 @@ class DataQualityAPI:
|
|
|
951
1030
|
)
|
|
952
1031
|
|
|
953
1032
|
def get_monitor(self, object_type: str, object_id: str) -> Monitor:
|
|
954
|
-
"""Read a data quality monitor on Unity Catalog object.
|
|
1033
|
+
"""Read a data quality monitor on a Unity Catalog object.
|
|
1034
|
+
|
|
1035
|
+
For the `table` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
1036
|
+
**MANAGE** and **USE_CATALOG** on the table's parent catalog. 2. **USE_CATALOG** on the table's parent
|
|
1037
|
+
catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the
|
|
1038
|
+
table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **SELECT** on the table.
|
|
955
1039
|
|
|
956
|
-
For the `
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
the table's parent schema - **SELECT** privilege on the table.
|
|
1040
|
+
For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
1041
|
+
**MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
|
|
1042
|
+
parent catalog, and **USE_SCHEMA** on the schema.
|
|
960
1043
|
|
|
961
|
-
The returned information includes configuration values
|
|
962
|
-
the monitor. Some information (e.g
|
|
963
|
-
workspace than where the monitor was created.
|
|
1044
|
+
The returned information includes configuration values on the entity and parent entity as well as
|
|
1045
|
+
information on assets created by the monitor. Some information (e.g. dashboard) may be filtered out if
|
|
1046
|
+
the caller is in a different workspace than where the monitor was created.
|
|
964
1047
|
|
|
965
1048
|
:param object_type: str
|
|
966
1049
|
The type of the monitored object. Can be one of the following: `schema` or `table`.
|
|
967
1050
|
:param object_id: str
|
|
968
|
-
The UUID of the request object.
|
|
1051
|
+
The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
1052
|
+
|
|
1053
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
1054
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
1055
|
+
|
|
1056
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
1057
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
1058
|
+
|
|
1059
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
1060
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
1061
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
|
|
969
1062
|
|
|
970
1063
|
:returns: :class:`Monitor`
|
|
971
1064
|
"""
|
|
@@ -978,17 +1071,32 @@ class DataQualityAPI:
|
|
|
978
1071
|
return Monitor.from_dict(res)
|
|
979
1072
|
|
|
980
1073
|
def get_refresh(self, object_type: str, object_id: str, refresh_id: int) -> Refresh:
|
|
981
|
-
"""Get data quality monitor refresh.
|
|
1074
|
+
"""Get data quality monitor refresh. The call must be made in the same workspace as where the monitor was
|
|
1075
|
+
created.
|
|
1076
|
+
|
|
1077
|
+
For the `table` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
1078
|
+
**MANAGE** and **USE_CATALOG** on the table's parent catalog. 2. **USE_CATALOG** on the table's parent
|
|
1079
|
+
catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the
|
|
1080
|
+
table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **SELECT** on the table.
|
|
982
1081
|
|
|
983
|
-
For the `
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
the table's parent schema - **SELECT** privilege on the table.
|
|
1082
|
+
For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
1083
|
+
**MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
|
|
1084
|
+
parent catalog, and **USE_SCHEMA** on the schema.
|
|
987
1085
|
|
|
988
1086
|
:param object_type: str
|
|
989
1087
|
The type of the monitored object. Can be one of the following: `schema` or `table`.
|
|
990
1088
|
:param object_id: str
|
|
991
|
-
The UUID of the request object.
|
|
1089
|
+
The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
1090
|
+
|
|
1091
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
1092
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
1093
|
+
|
|
1094
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
1095
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
1096
|
+
|
|
1097
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
1098
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
1099
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
|
|
992
1100
|
:param refresh_id: int
|
|
993
1101
|
Unique id of the refresh operation.
|
|
994
1102
|
|
|
@@ -1034,17 +1142,32 @@ class DataQualityAPI:
|
|
|
1034
1142
|
def list_refresh(
|
|
1035
1143
|
self, object_type: str, object_id: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
|
|
1036
1144
|
) -> Iterator[Refresh]:
|
|
1037
|
-
"""List data quality monitor refreshes.
|
|
1145
|
+
"""List data quality monitor refreshes. The call must be made in the same workspace as where the monitor
|
|
1146
|
+
was created.
|
|
1038
1147
|
|
|
1039
|
-
For the `table` `object_type`, the caller must either
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
the table's parent schema
|
|
1148
|
+
For the `table` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
1149
|
+
**MANAGE** and **USE_CATALOG** on the table's parent catalog. 2. **USE_CATALOG** on the table's parent
|
|
1150
|
+
catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the
|
|
1151
|
+
table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **SELECT** on the table.
|
|
1152
|
+
|
|
1153
|
+
For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
1154
|
+
**MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
|
|
1155
|
+
parent catalog, and **USE_SCHEMA** on the schema.
|
|
1043
1156
|
|
|
1044
1157
|
:param object_type: str
|
|
1045
1158
|
The type of the monitored object. Can be one of the following: `schema` or `table`.
|
|
1046
1159
|
:param object_id: str
|
|
1047
|
-
The UUID of the request object.
|
|
1160
|
+
The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
1161
|
+
|
|
1162
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
1163
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
1164
|
+
|
|
1165
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
1166
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
1167
|
+
|
|
1168
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
1169
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
1170
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
|
|
1048
1171
|
:param page_size: int (optional)
|
|
1049
1172
|
:param page_token: str (optional)
|
|
1050
1173
|
|
|
@@ -1077,15 +1200,29 @@ class DataQualityAPI:
|
|
|
1077
1200
|
def update_monitor(self, object_type: str, object_id: str, monitor: Monitor, update_mask: str) -> Monitor:
|
|
1078
1201
|
"""Update a data quality monitor on Unity Catalog object.
|
|
1079
1202
|
|
|
1080
|
-
For the `table` `object_type`,
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
the table's parent schema
|
|
1203
|
+
For the `table` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
1204
|
+
**MANAGE** and **USE_CATALOG** on the table's parent catalog. 2. **USE_CATALOG** on the table's parent
|
|
1205
|
+
catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the
|
|
1206
|
+
table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **MANAGE** on the table.
|
|
1207
|
+
|
|
1208
|
+
For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
|
|
1209
|
+
**MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
|
|
1210
|
+
parent catalog, and **MANAGE** and **USE_SCHEMA** on the schema.
|
|
1084
1211
|
|
|
1085
1212
|
:param object_type: str
|
|
1086
1213
|
The type of the monitored object. Can be one of the following: `schema` or `table`.
|
|
1087
1214
|
:param object_id: str
|
|
1088
|
-
The UUID of the request object.
|
|
1215
|
+
The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
1216
|
+
|
|
1217
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
1218
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
1219
|
+
|
|
1220
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
1221
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
1222
|
+
|
|
1223
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
1224
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
1225
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
|
|
1089
1226
|
:param monitor: :class:`Monitor`
|
|
1090
1227
|
The monitor to update.
|
|
1091
1228
|
:param update_mask: str
|
|
@@ -1094,6 +1231,7 @@ class DataQualityAPI:
|
|
|
1094
1231
|
|
|
1095
1232
|
:returns: :class:`Monitor`
|
|
1096
1233
|
"""
|
|
1234
|
+
|
|
1097
1235
|
body = monitor.as_dict()
|
|
1098
1236
|
query = {}
|
|
1099
1237
|
if update_mask is not None:
|
|
@@ -1116,7 +1254,17 @@ class DataQualityAPI:
|
|
|
1116
1254
|
:param object_type: str
|
|
1117
1255
|
The type of the monitored object. Can be one of the following: `schema` or `table`.
|
|
1118
1256
|
:param object_id: str
|
|
1119
|
-
The UUID of the request object.
|
|
1257
|
+
The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
|
|
1258
|
+
|
|
1259
|
+
Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
|
|
1260
|
+
Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
|
|
1261
|
+
|
|
1262
|
+
Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
|
|
1263
|
+
Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
|
|
1264
|
+
|
|
1265
|
+
[Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
|
|
1266
|
+
[schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
|
|
1267
|
+
[table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
|
|
1120
1268
|
:param refresh_id: int
|
|
1121
1269
|
Unique id of the refresh operation.
|
|
1122
1270
|
:param refresh: :class:`Refresh`
|
|
@@ -1126,6 +1274,7 @@ class DataQualityAPI:
|
|
|
1126
1274
|
|
|
1127
1275
|
:returns: :class:`Refresh`
|
|
1128
1276
|
"""
|
|
1277
|
+
|
|
1129
1278
|
body = refresh.as_dict()
|
|
1130
1279
|
query = {}
|
|
1131
1280
|
if update_mask is not None:
|
databricks/sdk/service/files.py
CHANGED
|
@@ -51,24 +51,6 @@ class CloseResponse:
|
|
|
51
51
|
return cls()
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
@dataclass
|
|
55
|
-
class CreateDirectoryResponse:
|
|
56
|
-
def as_dict(self) -> dict:
|
|
57
|
-
"""Serializes the CreateDirectoryResponse into a dictionary suitable for use as a JSON request body."""
|
|
58
|
-
body = {}
|
|
59
|
-
return body
|
|
60
|
-
|
|
61
|
-
def as_shallow_dict(self) -> dict:
|
|
62
|
-
"""Serializes the CreateDirectoryResponse into a shallow dictionary of its immediate attributes."""
|
|
63
|
-
body = {}
|
|
64
|
-
return body
|
|
65
|
-
|
|
66
|
-
@classmethod
|
|
67
|
-
def from_dict(cls, d: Dict[str, Any]) -> CreateDirectoryResponse:
|
|
68
|
-
"""Deserializes the CreateDirectoryResponse from a dictionary."""
|
|
69
|
-
return cls()
|
|
70
|
-
|
|
71
|
-
|
|
72
54
|
@dataclass
|
|
73
55
|
class CreateResponse:
|
|
74
56
|
handle: Optional[int] = None
|
|
@@ -95,24 +77,6 @@ class CreateResponse:
|
|
|
95
77
|
return cls(handle=d.get("handle", None))
|
|
96
78
|
|
|
97
79
|
|
|
98
|
-
@dataclass
|
|
99
|
-
class DeleteDirectoryResponse:
|
|
100
|
-
def as_dict(self) -> dict:
|
|
101
|
-
"""Serializes the DeleteDirectoryResponse into a dictionary suitable for use as a JSON request body."""
|
|
102
|
-
body = {}
|
|
103
|
-
return body
|
|
104
|
-
|
|
105
|
-
def as_shallow_dict(self) -> dict:
|
|
106
|
-
"""Serializes the DeleteDirectoryResponse into a shallow dictionary of its immediate attributes."""
|
|
107
|
-
body = {}
|
|
108
|
-
return body
|
|
109
|
-
|
|
110
|
-
@classmethod
|
|
111
|
-
def from_dict(cls, d: Dict[str, Any]) -> DeleteDirectoryResponse:
|
|
112
|
-
"""Deserializes the DeleteDirectoryResponse from a dictionary."""
|
|
113
|
-
return cls()
|
|
114
|
-
|
|
115
|
-
|
|
116
80
|
@dataclass
|
|
117
81
|
class DeleteResponse:
|
|
118
82
|
def as_dict(self) -> dict:
|
|
@@ -290,24 +254,6 @@ class FileInfo:
|
|
|
290
254
|
)
|
|
291
255
|
|
|
292
256
|
|
|
293
|
-
@dataclass
|
|
294
|
-
class GetDirectoryMetadataResponse:
|
|
295
|
-
def as_dict(self) -> dict:
|
|
296
|
-
"""Serializes the GetDirectoryMetadataResponse into a dictionary suitable for use as a JSON request body."""
|
|
297
|
-
body = {}
|
|
298
|
-
return body
|
|
299
|
-
|
|
300
|
-
def as_shallow_dict(self) -> dict:
|
|
301
|
-
"""Serializes the GetDirectoryMetadataResponse into a shallow dictionary of its immediate attributes."""
|
|
302
|
-
body = {}
|
|
303
|
-
return body
|
|
304
|
-
|
|
305
|
-
@classmethod
|
|
306
|
-
def from_dict(cls, d: Dict[str, Any]) -> GetDirectoryMetadataResponse:
|
|
307
|
-
"""Deserializes the GetDirectoryMetadataResponse from a dictionary."""
|
|
308
|
-
return cls()
|
|
309
|
-
|
|
310
|
-
|
|
311
257
|
@dataclass
|
|
312
258
|
class GetMetadataResponse:
|
|
313
259
|
content_length: Optional[int] = None
|
|
@@ -496,24 +442,6 @@ class ReadResponse:
|
|
|
496
442
|
return cls(bytes_read=d.get("bytes_read", None), data=d.get("data", None))
|
|
497
443
|
|
|
498
444
|
|
|
499
|
-
@dataclass
|
|
500
|
-
class UploadResponse:
|
|
501
|
-
def as_dict(self) -> dict:
|
|
502
|
-
"""Serializes the UploadResponse into a dictionary suitable for use as a JSON request body."""
|
|
503
|
-
body = {}
|
|
504
|
-
return body
|
|
505
|
-
|
|
506
|
-
def as_shallow_dict(self) -> dict:
|
|
507
|
-
"""Serializes the UploadResponse into a shallow dictionary of its immediate attributes."""
|
|
508
|
-
body = {}
|
|
509
|
-
return body
|
|
510
|
-
|
|
511
|
-
@classmethod
|
|
512
|
-
def from_dict(cls, d: Dict[str, Any]) -> UploadResponse:
|
|
513
|
-
"""Deserializes the UploadResponse from a dictionary."""
|
|
514
|
-
return cls()
|
|
515
|
-
|
|
516
|
-
|
|
517
445
|
class DbfsAPI:
|
|
518
446
|
"""DBFS API makes it simple to interact with various data sources without having to include a users
|
|
519
447
|
credentials every time to read a file."""
|
|
@@ -534,6 +462,7 @@ class DbfsAPI:
|
|
|
534
462
|
|
|
535
463
|
|
|
536
464
|
"""
|
|
465
|
+
|
|
537
466
|
body = {}
|
|
538
467
|
if data is not None:
|
|
539
468
|
body["data"] = data
|
|
@@ -555,6 +484,7 @@ class DbfsAPI:
|
|
|
555
484
|
|
|
556
485
|
|
|
557
486
|
"""
|
|
487
|
+
|
|
558
488
|
body = {}
|
|
559
489
|
if handle is not None:
|
|
560
490
|
body["handle"] = handle
|
|
@@ -582,6 +512,7 @@ class DbfsAPI:
|
|
|
582
512
|
|
|
583
513
|
:returns: :class:`CreateResponse`
|
|
584
514
|
"""
|
|
515
|
+
|
|
585
516
|
body = {}
|
|
586
517
|
if overwrite is not None:
|
|
587
518
|
body["overwrite"] = overwrite
|
|
@@ -619,6 +550,7 @@ class DbfsAPI:
|
|
|
619
550
|
|
|
620
551
|
|
|
621
552
|
"""
|
|
553
|
+
|
|
622
554
|
body = {}
|
|
623
555
|
if path is not None:
|
|
624
556
|
body["path"] = path
|
|
@@ -690,6 +622,7 @@ class DbfsAPI:
|
|
|
690
622
|
|
|
691
623
|
|
|
692
624
|
"""
|
|
625
|
+
|
|
693
626
|
body = {}
|
|
694
627
|
if path is not None:
|
|
695
628
|
body["path"] = path
|
|
@@ -713,6 +646,7 @@ class DbfsAPI:
|
|
|
713
646
|
|
|
714
647
|
|
|
715
648
|
"""
|
|
649
|
+
|
|
716
650
|
body = {}
|
|
717
651
|
if destination_path is not None:
|
|
718
652
|
body["destination_path"] = destination_path
|
|
@@ -746,6 +680,7 @@ class DbfsAPI:
|
|
|
746
680
|
|
|
747
681
|
|
|
748
682
|
"""
|
|
683
|
+
|
|
749
684
|
body = {}
|
|
750
685
|
if contents is not None:
|
|
751
686
|
body["contents"] = contents
|