Interactive DuckDB SQL editor in Gradio #5
liquidcarbon
started this conversation in
Show & Tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I built a SQL editor in Gradio for querying local or web data with DuckDB.
https://huggingface.co/spaces/liquidcarbon/duckdb-fastapi-gradio
Features:
It's almost a mini-Athena/BigQuery. Supply the container with keys to your S3-compatible buckets, and you've got a web interface to your data.
Gradio is mainly used for building UI for ML apps, but it's an underappreciated general-purpose tool for python-on-the-web projects. Compared to Streamlit (tornado backend), I think Gradio has a huge advantage in being able to plug it into an existing FastAPI infrastructure. There are pros and cons: on the one hand you've got a monolithic app, on the other, you don't have to maintain multiple backends.
Along the continuum of APIs - dashboards - BI tools - full IDE (such as Jupyter notebook), this kind of app sits right before the the "full IDE" stage, as it allows programmatic construction of any kind of queries without bothering with imports and connections and other boilerplate. I'm using almost the exact same app with one of my clients for querying local data warehouse with ~1B data elements. I define table aliases that include globbed paths, write starter queries, share the links, and the users can modify them to get exactly what they want.
LI: https://www.linkedin.com/posts/alekis_sql-ml-fastapi-activity-7190458906291179520-EXda
DuckDB Show & Tell duckdb/duckdb#11864
Beta Was this translation helpful? Give feedback.
All reactions