Home Applications sqlzilla

sqlzilla

This application is not supported by InterSystems Corporation. Please be notified that you use it at your own risk.
5
2 reviews
2
Awards
355
Views
0
IPM installs
1
2
Details
Releases
Reviews  (2)
Awards  (2)
Issues
Videos  (1)
Articles  (8)
SQLzilla is designed to simplify SQL query generation

What's new in this version

  • Code refactoring
  • Storing examples in a table
  • Button for adding examples
  • Initial examples for sample schemas
  • SQL execution error handling

License: MIT

SQLzilla

SQLzilla leverages the power of Python and AI to simplify data access through natural language SQL query generation, bridging the gap between complex data queries and users with minimal programming experience.

SQLZilla made by AI
SQLZilla screenshot

Description

SQLzilla is an innovative project that transforms the way users interact with databases. By integrating with InterSystems IRIS, we’ve crafted a tool that allows even those unfamiliar with SQL to effortlessly extract and analyze data across various tables.

Our solution is designed to democratize data access, enabling users from diverse backgrounds—whether they be business analysts, managers, or educational professionals—to harness the full potential of data without the need to master technical query languages. Additionally, SQLzilla offers experienced users the ability to accelerate their workflow, enhancing productivity through its intuitive interface and powerful AI-driven capabilities.

We believe SQLzilla is not just a tool, but a movement towards more inclusive and empowered data interaction. Our project is rooted in the philosophy that access to data should be straightforward and barrier-free, opening up opportunities for more informed decision-making and innovative insights in organizations of all sizes.

We hope that SQLzilla serves as a catalyst for change, making data more accessible than ever and inspiring a new wave of users to engage with technology in meaningful ways.

Join us in redefining data interaction and expanding the possibilities of what we can achieve with information at our fingertips.

Prerequisites

Ensure you have Git and Docker Desktop installed.

Installation

Setting an LLM API Key

To utilize the Large Language Model (LLM) service, you’ll need an API key. Currently, the project supports OpenAI’s LLM service.

Obtain your OpenAI API key by creating an account on their platform.

Configuring Environment Variables

Environment variables are used to store sensitive information like API keys and tokens. These variables need to be set before building the Docker image.

There are two ways to configure these variables:

When launching the Docker container, you can set the OPENAI_KEY environment variable using the -e flag:

# OpenAI API key
export OPENAI_KEY=$OPENAI_KEY

Docker

Clone the repository into any local directory:

$ git clone https://github.com/musketeers-br/sqlzilla.git

Open the terminal in this directory and run:

$ docker-compose build --no-cache --progress=plain
$ docker-compose up -d

Without Docker

  1. Clone this repository.
  2. Install dependencies: pip install -r python/sqlzilla/requirements.txt
  3. Run the app: streamlit run python/sqlzilla/app.py

How to Use It

Jupyter Notebook Version

  1. Add a .env file with the API key.
  2. Go to http://localhost:29999/.

Web Version

  1. Go to http://localhost:8501/.
  2. Enter your OpenAI API key for the AI assistant you also can add a .env file with the API key.
  3. Configure the database connection details (default configuration for docker user).
  4. Write SQL queries in the editor or chat window.
  5. Click “Execute” to run queries and see results.

Some prompts you can try:

  • For ‘Aviation’ schema:
    • what was the most deadly year?
    • incident histogram by month/year
  • For ‘HoleFoods’ schema:
    • income by group
    • most sold foods
    • sales by product
    • sales by product and category

See in action

https://github.com/user-attachments/assets/b85e16fb-fd3a-4f7c-80a4-72841834e27e

YouTube short in action

Dream Team

Our team is a group of passionate individuals dedicated to tackling complex challenges and slaying metaphorical giants (think Godzilla, not spreadsheets)

Musketeers tokusatsu style

Made with
Version
1.0.316 Aug, 2024
Category
Solutions
Works with
InterSystems IRIS
First published
28 Jul, 2024