Name | sqlglot-cli JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | CLI wrapper around sqlglot |
upload_time | 2024-10-28 14:38:57 |
maintainer | None |
docs_url | None |
author | Michael Harris |
requires_python | <4.0,>=3.12 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# sqlglot-cli
CLI wrapper around [sqlglot](https://github.com/tobymao/sqlglot).
## Installation
```sh
pipx install sqlglot-cli
# or with sqlglotrs
pipx install 'sqlglot-cli[rs]'
# or with rich terminal
pipx install 'sqlglot-cli[rich]'
# or with both
pipx install 'sqlglot-cli[rs,rich]'
```
## Usage
> [!IMPORTANT]
> All output is written to stdout
```sh
# read from file
sqlglot-cli transpile foo.sql --read postgres --write clickhouse --pretty
# or use stdin
cat foo.sql | sqlglot-cli transpile - --read postgres --write clickhouse --pretty
# pipe to your heart's desire to incorporate into workflows
cat examples/postgres__ctes.in.sql |
sqlglot-cli optimize - -d postgres --all |
sqlglot-cli transpile - -r postgres -w snowflake |
sqlglot-cli optimize - -d snowflake --all |
sqlfluff fix - --dialect snowflake
```
Raw data
{
"_id": null,
"home_page": null,
"name": "sqlglot-cli",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": null,
"author": "Michael Harris",
"author_email": "mharris@definite.app",
"download_url": "https://files.pythonhosted.org/packages/63/ad/dc2e868dddc3ef7f0c9d5874c52e8c38bf378336859c0a813ac377afbf74/sqlglot_cli-0.1.0.tar.gz",
"platform": null,
"description": "# sqlglot-cli\n\nCLI wrapper around [sqlglot](https://github.com/tobymao/sqlglot).\n\n## Installation\n\n```sh\npipx install sqlglot-cli\n\n# or with sqlglotrs\npipx install 'sqlglot-cli[rs]'\n\n# or with rich terminal\npipx install 'sqlglot-cli[rich]'\n\n# or with both\npipx install 'sqlglot-cli[rs,rich]'\n```\n\n## Usage\n\n> [!IMPORTANT]\n> All output is written to stdout\n\n```sh\n# read from file\nsqlglot-cli transpile foo.sql --read postgres --write clickhouse --pretty\n\n# or use stdin\ncat foo.sql | sqlglot-cli transpile - --read postgres --write clickhouse --pretty\n\n# pipe to your heart's desire to incorporate into workflows\ncat examples/postgres__ctes.in.sql |\nsqlglot-cli optimize - -d postgres --all |\nsqlglot-cli transpile - -r postgres -w snowflake |\nsqlglot-cli optimize - -d snowflake --all |\nsqlfluff fix - --dialect snowflake\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "CLI wrapper around sqlglot",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f9a3f57dc7f6f639c594eb460bd55018d1d523a84bb59dec4b83012c9f88a82c",
"md5": "cf56cdacd84415b6dd501ae88e3d4f32",
"sha256": "96b3c537aa96bc4f6c570ac3e1f90fa231333f92afc68743bdd0620e5bf5cc6f"
},
"downloads": -1,
"filename": "sqlglot_cli-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cf56cdacd84415b6dd501ae88e3d4f32",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.12",
"size": 3804,
"upload_time": "2024-10-28T14:38:55",
"upload_time_iso_8601": "2024-10-28T14:38:55.280614Z",
"url": "https://files.pythonhosted.org/packages/f9/a3/f57dc7f6f639c594eb460bd55018d1d523a84bb59dec4b83012c9f88a82c/sqlglot_cli-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "63addc2e868dddc3ef7f0c9d5874c52e8c38bf378336859c0a813ac377afbf74",
"md5": "1c37b152cb79bb55b62d0620381a223b",
"sha256": "14523d6102d131d2efaed36a615842bd6948ecbffa5c3de1f98019407614ca0a"
},
"downloads": -1,
"filename": "sqlglot_cli-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "1c37b152cb79bb55b62d0620381a223b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 3282,
"upload_time": "2024-10-28T14:38:57",
"upload_time_iso_8601": "2024-10-28T14:38:57.249424Z",
"url": "https://files.pythonhosted.org/packages/63/ad/dc2e868dddc3ef7f0c9d5874c52e8c38bf378336859c0a813ac377afbf74/sqlglot_cli-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-28 14:38:57",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "sqlglot-cli"
}