You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/community/langchain_community
Eugene Yurtsev cd52433ba0
community[minor]: Add `SQLDatabaseLoader` document loader (#18281)
- **Description:** A generic document loader adapter for SQLAlchemy on
top of LangChain's `SQLDatabaseLoader`.
  - **Needed by:** https://github.com/crate-workbench/langchain/pull/1
  - **Depends on:** GH-16655
  - **Addressed to:** @baskaryan, @cbornet, @eyurtsev

Hi from CrateDB again,

in the same spirit like GH-16243 and GH-16244, this patch breaks out
another commit from https://github.com/crate-workbench/langchain/pull/1,
in order to reduce the size of this patch before submitting it, and to
separate concerns.

To accompany the SQLAlchemy adapter implementation, the patch includes
integration tests for both SQLite and PostgreSQL. Let me know if
corresponding utility resources should be added at different spots.

With kind regards,
Andreas.


### Software Tests

```console
docker compose --file libs/community/tests/integration_tests/document_loaders/docker-compose/postgresql.yml up
```

```console
cd libs/community
pip install psycopg2-binary
pytest -vvv tests/integration_tests -k sqldatabase
```

```
14 passed
```



![image](https://github.com/langchain-ai/langchain/assets/453543/42be233c-eb37-4c76-a830-474276e01436)

---------

Co-authored-by: Andreas Motl <andreas.motl@crate.io>
6 months ago
..
adapters docs: added `community` modules descriptions (#17827) 6 months ago
agent_toolkits docs: added `community` modules descriptions (#17827) 6 months ago
callbacks community[minor] : adds callback handler for Fiddler AI (#17708) 6 months ago
chat_loaders Do not issue beta or deprecation warnings on internal calls (#15641) 8 months ago
chat_message_histories astradb: Add AstraDBChatMessageHistory to langchain-astradb package (#17732) 6 months ago
chat_models community[minor]: Add async_client for Anyscale Chat model (#18050) 6 months ago
docstore community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
document_compressors community[feat]: Adds LLMLingua as a document compressor (#17711) 6 months ago
document_loaders community[minor]: Add `SQLDatabaseLoader` document loader (#18281) 6 months ago
document_transformers community[minor]: Adding asynchronous function implementation for Doctran (#15941) 7 months ago
embeddings community: Add Laser Embedding Integration (#18111) 6 months ago
example_selectors docs: added `community` modules descriptions (#17827) 6 months ago
graphs community[patch]: Fix GraphSparqlQAChain so that it works with Ontotext GraphDB (#15009) 6 months ago
indexes community: Add document manager and mongo document manager (#17320) 6 months ago
llms community[patch]: Remove model limitation on Anyscale LLM (#17662) 6 months ago
output_parsers langchain[patch], community[minor]: move `output_parsers.ernie_functions` (#16057) 7 months ago
retrievers community[patch]: fix llama index imports and fields access (#17870) 6 months ago
storage docs: Add docstring to AstraDBStore (#17793) 6 months ago
tools community[patch]: added latin-1 decoder to gmail search tool (#18116) 6 months ago
utilities community[patch]: Fix GenericRequestsWrapper _aget_resp_content must be async (#18065) 6 months ago
utils Add the BQ job usage tracking from LangChain (#17123) 6 months ago
vectorstores community[patch]: BigQueryVectorSearch JSON type unsupported for metadatas (#18234) 6 months ago
__init__.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago
cache.py community[patch]: Graceful handling of redis errors in RedisCache and AsyncRedisCache (#17171) 6 months ago
py.typed community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 9 months ago