Weaviate
Weaviate is an open-source vector database. It allows you to store data objects and perform similarity searches over them. This destination helps you load data into Weaviate from dlt resources.
The Weaviate destination uses the weaviate-client v4 Python library.
Destination capabilities
The following table shows the capabilities of the Weaviate destination:
| Feature | Value | More |
|---|---|---|
| Preferred loader file format | jsonl | File formats |
| Supported loader file formats | jsonl | File formats |
| Has case sensitive identifiers | False | Naming convention |
| Supported merge strategies | upsert | Merge strategy |
| Supported replace strategies | truncate-and-insert | Replace strategy |
| Supports tz aware datetime | True | Timestamps and Timezones |
| Supports naive datetime | False | Timestamps and Timezones |
This table shows the supported features of the Weaviate destination in dlt.
Setup guide
- To use Weaviate as a destination, make sure dlt is installed with the 'weaviate' extra:
pip install "dlt[weaviate]"
- Next, configure the destination in the dlt secrets file. The file is located at
~/.dlt/secrets.tomlby default. Add the following section to the secrets file:
[destination.weaviate]
connection_type = "cloud" # or "local" or "custom"
[destination.weaviate.credentials]
url = "https://your-weaviate-url"
api_key = "your-weaviate-api-key"
[destination.weaviate.credentials.additional_headers]
X-OpenAI-Api-Key = "your-openai-api-key"
In this setup guide, we are using the Weaviate Cloud Services to get a Weaviate instance and OpenAI API for generating embeddings through the text2vec-openai module.
You can host your own Weaviate instance using Docker Compose, Kubernetes, or embedded. Refer to Weaviate's How-to: Install or dlt recipe we use for our tests. In that case, you can skip the credentials part altogether:
[destination.weaviate.credentials.additional_headers]
X-OpenAI-Api-Key = "your-openai-api-key"
The url will default to http://localhost:8080 and api_key is not defined - which are the defaults for the Weaviate container.