delete_pending_iceberg_dataset_files

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

Delete pending Iceberg/Hudi/DeltaLake Landing Zone files

Synchronously deletes pending Landing Zone objects and file-loads metadata for an Iceberg/Hudi/DeltaLake dataset. Handler is icebergDataloads. Required: query type (iceberg | hudi | deltalake) matching the dataset framework, and body Files (non-empty array of pending file-load FileName keys). Empty Files → IPV-1001. type missing → IPV-1052; invalid type → IPV-1071. Unknown dataset → IPV-1002. Non-pending Files → GE-1034. Caller must be dataset owner (editors → AUTH-1002). No max-750 limit on delete (unlike POST). Operation and TruncateDataset body fields are ignored if sent.

Parameters:
  • id (str) – Dataset ID whose pending LZ files will be deleted. (required)

  • role_id (str) – Amorphic role ID used for authorization. Caller must be owner of the dataset (editor is not sufficient). (required)

  • files_delete_obj (FilesDeleteObj) – Must include non-empty Files (pending file-load FileName keys). See FilesDeleteObj. Operation and TruncateDataset are ignored. (required)

  • content_type (str) – Must be application/json.

  • type (str) – Datalake framework. Must match the dataset (IcebergTableOptions / HudiTableOptions / IsDeltaLakeTable).

  • _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:

DeletePendingDataloadFilesResponse

Returns:

Returns the result object.

Request and Response Examples

HTTP: PUT /datasets/{id}/dataloads

Request

Must include non-empty Files (pending file-load FileName keys). See FilesDeleteObj. Operation and TruncateDataset are ignored.

Request / response example

{
  "Files": [
    "sales/monthly_orders/upload_date=1700000000/alice_49e02003-289e-41e9-a9f2-28a733349481_1700000001_orders.parquet"
  ]
}

Success (HTTP 200)

Pending files removed from LZ and file-loads metadata. Message is “Successfully deleted files from the dataset”; DatasetId echoes path id.

Request / response example

{
  "Message": "Successfully deleted files from the dataset",
  "DatasetId": "49e02003-289e-41e9-a9f2-28a733349481"
}

Errors

Documented error codes: IPV-1052, IPV-1071, IPV-1001, IPV-1002, AUTH-1002, GE-1034.

HTTP 400

Validation/auth failure. Codes: IPV-1052 (missing type), IPV-1071 (invalid type), IPV-1001 (empty Files), IPV-1002 (unknown DatasetId), AUTH-1002 (not owner), GE-1034 (type/dataset mismatch, non-pending files, or delete/validation failure).

Missing type query param

{
  "Message": "IPV-1052 - Missing required parameter - type"
}

type not in supported frameworks

{
  "Message": "IPV-1071 - Invalid value for parameter dataload"
}

Caller is not owner

{
  "Message": "AUTH-1002 - User is not authorized to perform this operation"
}

Unknown dataset id

{
  "Message": "IPV-1002 - DatasetId 49e02003-... does not exist"
}

Files present but empty

{
  "Message": "IPV-1001 - Empty value - Files"
}

One or more Files are not pending

{
  "Message": "GE-1034 - Cannot start the dataload, Invalid files - [...] are passed for dataload only pending files are supported"
}

HTTP 500

Backend/generic failure.