def Collection.ingest( data: IngestionData, allow_existing: bool = True, *, show_progress: bool | Callable[[float], None] = False,) -> list[UUID]Ingest data into a collection.
Parameters
Section titled “Parameters”data IngestionData The data to ingest.
Supported IngestionData data types are:
- An iterable of mappings, with one mapping per datapoint.
- A mapping from field names to ordered sequences,
numpy.ndarrayobjects, orpandas.Seriesobjects. - A
pandas.DataFrame, with column names mapped to dataset fields. - An
xarray.Dataset, with variables and coordinates mapped to dataset fields.
A mapping is always interpreted as column-oriented data. Wrap a single record in an iterable, such as [record].
Every datapoint must include time. Tilebox generates id and ingestion_time. Missing optional values leave their corresponding fields unset.
allow_existing bool Datapoint fields are used to generate a deterministic unique UUID for each
datapoint in a collection. Duplicate data points result in the same ID being generated.
If allow_existing is True, ingest will skip those data points, since they already exist.
If allow_existing is False, ingest will raise an error if any of the generated datapoint IDs already exist.
Defaults to True.
show_progress bool | Callable[[float], None] If True, display a progress bar while ingesting many datapoints. You can also pass a callback to receive progress values between 0 and 1. Defaults to False.
Returns
Section titled “Returns”List of datapoint IDs that were ingested, including the IDs of existing data points in case of duplicates and
allow_existing=True.
Errors
Section titled “Errors”ArgumentError found existing datapoints with same id If allow_existing is False and any of the datapoints attempting to ingest already exist.