langchain/libs/community/tests/unit_tests
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>
2024-02-28 21:02:28 +00:00
..
agent_toolkits community[minor]: CogniSwitch Agent Toolkit for LangChain (#17312) 2024-02-19 10:54:13 -08:00
callbacks community[minor] : adds callback handler for Fiddler AI (#17708) 2024-02-25 18:17:03 -08:00
chat_loaders Restore self message sent before OSX 12 Monterey (#14818) 2024-01-01 16:04:14 -08:00
chat_message_histories community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
chat_models community[minor]: add Kinetica LLM wrapper (#17879) 2024-02-22 16:02:00 -08:00
docstore community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
document_loaders community[minor]: Add SQLDatabaseLoader document loader (#18281) 2024-02-28 21:02:28 +00:00
document_transformers community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
embeddings community: Add Laser Embedding Integration (#18111) 2024-02-26 12:16:37 -08:00
examples community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
graphs community[minor], langchian[minor]: Add Neptune Rdf graph and chain (#16650) 2024-02-12 21:30:20 -08:00
indexes community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
llms community: Bugfix - correct Ollama API path to avoid HTTP 307 (#17895) 2024-02-22 11:59:55 -05:00
retrievers community[feat]: Adds LLMLingua as a document compressor (#17711) 2024-02-27 19:23:56 -08:00
storage add mongodb_store (#13801) 2024-02-13 22:33:22 -05:00
tools community: Add PolygonTickerNews Tool (#17808) 2024-02-20 10:15:29 -08:00
utilities community[patch]: Allow override of 'fetch_schema_from_transport' in the GraphQL tool (#17649) 2024-02-21 15:32:43 -08:00
utils community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
vectorstores Langchain vectorstore integration with Kinetica (#18102) 2024-02-26 12:46:48 -08:00
__init__.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
conftest.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
test_dependencies.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00
test_imports.py infra: Fix test filesystem paths incompatible with windows (#14388) 2023-12-21 13:45:42 -08:00
test_sql_database_schema.py infra: mv SQLDatabase tests to community (#17276) 2024-02-08 17:05:43 -08:00
test_sql_database.py community/SQLDatabase: Generalize and trim software tests (#16659) 2024-02-12 22:58:34 -05:00
test_sqlalchemy.py community[major], core[patch], langchain[patch], experimental[patch]: Create langchain-community (#14463) 2023-12-11 13:53:30 -08:00