databricks-sdk 0.69.0__py3-none-any.whl → 0.70.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/dbutils.py CHANGED
@@ -281,10 +281,17 @@ def get_local_notebook_path():
281
281
  return value
282
282
 
283
283
 
284
+ def not_supported_method_err_msg(methodName):
285
+ return f"Method '{methodName}' is not supported in the SDK version of DBUtils"
286
+
287
+
284
288
  class _OverrideProxyUtil:
285
289
 
286
290
  @classmethod
287
291
  def new(cls, path: str):
292
+ if path in cls.not_supported_override_paths:
293
+ raise ValueError(cls.not_supported_override_paths[path])
294
+
288
295
  if len(cls.__get_matching_overrides(path)) > 0:
289
296
  return _OverrideProxyUtil(path)
290
297
  return None
@@ -301,6 +308,16 @@ class _OverrideProxyUtil:
301
308
  "notebook.entry_point.getDbutils().notebook().getContext().notebookPath().get()": get_local_notebook_path,
302
309
  }
303
310
 
311
+ # These paths work the same as 'proxy_override_paths' but instead of using a local implementation we raise an exception.
312
+ not_supported_override_paths = {
313
+ # The object returned by 'credentials.getServiceCredentialProvider()' can't be serialized to JSON.
314
+ # Without this override, the command would fail with an error 'TypeError: Object of type Session is not JSON serializable'.
315
+ # We override it to show a better error message
316
+ "credentials.getServiceCredentialsProvider": not_supported_method_err_msg(
317
+ "credentials.getServiceCredentialsProvider"
318
+ ),
319
+ }
320
+
304
321
  @classmethod
305
322
  def __get_matching_overrides(cls, path: str):
306
323
  return [x for x in cls.proxy_override_paths.keys() if x.startswith(path)]
@@ -1740,7 +1740,7 @@ class ConnectionInfo:
1740
1740
 
1741
1741
 
1742
1742
  class ConnectionType(Enum):
1743
- """Next Id: 38"""
1743
+ """Next Id: 46"""
1744
1744
 
1745
1745
  BIGQUERY = "BIGQUERY"
1746
1746
  DATABRICKS = "DATABRICKS"
@@ -2542,12 +2542,13 @@ class CredentialPurpose(Enum):
2542
2542
 
2543
2543
 
2544
2544
  class CredentialType(Enum):
2545
- """Next Id: 13"""
2545
+ """Next Id: 14"""
2546
2546
 
2547
2547
  ANY_STATIC_CREDENTIAL = "ANY_STATIC_CREDENTIAL"
2548
2548
  BEARER_TOKEN = "BEARER_TOKEN"
2549
2549
  OAUTH_ACCESS_TOKEN = "OAUTH_ACCESS_TOKEN"
2550
2550
  OAUTH_M2M = "OAUTH_M2M"
2551
+ OAUTH_MTLS = "OAUTH_MTLS"
2551
2552
  OAUTH_REFRESH_TOKEN = "OAUTH_REFRESH_TOKEN"
2552
2553
  OAUTH_RESOURCE_OWNER_PASSWORD = "OAUTH_RESOURCE_OWNER_PASSWORD"
2553
2554
  OAUTH_U2M = "OAUTH_U2M"
@@ -8549,7 +8550,7 @@ class RowFilterOptions:
8549
8550
 
8550
8551
  @dataclass
8551
8552
  class SchemaInfo:
8552
- """Next ID: 40"""
8553
+ """Next ID: 42"""
8553
8554
 
8554
8555
  browse_only: Optional[bool] = None
