Prerequisites
Before proceeding, ensure the following prerequisites are met:- Install MindsDB locally via Docker or use MindsDB Cloud.
- To connect Weaviate to MindsDB, install the required dependencies following this instruction.
- Install or ensure access to Weaviate.
Implementation
This handler usesweaviate-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 storage
Creating connection
In order to make use of this handler and connect to a Weaviate server in MindsDB, the following syntax can be used:Dropping connection
To drop the connection, use this commandCreating tables
To insert data from a pre-existing table, useCREATE
Dropping collections
To drop a Weaviate table use this commandQuerying and selecting
To query database using a search vector, you can usesearch_vector
or embeddings
in WHERE
clause
WHERE
clause on dynamic fields like normal SQL
Deleting records
You can delete entries usingDELETE
just like in SQL.