Giter VIP home page Giter VIP logo

smart-query's Introduction

Smart Query

Smart Query integrates a database and a LLM, and provides a set of APIs to interact with them.

Server Scripts

Must be run inside ./server directory. On Python 3.9.16 or higher.

Activate Server Environment

source ./activate.sh

Activate would setup & activate a Python venv, install requirements and set PYTHONPATH environment variable.

Start Server

venv must be active before running the server.

uvicorn --app-dir ./src app:app --reload

Server would start running on http://127.0.0.1:8000.

Deactivate Server Environment

deactivate

Update requirements.txt

pip freeze > requirements.txt

Must be run after adding a new pip dependency.

Connection test

After activating the server, run the following to test Hive connection. It would quickly check if all the activation steps went fine.

cd sample_dbs/model_store/test/
python test_hive_connection.py

Linux Prerequisites

Install Python 3.9.16 - https://computingforgeeks.com/install-latest-python-on-centos-linux/

alias python=/usr/local/bin/python3.9
alias pip=/usr/local/bin/pip3.9
yum install cyrus-sasl-devel

UI Scripts

Must be run inside ./ui directory.

Start Server

npm start

UI would be started in dev mode on port 3000, and you can now view it in the browser at http://localhost:3000.

Samples DBs

Smart Query comes with a set of sample databases that includes both schema and data for various dialects to try out the features.

  1. Model Store - Hive, MySQL

smart-query's People

Contributors

sreenaths avatar

Watchers

 avatar  avatar

smart-query's Issues

Sample DB - Model store

This sample provides the schema and data of a database used by a store selling miniature replica models. The database is named model_store and has 8 tables.

Impala dialect

For the time being, we will copy Impyla and customize the code in smart-query. Later on, the changes can be submitted back to the Impyla project.

Activation script

Activate script would setup & activate a Python venv, install requirements, and set the PYTHONPATH environment variable.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.