Ian
|
3019a594b7
|
community[minor]: Add tidb loader support (#17788)
This pull request support loading data from TiDB database with
Langchain.
A simple usage:
```
from langchain_community.document_loaders import TiDBLoader
CONNECTION_STRING = "mysql+pymysql://root@127.0.0.1:4000/test"
QUERY = "select id, name, description from items;"
loader = TiDBLoader(
connection_string=CONNECTION_STRING,
query=QUERY,
page_content_columns=["name", "description"],
metadata_columns=["id"],
)
documents = loader.load()
print(documents)
```
|
2024-02-21 16:42:33 -08:00 |
|