Skip to main content

aip_sdk.insert_rows

aip_sdk.insert_rows(dataset_id: str, rows: list[dict[str, Any]], current_snapshot_id: str | int | None = None, client: APIClient | None = None) -> list[dict[str, Any]]

Insert new rows into a dataset.

Parameters

  • dataset_id str: Dataset ID.
  • rows list[dict[str, Any]]: List of row dicts (excluding _row_id, which is auto-generated).
  • 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

  • list[dict[str, Any]]: Inserted rows, each including the auto-generated _row_id.

Raises

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