https://github.com/willf/sql-transpiler
Using sql glot to transpile code
https://github.com/willf/sql-transpiler
Last synced: about 1 year ago
JSON representation
Using sql glot to transpile code
- Host: GitHub
- URL: https://github.com/willf/sql-transpiler
- Owner: willf
- Created: 2022-12-31T17:51:06.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-31T17:51:13.000Z (over 3 years ago)
- Last Synced: 2025-03-24T12:52:26.022Z (about 1 year ago)
- Language: Python
- Size: 29.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: contributing.md
- Code of conduct: code-of-conduct.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# SQL Transpiler
Convert from one SQL dialect to another, using the sqlglot library.
```bash
❯ script/transpile --help
usage: transpile [-h] [-f FROM_DIALECT] [--pretty] to_dialect
positional arguments:
to_dialect target dialect. Must be one of: bigquery, clickhouse, databricks, drill, duckdb, hive,
mysql, oracle, postgres, presto, redshift, snowflake, spark, sqlite, starrocks,
tableau, trino, tsql
options:
-h, --help show this help message and exit
-f FROM_DIALECT, --from_dialect FROM_DIALECT
target dialect. Defaults to 'guess'
--pretty pretty print
```
---
## Installation
1. You must have Poetry installed, and a version of Python 3.6 or higher.
2. You should clone this repository.
3. Run `poetry install` to install the dependencies.
## Usage
1. Run `poetry shell` to enter the virtual environment.
2. Run `script/transpile` to see the usage information.
## Contributing
We welcome contributions. Please see our [contributing guidelines](contributing.md) for more information.
## Code of Conduct
We expect project participants to adhere to our [Code of Conduct](code-of-conduct.md).