Skip to main content

Module data_api

Module data_api 

Source

Enums§

AlterTableAddColumnsError
struct for typed errors of method alter_table_add_columns
AlterTableBackfillColumnsError
struct for typed errors of method alter_table_backfill_columns
AnalyzeTableQueryPlanError
struct for typed errors of method analyze_table_query_plan
CountTableRowsError
struct for typed errors of method count_table_rows
CreateMaterializedViewError
struct for typed errors of method create_materialized_view
CreateTableError
struct for typed errors of method create_table
DeleteFromTableError
struct for typed errors of method delete_from_table
ExplainTableQueryPlanError
struct for typed errors of method explain_table_query_plan
InsertIntoTableError
struct for typed errors of method insert_into_table
MergeInsertIntoTableError
struct for typed errors of method merge_insert_into_table
QueryTableError
struct for typed errors of method query_table
RefreshMaterializedViewError
struct for typed errors of method refresh_materialized_view
UpdateTableError
struct for typed errors of method update_table

Functions§

alter_table_add_columns
Add new columns to table id using SQL expressions or default values.
alter_table_backfill_columns
Trigger an asynchronous backfill job for a computed column on table id. The column must be a virtual (UDF-backed) column. Returns a job ID for tracking.
analyze_table_query_plan
Analyze the query execution plan for a query against table id. Returns detailed statistics and analysis of the query execution plan. REST NAMESPACE ONLY REST namespace returns the response as a plain string instead of the AnalyzeTableQueryPlanResponse JSON object.
count_table_rows
Count the number of rows in table id REST NAMESPACE ONLY REST namespace returns the response as a plain integer instead of the CountTableRowsResponse JSON object.
create_materialized_view
Create a materialized view at identifier id. The view may be query-backed, UDTF-backed, or chunker-backed, controlled by the kind discriminator.
create_table
Create table id in the namespace with the given data in Arrow IPC stream. The schema of the Arrow IPC stream is used as the table schema. If the stream is empty, the API creates a new empty table. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the CreateTableRequest information in the following way: - id: pass through path parameter of the same name - mode: pass through query parameter of the same name - properties: serialize as a single JSON-encoded query parameter such as properties={\"user\":\"alice\",\"team\":\"eng\"}; these are business logic properties managed by the namespace implementation outside Lance context - storage_options: serialize as a single JSON-encoded query parameter such as storage_options={\"aws_region\":\"us-east-1\",\"timeout\":\"30s\"}; these configure write-time overrides for data and metadata written during table creation
delete_from_table
Delete rows from table id.
explain_table_query_plan
Get the query execution plan for a query against table id. Returns a human-readable explanation of how the query will be executed. REST NAMESPACE ONLY REST namespace returns the response as a plain string instead of the ExplainTableQueryPlanResponse JSON object.
insert_into_table
Insert new records into table id. For tables that have been declared but not yet created on storage (is_only_declared=true), this operation will create the table with the provided data. REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the InsertIntoTableRequest information in the following way: - id: pass through path parameter of the same name - mode: pass through query parameter of the same name
merge_insert_into_table
Performs a merge insert (upsert) operation on table id. This operation updates existing rows based on a matching column and inserts new rows that don’t match. It returns the number of rows inserted and updated. For tables that have been declared but not yet created on storage (is_only_declared=true), this operation will create the table with the provided data (since there are no existing rows to merge with). REST NAMESPACE ONLY REST namespace uses Arrow IPC stream as the request body. It passes in the MergeInsertIntoTableRequest information in the following way: - id: pass through path parameter of the same name - on: pass through query parameter of the same name - when_matched_update_all: pass through query parameter of the same name - when_matched_update_all_filt: pass through query parameter of the same name - when_not_matched_insert_all: pass through query parameter of the same name - when_not_matched_by_source_delete: pass through query parameter of the same name - when_not_matched_by_source_delete_filt: pass through query parameter of the same name
query_table
Query table id with vector search, full text search and optional SQL filtering. Returns results in Arrow IPC file or stream format. REST NAMESPACE ONLY REST namespace returns the response as Arrow IPC file binary data instead of the QueryTableResponse JSON object.
refresh_materialized_view
Trigger an asynchronous refresh job for materialized view id. Returns a job ID for tracking.
update_table
Update existing rows in table id.