File size: 1,699 Bytes
12eff8e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 | ---
title: MorphSQL
emoji: 🧬
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: "5.49.1"
python_version: "3.11"
app_file: app.py
pinned: true
license: apache-2.0
short_description: Convert SQL to pandas, PySpark, warehouses, or dbt
tags:
- sql
- pandas
- pyspark
- code
- data-science
- machine-learning
- feature-extraction
- snowflake
- dbt
- data-engineering
models:
- dgvj-work/morphsql
datasets:
- dgvj-work/vertica-snowflake-pairs
suggested_hardware: cpu-basic
---
# MorphSQL
Convert warehouse SQL → **pandas**, **PySpark**, Snowflake, BigQuery, or **dbt** — then **download** the result.
Package / CLI / Hub: `morphsql` · Space: [dgvj-work/morphsql](https://huggingface.co/spaces/dgvj-work/morphsql)
## How to use (30 seconds)
1. Open the **Convert** tab
2. Pick source dialect + **Convert to** target
3. Load an example, paste SQL, or **upload** a `.sql` / `.zip`
4. Click **Convert** or **Upload & Convert → Download**
5. Download the `.py` / `.sql` / `.zip` to your machine
| Target | Download |
|--------|----------|
| pandas / PySpark | `.py` ready for notebooks / Databricks |
| Snowflake / BigQuery | `.sql` |
| dbt | `.txt` project preview (or zip for batches) |
## Python API
```python
from morphsql.ai import pipeline
out = pipeline("sql-migration")(
"SELECT COALESCE(a, 0) FROM t",
source="snowflake",
target="pandas", # or "pyspark", "snowflake", "bigquery", "dbt-snowflake"
)
print(out["converted_sql"][:500])
```
## More tab
Object risk assess · repo workbench · ML feature SQL · copilot · dialect notes · offline eval
Author: Digvijay Waghela · Apache-2.0 · [GitHub](https://github.com/dgvj-work/morphsql)
|