Skip to main content

aip_sdk.commit_row_batch

aip_sdk.commit_row_batch(dataset_id: str, adds: list[dict[str, Any]] | None = None, updates: dict[str, dict[str, Any]] | None = None, deletes: list[str] | None = None, current_snapshot_id: str | int | None = None, client: APIClient | None = None) -> RowOperationResponse

Commit an atomic mix of insert / update / delete operations.

All operations are applied in a single Iceberg snapshot.

Parameters

  • dataset_id str: Dataset ID.
  • adds list[dict[str, Any]] | None: Rows to insert.
  • updates dict[str, dict[str, Any]] | None: Mapping of {row_id: {column: new_value}}.
  • deletes list[str] | None: Row IDs to delete.
  • current_snapshot_id str | int | None: Optional Iceberg snapshot ID for conflict detection. Accepts either str or int; serialised as string to the API.
  • client APIClient | None: Optional API client.

Returns

Raises

  • APIError: On HTTP error, including 409 when current_snapshot_id mismatches.