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/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>
7 months ago
..
parsers infra: add print rule to ruff (#16221) 7 months ago
__init__.py
test_arxiv.py infra: add print rule to ruff (#16221) 7 months ago
test_astradb.py community[patch]: Use astrapy built-in pagination prefetch in AstraDBLoader (#17569) 7 months ago
test_bigquery.py
test_bilibili.py
test_blockchain.py infra: add print rule to ruff (#16221) 7 months ago
test_cassandra.py community: Fix some mypy types in cassandra doc loader (#17570) 7 months ago
test_confluence.py
test_couchbase.py infra: add print rule to ruff (#16221) 7 months ago
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) 7 months ago
test_github.py community[patch]: Add Pagination to GitHubIssuesLoader for Efficient GitHub Issues Retrieval (#16934) 7 months ago
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) 7 months ago
test_polars_dataframe.py
test_pubmed.py infra: add print rule to ruff (#16221) 7 months ago
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) 7 months ago
test_stripe.py
test_telegram.py infra: add print rule to ruff (#16221) 7 months ago
test_tensorflow_datasets.py
test_tidb.py community[minor]: Add tidb loader support (#17788) 7 months ago
test_tsv.py
test_unstructured.py community[patch]: Load list of files using UnstructuredFileLoader (#16216) 8 months ago
test_url.py
test_url_playwright.py
test_whatsapp_chat.py
test_wikipedia.py
test_xml.py
test_xorbits.py