delete_iceberg_optimizer

DatasetsApi.delete_iceberg_optimizer(id, role_id, type, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)

Delete an Iceberg Glue table optimizer

Deletes an AWS Glue Iceberg table optimizer for the dataset. Iceberg-only; not supported for IcebergCatalog=s3tables (GE-1010). type query param is required (compaction | retention | orphan-file-deletion). When no optimizer types remain for the dataset, the server cleans up the optimizer role S3 inline policy partition for that dataset.

Parameters:
  • id (str) – Dataset UUID of the Iceberg Glue table whose optimizer is deleted. (required)

  • role_id (str) – Amorphic role ID the request is authorized against. Must be a role the user belongs to with access to the target dataset. (required)

  • type (str) – Optimizer type to delete. Required. One of compaction, retention, or orphan-file-deletion. (required)

  • _request_timeout (int, tuple(int, int), optional) – timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts.

  • _request_auth (dict, optional) – set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request.

  • _content_type (str, Optional) – force content-type for the request.

  • _headers (dict, optional) – set to override the headers for a single request; this effectively ignores the headers in the spec for a single request.

  • _host_index (int, optional) – set to override the host_index for a single request; this effectively ignores the host_index in the spec for a single request.

Return type:

OptimizerDeleteResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: DELETE /datasets/{id}/optimizers

Parameter examples

Name

In

Example

id

path

"b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f"

type

query

"orphan-file-deletion"

Success (HTTP 200)

Optimizer deleted. Message is “Successfully deleted the iceberg table optimizer”.

Request / response example

{
  "Message": "Successfully deleted the iceberg table optimizer"
}

Errors

Documented error codes: GE-1010, AUTH-1001, RTE-1001.

HTTP 400

Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes: GE-1010 (missing type, not Iceberg, s3tables), AUTH-* (unauthorized).

Missing type query param

{
  "Message": "GE-1010 - Optimizer type is required"
}

Dataset is not Iceberg

{
  "Message": "GE-1010 - Optimizer APIs are only available for Iceberg tables"
}

Unauthorized caller

{
  "Message": "AUTH-1001 - User is not authorized"
}

HTTP 500

Backend/generic failure. Body is {“Message”: “<CODE> - <text>”} (e.g. RTE-1001 wrapping delete/Glue errors).

Unexpected failure

{
  "Message": "RTE-1001 - Error deleting optimizer: <exception text>"
}