8555
8556
  """Indicates whether the principal is limited to retrieving metadata for the associated object
@@ -8762,7 +8763,7 @@ class Securable:
8762
8763
 
8763
8764
 
8764
8765
  class SecurableKind(Enum):
8765
- """Latest kind: CONNECTION_REDSHIFT_IAM = 265; Next id:266"""
8766
+ """Latest kind: CONNECTION_SALESFORCE_OAUTH_MTLS = 268; Next id:269"""
8766
8767
 
8767
8768
  TABLE_DB_STORAGE = "TABLE_DB_STORAGE"
8768
8769
  TABLE_DELTA = "TABLE_DELTA"
@@ -7155,11 +7155,21 @@ class TerminationReasonCode(Enum):
7155
7155
  NEPHOS_RESOURCE_MANAGEMENT = "NEPHOS_RESOURCE_MANAGEMENT"
7156
7156
  NETVISOR_SETUP_TIMEOUT = "NETVISOR_SETUP_TIMEOUT"
7157
7157
  NETWORK_CHECK_CONTROL_PLANE_FAILURE = "NETWORK_CHECK_CONTROL_PLANE_FAILURE"
7158
+ NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG = "NETWORK_CHECK_CONTROL_PLANE_FAILURE_DUE_TO_MISCONFIG"
7158
7159
  NETWORK_CHECK_DNS_SERVER_FAILURE = "NETWORK_CHECK_DNS_SERVER_FAILURE"
7160
+ NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG = "NETWORK_CHECK_DNS_SERVER_FAILURE_DUE_TO_MISCONFIG"
7159
7161
  NETWORK_CHECK_METADATA_ENDPOINT_FAILURE = "NETWORK_CHECK_METADATA_ENDPOINT_FAILURE"
7162
+ NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG = (
7163
+ "NETWORK_CHECK_METADATA_ENDPOINT_FAILURE_DUE_TO_MISCONFIG"
7164
+ )
7160
7165
  NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE = "NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE"
7166
+ NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG = (
7167
+ "NETWORK_CHECK_MULTIPLE_COMPONENTS_FAILURE_DUE_TO_MISCONFIG"
7168
+ )
7161
7169
  NETWORK_CHECK_NIC_FAILURE = "NETWORK_CHECK_NIC_FAILURE"
7170
+ NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG = "NETWORK_CHECK_NIC_FAILURE_DUE_TO_MISCONFIG"
7162
7171
  NETWORK_CHECK_STORAGE_FAILURE = "NETWORK_CHECK_STORAGE_FAILURE"
7172
+ NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG = "NETWORK_CHECK_STORAGE_FAILURE_DUE_TO_MISCONFIG"
7163
7173
  NETWORK_CONFIGURATION_FAILURE = "NETWORK_CONFIGURATION_FAILURE"
7164
7174
  NFS_MOUNT_FAILURE = "NFS_MOUNT_FAILURE"
7165
7175
  NO_ACTIVATED_K8S = "NO_ACTIVATED_K8S"
@@ -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. For example, schema id."""
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. For example, table id."""
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. For example, schema id.
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,14 +891,19 @@ 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: 1. be an owner of the table's parent catalog,
858
- have **USE_SCHEMA** on the table's parent schema, and have **SELECT** access on the table 2. have
859
- **USE_CATALOG** on the table's parent catalog, be an owner of the table's parent schema, and have
860
- **SELECT** access on the table. 3. have the following permissions: - **USE_CATALOG** on the table's
861
- parent catalog - **USE_SCHEMA** on the table's parent schema - be an owner of the table.
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
 
@@ -877,17 +919,28 @@ class DataQualityAPI:
877
919
  return Monitor.from_dict(res)
878
920
 
879
921
  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`.
922
+ """Creates a refresh. Currently only supported for the `table` `object_type`. The call must be made in
923
+ the same workspace as where the monitor was created.
881
924
 
