Skip to content
/ chatDB Public

ChatDB is a program designed to generate PostgreSQL queries based on an inserted csv/excel file and natural language questions. The program is designed to aid introductory SQL users in learning the basic commands of SQL.

Notifications You must be signed in to change notification settings

krokane/chatDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ChatDB

ChatDB is a program designed to replicate simple tasks of the ChatGPT chatbot, specifically in regards to a dataset inserted into the program. The program is a beginner’s tool to understanding SQL querying of a database, allowing for five main functionalities – uploading a data table to a PostgreSQL database, understanding a data table through looking at metadata, looking at example SQL queries of that table to understand basic SQL clauses, asking natural language questions of that data table, and ultimately using the provided SQL queries to pull specific data from the database.

Required Packages

argparse , logging , nltk , pandas , psycopg2 , os , random , re , sys , time , collections , sqlalchemy

These packages can be installed using pip in your command line (example syntax: pip install pandas)

To run the program:

Navigate to your chatDB.py file using cd in the command line (example syntax: cd desktop/dsci551).

Input python chatDB.py into your command line to run the program.

If you have a local PostgreSQL instance running, you can connect to it using the command line argument: --postgres_connection {your_connection_string}.

About

ChatDB is a program designed to generate PostgreSQL queries based on an inserted csv/excel file and natural language questions. The program is designed to aid introductory SQL users in learning the basic commands of SQL.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages