Generate SQL that match a set of records by decomposing decision trees
- User doesn't want to write SQL.
- User uploads CSV to inversql streamlit app
- User selects cells (that will be selected by the SQL).
- We overfit a
scikit-learnbinary decision tree on the data. - We decompose the tree, convert to boolean logic (explainable AI part).
- We simplify the logic with
sympy. - Generate SQL from previous steps (joins to JOIN and boolean to WHERE).
- User sees the SQL.
- User is happy.
| 🎬 Demo in a GIF | 🏛️ Architecture diagram |
|---|---|
|
|
|
🏎️ Performance
For each individual SQL query candidate (the shortest one is displayed in the UI), we need to retrain a new decision tree.
But... The decision tree fitting is honestly fast, don't worry about this.
🌟 Give us a star!
That's pretty much it!
If you have read this far, please consider giving me a star (⭐) or a fork (🍴).
This will keep my motivation going!
Or if you have too much cash at hand:
If you REALLY like my work, nowadays I'm working on
aioway, it's an optimizing compiler approach to deep learning, check it out!
👨👨👦👦 Contributors
Contribution welcome!
To contribute, refer to CONTRIBUTING.md, and our CODE_OF_CONDUCT.md.
🎨 Inspiration.
Inspired by regexgen's process. Instead of regex we do SQL. Instead of selecting text we do select records. Decision tree is my inspiration tho.
Metadata
Release files for inversql 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| inversql-0.1.0.tar.gz | 20.0 kB | Without provenance | Details for inversql-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| inversql-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for inversql-0.1.0-py3-none-any.whl |
Total release size: 37.6 kB
Release files / inversql-0.1.0.tar.gz
| Download URL | inversql-0.1.0.tar.gz |
|---|---|
| Size | 20.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
152f1ee5fa74c74489b3bf18d7ff522bca758807e239acf9224a0669f3b41209
|
|
BLAKE2b-256 checksum How to use checksums |
183e603698a6b8b957c5a04fa3458a60d8bdb339b460f6381e8ea71e07999d50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.27.0 CPython/3.14.5 Linux/6.17.0-1015-azure
|
Release files / inversql-0.1.0-py3-none-any.whl
| Download URL | inversql-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8426d19b59e82537879f7be7517599e545d2c6416d0b470b2d1acba7997acdb0
|
|
BLAKE2b-256 checksum How to use checksums |
18f2cecb50a750af8777a9f51837b687f2a33b9772f1cbfc824fb2728b8dd0a8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
pdm/2.27.0 CPython/3.14.5 Linux/6.17.0-1015-azure
|
Security for inversql 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.