Skip to main content

Text2SQL

How many times have you pulled your hair apart writing a SQL query, now use natural language to convert to appropriate SQL and save your precious hair.

Though this can be used as a standalone package, I highly recommend that you use streamlit to play with the model interactively, to run it interactively

streamlit run t2s.py

Installation

To install this repo clone it then run setup.py

git clone https://github.com/yashbonde/text2sql.git
cd text2sql/
pip3 install -e . #text2sql

Parsing

New method of parsing to convert each DB to a graph network, red denotes foreign keys.

Trainer File

Simple trainer file.

Datasets

Using CoSQL, Spider, Sparc datasets, credit to the authors. There are a couple of things to note, we have in total 178 tables, but only 166 tables in training date and dev set has 20 tables.

License

Following are the licensing things:

  1. I am releasing my part of code under MIT License
  2. transformers code is under Apache License, Version 2.0

Release files for text2sql 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for text2sql 0.1.1
File Size Uploaded
text2sql-0.1.1.tar.gz 2.9 kB Details

Release files / text2sql-0.1.1.tar.gz

Download URL text2sql-0.1.1.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
43ff3195b05ed31a6c1a8768032a5c7764a57bdbe4ebad8845d066a7d346c77b
BLAKE2b-256 checksum
How to use checksums
2d60ceb603a3c814f8f96156eaa87b6fc67ac39c1460d77ce02fb0bddb75a0d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.1.1 This release

1 release file

0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page