langchain/libs/community/tests/integration_tests/document_loaders
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
..
parsers infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
__init__.py
test_arxiv.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
test_astradb.py community[patch]: Use astrapy built-in pagination prefetch in AstraDBLoader (#17569) 2024-02-15 09:52:56 -05:00
test_bigquery.py
test_bilibili.py
test_blockchain.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
test_cassandra.py community: Fix some mypy types in cassandra doc loader (#17570) 2024-02-15 09:45:22 -05:00
test_confluence.py
test_couchbase.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
test_csv_loader.py
test_dataframe.py
test_docusaurus.py
test_duckdb.py
test_email.py
test_etherscan.py
test_excel.py
test_facebook_chat.py
test_fauna.py
test_figma.py
test_geodataframe.py
test_gitbook.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
test_github.py community[patch]: Add Pagination to GitHubIssuesLoader for Efficient GitHub Issues Retrieval (#16934) 2024-02-12 18:30:36 -08:00
test_google_speech_to_text.py
test_ifixit.py
test_joplin.py
test_json_loader.py
test_lakefs.py
test_language.py
test_larksuite.py
test_mastodon.py
test_max_compute.py
test_modern_treasury.py
test_news.py
test_nuclia.py
test_odt.py
test_org_mode.py
test_pdf.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
test_polars_dataframe.py
test_pubmed.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
test_pyspark_dataframe_loader.py
test_python.py
test_quip.py
test_recursive_url_loader.py
test_rocksetdb.py
test_rss.py
test_rst.py
test_sitemap.py
test_slack.py
test_spreedly.py
test_sql_database.py community[minor]: Add SQLDatabaseLoader document loader (#18281) 2024-02-28 21:02:28 +00:00
test_stripe.py
test_telegram.py infra: add print rule to ruff (#16221) 2024-02-09 16:13:30 -08:00
test_tensorflow_datasets.py
test_tidb.py community[minor]: Add tidb loader support (#17788) 2024-02-21 16:42:33 -08:00
test_tsv.py
test_unstructured.py community[patch]: Load list of files using UnstructuredFileLoader (#16216) 2024-01-23 19:37:37 -08:00
test_url_playwright.py
test_url.py
test_whatsapp_chat.py
test_wikipedia.py
test_xml.py
test_xorbits.py