langchain/libs/community/tests/examples/mlb_teams_2012.csv
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

848 B

1TeamPayroll (millions)Wins
2Nationals81.3498
3Reds82.2097
4Yankees197.9695
5Giants117.6294
6Braves83.3194
7Athletics55.3794
8Rangers120.5193
9Orioles81.4393
10Rays64.1790
11Angels154.4989
12Tigers132.3088
13Cardinals110.3088
14Dodgers95.1486
15White Sox96.9285
16Brewers97.6583
17Phillies174.5481
18Diamondbacks74.2881
19Pirates63.4379
20Padres55.2476
21Mariners81.9775
22Mets93.3574
23Blue Jays75.4873
24Royals60.9172
25Marlins118.0769
26Red Sox173.1869
27Indians78.4368
28Twins94.0866
29Rockies78.0664
30Cubs88.1961
31Astros60.6555