Skip to content

VectorSearchIndex

laktory.models.resources.databricks.VectorSearchIndex ¤

Bases: VectorSearchIndexBase

Databricks Vector Search Index

Examples:

import io

from laktory import models

index_yaml = '''
name: dev.finance.market_news_vs_index
primary_key: id
endpoint_name: default
index_type: DELTA_SYNC
delta_sync_index_spec:
  source_table: dev.finance.market_news
  embedding_vector_columns:
  - name: embedding
    embedding_dimension: 4095
  pipeline_type: TRIGGERED
'''
index = models.resources.databricks.VectorSearchIndex.model_validate_yaml(
    io.StringIO(index_yaml)
)
References
BASE DESCRIPTION
delta_sync_index_spec

(object) Specification for Delta Sync Index. Required if index_type is DELTA_SYNC. This field is a block and is documented below

TYPE: VectorSearchIndexDeltaSyncIndexSpec | None | VariableType DEFAULT: None

direct_access_index_spec

(object) Specification for Direct Vector Access Index. Required if index_type is DIRECT_ACCESS. This field is a block and is documented below

TYPE: VectorSearchIndexDirectAccessIndexSpec | None | VariableType DEFAULT: None

endpoint_name

(required) The name of the Mosaic AI Vector Search Endpoint that will be used for indexing the data

TYPE: str | VariableType

index_subtype

TYPE: str | None | VariableType DEFAULT: None

index_type

(required) Mosaic AI Vector Search index type. Currently supported values are: * DELTA_SYNC: An index that automatically syncs with a source Delta Table, automatically and incrementally updating the index as the underlying data in the Delta Table changes. * DIRECT_ACCESS: An index that supports the direct read and write of vectors and metadata through our REST and SDK APIs. With this model, the user manages index updates

TYPE: str | VariableType

name

The name of the column

TYPE: str | VariableType

primary_key

(required) The column name that will be used as a primary key

TYPE: str | VariableType

timeouts

TYPE: VectorSearchIndexTimeouts | None | VariableType DEFAULT: None


laktory.models.resources.databricks.vectorsearchindex.VectorSearchIndexDeltaSyncIndexSpec ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_source_columns

(required if embedding_vector_columns isn't provided) array of objects representing columns that contain the embedding source. Each entry consists of:

TYPE: list[VectorSearchIndexDeltaSyncIndexSpecEmbeddingSourceColumns] | None | VariableType DEFAULT: None

embedding_vector_columns

(required if embedding_source_columns isn't provided) array of objects representing columns that contain the embedding vectors. Each entry consists of:

TYPE: list[VectorSearchIndexDeltaSyncIndexSpecEmbeddingVectorColumns] | None | VariableType DEFAULT: None

embedding_writeback_table

(optional) Automatically sync the vector index contents and computed embeddings to the specified Delta table. The only supported table name is the index name with the suffix _writeback_table

TYPE: str | None | VariableType DEFAULT: None

pipeline_type

Pipeline execution mode. Possible values are: * TRIGGERED: If the pipeline uses the triggered execution mode, the system stops processing after successfully refreshing the source table in the pipeline once, ensuring the table is updated based on the data available when the update started. * CONTINUOUS: If the pipeline uses continuous execution, the pipeline processes new data as it arrives in the source table to keep the vector index fresh

TYPE: str | None | VariableType DEFAULT: None

source_table

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.vectorsearchindex.VectorSearchIndexDeltaSyncIndexSpecEmbeddingSourceColumns ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_model_endpoint_name

The name of the embedding model endpoint

TYPE: str | None | VariableType DEFAULT: None

model_endpoint_name_for_query

The name of the embedding model endpoint which, if specified, is used for querying (not ingestion)

TYPE: str | None | VariableType DEFAULT: None

name

The name of the column

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.vectorsearchindex.VectorSearchIndexDeltaSyncIndexSpecEmbeddingVectorColumns ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_dimension

Dimension of the embedding vector

TYPE: int | None | VariableType DEFAULT: None

name

The name of the column

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.vectorsearchindex.VectorSearchIndexDirectAccessIndexSpec ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_source_columns

(required if embedding_vector_columns isn't provided) array of objects representing columns that contain the embedding source. Each entry consists of:

TYPE: list[VectorSearchIndexDirectAccessIndexSpecEmbeddingSourceColumns] | None | VariableType DEFAULT: None

embedding_vector_columns

(required if embedding_source_columns isn't provided) array of objects representing columns that contain the embedding vectors. Each entry consists of:

TYPE: list[VectorSearchIndexDirectAccessIndexSpecEmbeddingVectorColumns] | None | VariableType DEFAULT: None

schema_json_

The schema of the index in JSON format. Check the API documentation for a list of supported data types

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.vectorsearchindex.VectorSearchIndexDirectAccessIndexSpecEmbeddingSourceColumns ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_model_endpoint_name

The name of the embedding model endpoint

TYPE: str | None | VariableType DEFAULT: None

model_endpoint_name_for_query

The name of the embedding model endpoint which, if specified, is used for querying (not ingestion)

TYPE: str | None | VariableType DEFAULT: None

name

The name of the column

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.vectorsearchindex.VectorSearchIndexDirectAccessIndexSpecEmbeddingVectorColumns ¤

Bases: BaseModel

PARAMETER DESCRIPTION
embedding_dimension

Dimension of the embedding vector

TYPE: int | None | VariableType DEFAULT: None

name

The name of the column

TYPE: str | None | VariableType DEFAULT: None


laktory.models.resources.databricks.vectorsearchindex.VectorSearchIndexTimeouts ¤

Bases: BaseModel

PARAMETER DESCRIPTION
create

TYPE: str | None | VariableType DEFAULT: None