llama-index readers clickhouse integration
Project description
LlamaIndex Readers Integration: ClickHouse
Overview
ClickHouse Reader is a tool designed to retrieve documents from ClickHouse databases efficiently.
Installation
You can install ClickHouse Reader via pip:
pip install llama-index-readers-clickhouse
Usage
from llama_index.core.schema import Document
from llama_index.readers.clickhouse import ClickHouseReader
# Initialize ClickHouseReader with the connection details and configuration
reader = ClickHouseReader(
clickhouse_host="<ClickHouse Host>",
username="<Username>",
password="<Password>",
clickhouse_port=8123, # Optional: Default port is 8123
database="<Database Name>",
engine="MergeTree", # Optional: Default engine is "MergeTree"
table="<Table Name>",
index_type="NONE", # Optional: Default index type is "NONE"
metric="cosine", # Optional: Default metric is "cosine"
batch_size=1000, # Optional: Default batch size is 1000
index_params=None, # Optional: Index parameters
search_params=None, # Optional: Search parameters
)
# Load data from ClickHouse
documents = reader.load_data(
query_vector=[0.1, 0.2, 0.3], # Query vector
where_str=None, # Optional: Where condition string
limit=10, # Optional: Number of results to return
)
This loader is designed to be used as a way to load data into LlamaIndex and/or subsequently used as a Tool in a LangChain Agent.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for llama_index_readers_clickhouse-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67aca1c2c67844b4a3783570848b6dd482e3532fe1f85167eed14e9b2026bc68 |
|
MD5 | d8d09d7d0248895e7e960febcd04d0aa |
|
BLAKE2b-256 | 01af5d90935dffd053a5039d5272d9386f4429d46055ee2f82b4a2b921475e2f |
Close
Hashes for llama_index_readers_clickhouse-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07362f08dc18458d92b9a0abb29e9bca92791784bcceb294f7a0487f84173c67 |
|
MD5 | d4dd8a4a250f9f0675dfb0d84dffe285 |
|
BLAKE2b-256 | 41669374b60eda9b06301b085bebb9d431ff0780dbd7913d9a7900364b793bf2 |