This is the implementation of the Weaviate for MindsDB.
Weaviate is an open-source vector database. It allows you to store data objects and vector embeddings from your favorite ML-models, and scale seamlessly into billions of data objects.
Before proceeding, ensure the following prerequisites are met:
This handler uses weaviate-client
python library connect to a weaviate instance.
The required arguments to establish a connection are:
weaviate_url
: url of the weaviate databaseweaviate_api_key
: API key to authenticate with weaviate (in case of cloud instance).persistence_directory
: directory to be used in case of local storageIn order to make use of this handler and connect to a Weaviate server in MindsDB, the following syntax can be used:
To drop the connection, use this command
To insert data from a pre-existing table, use CREATE
As weaviate currently doesn’t support json field. So, this creates another table for the “metadata” field and a reference is created in the original table which points to its metadata entry.
Weaviate follows GraphQL conventions where classes (which are table schemas) start with a capital letter and properties start with a lowercase letter.
So whenever we create a table, the table’s name gets capitalized.
To drop a Weaviate table use this command
To query database using a search vector, you can use search_vector
or embeddings
in WHERE
clause
Basic query
You can use WHERE
clause on dynamic fields like normal SQL
You can delete entries using DELETE
just like in SQL.
Update is not supported by mindsdb vector database