update_iceberg_optimizer¶
- DatasetsApi.update_iceberg_optimizer(id, role_id, type, optimizer_configuration, content_type=None, _request_timeout=None, _request_auth=None, _content_type=None, _headers=None, _host_index=0)¶
Update an Iceberg Glue table optimizer
Updates configuration of an existing AWS Glue Iceberg table optimizer. Iceberg-only; not supported for IcebergCatalog=s3tables (GE-1010). type query param is required (compaction | retention | orphan-file-deletion). Body is Enabled plus optional Configuration (same shape as POST). If the optimizer does not exist, Glue EntityNotFoundException is surfaced as “Optimizer not found. Use POST to create.”
- Parameters:
id (str) – Dataset UUID of the Iceberg Glue table whose optimizer is updated. (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 update. Required. One of compaction, retention, or orphan-file-deletion. (required)
optimizer_configuration (OptimizerConfiguration) – Updated Enabled flag and optional type-specific Configuration for the Glue table optimizer. (required)
content_type (str) – Must be application/json.
_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: PUT /datasets/{id}/optimizers
Parameter examples¶
Name |
In |
Example |
|---|---|---|
|
path |
|
|
query |
|
Request¶
Updated Enabled flag and optional type-specific Configuration for the Glue table optimizer.
Disable retention optimizer
{
"Enabled": false,
"Configuration": {
"SnapshotRetentionDays": 14,
"SnapshotsToRetain": 10,
"CleanExpiredFiles": true,
"RunRateHours": 24
}
}
Update compaction settings
{
"Enabled": true,
"Configuration": {
"Strategy": "sort",
"MinInputFiles": 50,
"DeleteFileThreshold": 2
}
}
Success (HTTP 200)¶
Optimizer updated. Message is “Successfully updated the iceberg table optimizer”.
Request / response example
{
"Message": "Successfully updated the iceberg table optimizer"
}
Errors¶
Documented error codes: GE-1010, RTE-1001.
HTTP 400
Validation or authorization failure. Body is {“Message”: “<CODE> - <text>”}. Codes: GE-1010 (missing type, not Iceberg, s3tables), AUTH-* (unauthorized). Also wraps update-time Glue errors (optimizer not found).
Missing type query param
{
"Message": "GE-1010 - Optimizer type is required"
}
Optimizer does not exist
{
"Message": "RTE-1001 - Failed to do PUT operation on the iceberg optimizer, error - Error updating optimizer: Optimizer not found. Use POST to create."
}
Dataset is not Iceberg
{
"Message": "GE-1010 - Optimizer APIs are only available for Iceberg tables"
}
HTTP 500
Backend/generic failure. Body is {“Message”: “<CODE> - <text>”} (e.g. RTE-1001).
Unexpected failure
{
"Message": "RTE-1001 - Failed to do PUT operation on the iceberg optimizer, error - <exception text>"
}