list_iceberg_optimizers¶
- DatasetsApi.list_iceberg_optimizers(id, role_id, type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
List Iceberg table optimizers for a dataset
Retrieves AWS Glue table optimizer configuration and status for an Iceberg-only dataset (IsIcebergTable=true). Not supported for IcebergCatalog=s3tables (GE-1010). Manages Glue table optimizers of types compaction, retention, and orphan-file-deletion. When type is omitted, returns all three optimizer slots under Compaction, Retention, and OrphanFileDeletion (empty object {} when that type is not configured). When type is provided, returns that single optimizer (Type, Enabled, Configuration, LastRun) or {“Message”: “Optimizer not found”} if Glue has no entity.
- Parameters:
id (str) – Dataset UUID. Must identify an Iceberg Glue-catalog table; non-Iceberg and s3tables datasets are rejected with GE-1010. (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) – Optional optimizer type filter. When omitted, list returns all three types. When set, returns details for that type only. Allowed values: compaction | retention | orphan-file-deletion.
_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:
- Returns:
Returns the result object.
Request and Response Examples¶
HTTP: GET /datasets/{id}/optimizers
Parameter examples¶
Name |
In |
Example |
|---|---|---|
|
path |
|
|
query |
|
Success (HTTP 200)¶
Optimizers returned. Without type: Compaction/Retention/ OrphanFileDeletion map (each may be {}). With type: single optimizer object, or {“Message”: “Optimizer not found”}.
List all optimizer types
{
"Compaction": {
"Enabled": true,
"ConfigurationSource": "table",
"Strategy": "binpack",
"MinInputFiles": 100,
"DeleteFileThreshold": 1
},
"Retention": {
"Enabled": true,
"ConfigurationSource": "table",
"SnapshotRetentionPeriodInDays": 7,
"NumberOfSnapshotsToRetain": 5,
"CleanExpiredFiles": true
},
"OrphanFileDeletion": {
"Enabled": false,
"ConfigurationSource": "table",
"OrphanFileRetentionPeriodInDays": 3
}
}
GET with type=compaction
{
"Type": "compaction",
"Enabled": true,
"Configuration": {
"Strategy": "binpack",
"MinInputFiles": 100,
"DeleteFileThreshold": 1
},
"LastRun": {
"EventType": "completed",
"StartTimestamp": "2026-08-01T10:00:00Z",
"EndTimestamp": "2026-08-01T10:05:00Z",
"CompactionMetrics": {
"DpuHours": 1.2
}
}
}
Typed GET when optimizer missing
{
"Message": "Optimizer not found"
}
Errors¶
Documented error codes: GE-1010, AUTH-1001, RTE-1001.
HTTP 400
Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Common codes: GE-1010 (not an Iceberg table, s3tables catalog, or invalid input), AUTH-* (unauthorized).
Dataset is not Iceberg
{
"Message": "GE-1010 - Optimizer APIs are only available for Iceberg tables"
}
S3 Tables catalog not supported
{
"Message": "GE-1010 - Optimizer APIs are not supported for IcebergCatalog s3tables. Dataset b1e6c2a0-9f4d-4c7a-8f2e-1a2b3c4d5e6f is an S3 Tables dataset."
}
Unauthorized caller
{
"Message": "AUTH-1001 - User is not authorized"
}
HTTP 500
Backend/generic failure. Body is {“Message”: “<CODE> - <text>”} (e.g. RTE-1001 wrapping Glue/list errors).
Unexpected failure
{
"Message": "RTE-1001 - Error listing optimizers: <exception text>"
}