indexes
Creates, updates, deletes, gets or lists an indexes
resource.
Overview
Name | indexes |
Type | Resource |
Id | databricks_workspace.vectorsearch.indexes |
Fields
The following fields are returned by SELECT
queries:
- getindex
- listindexes
Successful response with details of the index
Name | Datatype | Description |
---|---|---|
name | string | |
endpoint_name | string | |
creator | string | |
delta_sync_index_spec | object | |
index_type | string | |
primary_key | string | |
status | object |
Successful response with list of endpoints.
Name | Datatype | Description |
---|---|---|
name | string | |
endpoint_name | string | |
creator | string | |
index_type | string | |
primary_key | string |
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
getindex | select | deployment_name | Get an index. | |
listindexes | select | deployment_name | List all indexes in the given endpoint. | |
createindex | insert | deployment_name | Create a new index. | |
deleteindex | delete | deployment_name | Delete an index. | |
querynextpage | exec | deployment_name | Use | |
syncindex | exec | deployment_name | Triggers a synchronization process for a specified vector index. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
deployment_name | string | The Databricks Workspace Deployment Name (default: dbc-abcd0123-a1bc) |
SELECT
examples
- getindex
- listindexes
Get an index.
SELECT
name,
endpoint_name,
creator,
delta_sync_index_spec,
index_type,
primary_key,
status
FROM databricks_workspace.vectorsearch.indexes
WHERE deployment_name = '{{ deployment_name }}' -- required;
List all indexes in the given endpoint.
SELECT
name,
endpoint_name,
creator,
index_type,
primary_key
FROM databricks_workspace.vectorsearch.indexes
WHERE deployment_name = '{{ deployment_name }}' -- required;
INSERT
examples
- createindex
- Manifest
Create a new index.
INSERT INTO databricks_workspace.vectorsearch.indexes (
data__name,
data__endpoint_name,
data__primary_key,
data__index_type,
data__delta_sync_index_spec,
data__direct_access_index_spec,
deployment_name
)
SELECT
'{{ name }}',
'{{ endpoint_name }}',
'{{ primary_key }}',
'{{ index_type }}',
'{{ delta_sync_index_spec }}',
'{{ direct_access_index_spec }}',
'{{ deployment_name }}'
RETURNING
name,
endpoint_name,
creator,
delta_sync_index_spec,
index_type,
primary_key,
status
;
# Description fields are for documentation purposes
- name: indexes
props:
- name: deployment_name
value: string
description: Required parameter for the indexes resource.
- name: name
value: required
- name: endpoint_name
value: string
- name: primary_key
value: required
- name: index_type
value: string
- name: delta_sync_index_spec
value: object
- name: direct_access_index_spec
value: object
DELETE
examples
- deleteindex
Delete an index.
DELETE FROM databricks_workspace.vectorsearch.indexes
WHERE deployment_name = '{{ deployment_name }}' --required;
Lifecycle Methods
- querynextpage
- syncindex
Use
EXEC databricks_workspace.vectorsearch.indexes.querynextpage
@deployment_name='{{ deployment_name }}' --required
@@json=
'{
"endpoint_name": "{{ endpoint_name }}",
"page_token": "{{ page_token }}"
}';
Triggers a synchronization process for a specified vector index.
EXEC databricks_workspace.vectorsearch.indexes.syncindex
@deployment_name='{{ deployment_name }}' --required;