An open API service indexing awesome lists of open source software.

https://github.com/veeeetzzzz/langchain-sql-db-examples


https://github.com/veeeetzzzz/langchain-sql-db-examples

database mysql postgresql sql

Last synced: 3 months ago
JSON representation

Awesome Lists containing this project

README

          

# Langchain SQL database examples

Examples of how to use Langchain to connect to mySQL/PostgreSQL databases - use these to interact with your database & load data.

This Python script connects to a mySQL/PostgreSQL database and imports a specified table. Error messages will confirm once you connect to database and how many rows it was able to select from the table.

# Usage

These will all be in Python - so download the script you want to use, update the file with your DB type and connection information and then navigate to the directory it's stored in via CMD/PowerShell/Terminal and run:

`python connect.py`

Output should look like this:

![image](https://user-images.githubusercontent.com/40268197/235700771-7eaf27ea-dcfd-4b11-b66e-727bc7f8f1a1.png)