882
- The caller must either: 1. be an owner of the table's parent catalog 2. have **USE_CATALOG** on the
883
- table's parent catalog and be an owner of the table's parent schema 3. have the following permissions:
884
- - **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on the table's parent schema - be an
885
- owner of the table
925
+ The caller must have either of the following sets of permissions: 1. **MANAGE** and **USE_CATALOG** on
926
+ the table's parent catalog. 2. **USE_CATALOG** on the table's parent catalog, and **MANAGE** and
927
+ **USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the table's parent catalog,
928
+ **USE_SCHEMA** on the table's parent schema, and **MANAGE** on the table.
886
929
 
887
930
  :param object_type: str
888
931
  The type of the monitored object. Can be one of the following: `schema`or `table`.
889
932
  :param object_id: str
890
- The UUID of the request object. For example, table id.
933
+ The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
934
+
935
+ Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
936
+ Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
937
+
938
+ Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
939
+ Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
940
+
941
+ [Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
942
+ [schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
943
+ [table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
891
944
  :param refresh: :class:`Refresh`
892
945
  The refresh to create
893
946
 
@@ -907,18 +960,32 @@ class DataQualityAPI:
907
960
  def delete_monitor(self, object_type: str, object_id: str):
908
961
  """Delete a data quality monitor on Unity Catalog object.
909
962
 
910
- For the `table` `object_type`, the caller must either: 1. be an owner of the table's parent catalog 2.
911
- have **USE_CATALOG** on the table's parent catalog and be an owner of the table's parent schema 3.
912
- have the following permissions: - **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on
913
- the table's parent schema - be an owner of the table.
963
+ For the `table` `object_type`, the caller must have either of the following sets of permissions:
964
+ **MANAGE** and **USE_CATALOG** on the table's parent catalog. **USE_CATALOG** on the table's parent
965
+ catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. **USE_CATALOG** on the
966
+ table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **MANAGE** on the table.
914
967
 
915
968
  Note that the metric tables and dashboard will not be deleted as part of this call; those assets must
916
969
  be manually cleaned up (if desired).
917
970
 
971
+ For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
972
+ **MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
973
+ parent catalog, and **MANAGE** and **USE_SCHEMA** on the schema.
974
+
918
975
  :param object_type: str
919
976
  The type of the monitored object. Can be one of the following: `schema` or `table`.
920
977
  :param object_id: str
921
- The UUID of the request object. For example, schema id.
978
+ The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
979
+
980
+ Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
981
+ Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
982
+
983
+ Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
984
+ Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
985
+
986
+ [Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
987
+ [schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
988
+ [table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
922
989
 
923
990
 
924
991
  """
@@ -935,7 +1002,17 @@ class DataQualityAPI:
935
1002
  :param object_type: str
936
1003
  The type of the monitored object. Can be one of the following: `schema` or `table`.
937
1004
  :param object_id: str
938
- The UUID of the request object. For example, schema id.
1005
+ The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
1006
+
1007
+ Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
1008
+ Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
1009
+
1010
+ Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
1011
+ Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
1012
+
1013
+ [Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
1014
+ [schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
1015
+ [table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
939
1016
  :param refresh_id: int
940
1017
  Unique id of the refresh operation.
941
1018
 
@@ -951,21 +1028,35 @@ class DataQualityAPI:
951
1028
  )
952
1029
 
953
1030
  def get_monitor(self, object_type: str, object_id: str) -> Monitor:
954
- """Read a data quality monitor on Unity Catalog object.
1031
+ """Read a data quality monitor on a Unity Catalog object.
1032
+
1033
+ For the `table` `object_type`, the caller must have either of the following sets of permissions: 1.
1034
+ **MANAGE** and **USE_CATALOG** on the table's parent catalog. 2. **USE_CATALOG** on the table's parent
1035
+ catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the
1036
+ table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **SELECT** on the table.
955
1037
 
956
- For the `table` `object_type`, the caller must either: 1. be an owner of the table's parent catalog 2.
957
- have **USE_CATALOG** on the table's parent catalog and be an owner of the table's parent schema. 3.
958
- have the following permissions: - **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on
959
- the table's parent schema - **SELECT** privilege on the table.
1038
+ For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
1039
+ **MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
1040
+ parent catalog, and **USE_SCHEMA** on the schema.
960
1041
 
961
- The returned information includes configuration values, as well as information on assets created by
962
- the monitor. Some information (e.g., dashboard) may be filtered out if the caller is in a different
963
- workspace than where the monitor was created.
1042
+ The returned information includes configuration values on the entity and parent entity as well as
1043
+ information on assets created by the monitor. Some information (e.g. dashboard) may be filtered out if
1044
+ the caller is in a different workspace than where the monitor was created.
964
1045
 
965
1046
  :param object_type: str
966
1047
  The type of the monitored object. Can be one of the following: `schema` or `table`.
967
1048
  :param object_id: str
968
- The UUID of the request object. For example, schema id.
1049
+ The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
1050
+
1051
+ Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
1052
+ Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
1053
+
1054
+ Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
1055
+ Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
1056
+
1057
+ [Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
1058
+ [schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
1059
+ [table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
969
1060
 
970
1061
  :returns: :class:`Monitor`
971
1062
  """
@@ -978,17 +1069,32 @@ class DataQualityAPI:
978
1069
  return Monitor.from_dict(res)
979
1070
 
980
1071
  def get_refresh(self, object_type: str, object_id: str, refresh_id: int) -> Refresh:
981
- """Get data quality monitor refresh.
1072
+ """Get data quality monitor refresh. The call must be made in the same workspace as where the monitor was
1073
+ created.
982
1074
 
983
- For the `table` `object_type`, the caller must either: 1. be an owner of the table's parent catalog 2.
984
- have **USE_CATALOG** on the table's parent catalog and be an owner of the table's parent schema 3.
985
- have the following permissions: - **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on
986
- the table's parent schema - **SELECT** privilege on the table.
1075
+ For the `table` `object_type`, the caller must have either of the following sets of permissions: 1.
1076
+ **MANAGE** and **USE_CATALOG** on the table's parent catalog. 2. **USE_CATALOG** on the table's parent
1077
+ catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the
1078
+ table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **SELECT** on the table.
1079
+
1080
+ For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
1081
+ **MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
1082
+ parent catalog, and **USE_SCHEMA** on the schema.
987
1083
 
988
1084
  :param object_type: str
989
1085
  The type of the monitored object. Can be one of the following: `schema` or `table`.
990
1086
  :param object_id: str
991
- The UUID of the request object. For example, schema id.
1087
+ The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
1088
+
1089
+ Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
1090
+ Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
1091
+
1092
+ Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
1093
+ Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
1094
+
1095
+ [Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
1096
+ [schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
1097
+ [table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
992
1098
  :param refresh_id: int
993
1099
  Unique id of the refresh operation.
994
1100
 
@@ -1034,17 +1140,32 @@ class DataQualityAPI:
1034
1140
  def list_refresh(
1035
1141
  self, object_type: str, object_id: str, *, page_size: Optional[int] = None, page_token: Optional[str] = None
1036
1142
  ) -> Iterator[Refresh]:
1037
- """List data quality monitor refreshes.
1143
+ """List data quality monitor refreshes. The call must be made in the same workspace as where the monitor
1144
+ was created.
1145
+
1146
+ For the `table` `object_type`, the caller must have either of the following sets of permissions: 1.
1147
+ **MANAGE** and **USE_CATALOG** on the table's parent catalog. 2. **USE_CATALOG** on the table's parent
1148
+ catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the
1149
+ table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **SELECT** on the table.
1038
1150
 
1039
- For the `table` `object_type`, the caller must either: 1. be an owner of the table's parent catalog 2.
1040
- have **USE_CATALOG** on the table's parent catalog and be an owner of the table's parent schema 3.
1041
- have the following permissions: - **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on
1042
- the table's parent schema - **SELECT** privilege on the table.
1151
+ For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
1152
+ **MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
1153
+ parent catalog, and **USE_SCHEMA** on the schema.
1043
1154
 
1044
1155
  :param object_type: str
1045
1156
  The type of the monitored object. Can be one of the following: `schema` or `table`.
1046
1157
  :param object_id: str
1047
- The UUID of the request object. For example, schema id.
1158
+ The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
1159
+
1160
+ Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
1161
+ Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
1162
+
1163
+ Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
1164
+ Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
1165
+
1166
+ [Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
1167
+ [schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
1168
+ [table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
1048
1169
  :param page_size: int (optional)
1049
1170
  :param page_token: str (optional)
1050
1171
 
@@ -1077,15 +1198,29 @@ class DataQualityAPI:
1077
1198
  def update_monitor(self, object_type: str, object_id: str, monitor: Monitor, update_mask: str) -> Monitor:
1078
1199
  """Update a data quality monitor on Unity Catalog object.
1079
1200
 
1080
- For the `table` `object_type`, The caller must either: 1. be an owner of the table's parent catalog 2.
1081
- have **USE_CATALOG** on the table's parent catalog and be an owner of the table's parent schema 3.
1082
- have the following permissions: - **USE_CATALOG** on the table's parent catalog - **USE_SCHEMA** on
1083
- the table's parent schema - be an owner of the table.
1201
+ For the `table` `object_type`, the caller must have either of the following sets of permissions: 1.
1202
+ **MANAGE** and **USE_CATALOG** on the table's parent catalog. 2. **USE_CATALOG** on the table's parent
1203
+ catalog, and **MANAGE** and **USE_SCHEMA** on the table's parent schema. 3. **USE_CATALOG** on the
1204
+ table's parent catalog, **USE_SCHEMA** on the table's parent schema, and **MANAGE** on the table.
1205
+
1206
+ For the `schema` `object_type`, the caller must have either of the following sets of permissions: 1.
1207
+ **MANAGE** and **USE_CATALOG** on the schema's parent catalog. 2. **USE_CATALOG** on the schema's
1208
+ parent catalog, and **MANAGE** and **USE_SCHEMA** on the schema.
1084
1209
 
1085
1210
  :param object_type: str
1086
1211
  The type of the monitored object. Can be one of the following: `schema` or `table`.
1087
1212
  :param object_id: str
1088
- The UUID of the request object. For example, schema id.
1213
+ The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
1214
+
1215
+ Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
1216
+ Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
1217
+
1218
+ Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
1219
+ Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
1220
+
1221
+ [Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
1222
+ [schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
1223
+ [table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
1089
1224
  :param monitor: :class:`Monitor`
1090
1225
  The monitor to update.
1091
1226
  :param update_mask: str
@@ -1116,7 +1251,17 @@ class DataQualityAPI:
1116
1251
  :param object_type: str
1117
1252
  The type of the monitored object. Can be one of the following: `schema` or `table`.
1118
1253
  :param object_id: str
1119
- The UUID of the request object. For example, schema id.
1254
+ The UUID of the request object. It is `schema_id` for `schema`, and `table_id` for `table`.
1255
+
1256
+ Find the `schema_id` from either: 1. The [schema_id] of the `Schemas` resource. 2. In [Catalog
1257
+ Explorer] > select the `schema` > go to the `Details` tab > the `Schema ID` field.
1258
+
1259
+ Find the `table_id` from either: 1. The [table_id] of the `Tables` resource. 2. In [Catalog
1260
+ Explorer] > select the `table` > go to the `Details` tab > the `Table ID` field.
1261
+
1262
+ [Catalog Explorer]: https://docs.databricks.com/aws/en/catalog-explorer/
1263
+ [schema_id]: https://docs.databricks.com/api/workspace/schemas/get#schema_id
1264
+ [table_id]: https://docs.databricks.com/api/workspace/tables/get#table_id
1120
1265
  :param refresh_id: int
1121
1266
  Unique id of the refresh operation.
1122
1267
  :param refresh: :class:`Refresh`