maxframe.liteframe.LiteFrame.to_lance#

LiteFrame.to_lance(path, *, mode='overwrite', on=None, left_on=None, right_on=None, schema=None, storage_options=None, **kwargs)#

Write a LiteFrame to a Lance dataset.

Parameters:
  • path (str) – Target path for the Lance dataset. Supports local, OSS, and S3 URIs.

  • mode ({'overwrite', 'append', 'merge'}, default 'overwrite') – Write mode. ‘merge’ updates existing rows and/or adds new columns in the target dataset by aligning on a join key.

  • on (str, optional) – Column name to align both sides on. Mutually exclusive with left_on/right_on. Defaults to ‘_rowaddr’ when mode=’merge’.

  • left_on (str, optional) – Column name in the existing dataset to align on. Mutually exclusive with on.

  • right_on (str, optional) – Column name in the new data to align on. Mutually exclusive with on.

  • schema (pyarrow.Schema, optional) – PyArrow schema to override auto-detected column types for columns being written from the input. For mode='overwrite'/'append' this overrides types of input columns (columns not specified keep their auto-detected types). For mode='merge' the existing dataset schema is always respected first: fields naming existing dataset columns are ignored and those columns keep their stored types, so schema= only sets types for newly added columns.

  • storage_options (dict, optional) – Storage connection options.

  • **kwargs – Additional keyword arguments passed to lance.

Returns:

A stub LiteFrame for execution.

Return type:

LiteFrame

See also

read_lance

Read a Lance dataset into a LiteFrame.

to_parquet

Write a LiteFrame to a Parquet file.