Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/npodlozhniy/sql-magics
Useful magic tools to facilitate SQL writing and execution within Jupyter
https://github.com/npodlozhniy/sql-magics
ipython ipython-magic sqlparse
Last synced: 24 days ago
JSON representation
Useful magic tools to facilitate SQL writing and execution within Jupyter
- Host: GitHub
- URL: https://github.com/npodlozhniy/sql-magics
- Owner: NPodlozhniy
- License: mit
- Created: 2023-08-06T11:23:07.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2023-08-06T12:34:04.000Z (about 1 year ago)
- Last Synced: 2024-10-12T11:21:02.163Z (24 days ago)
- Topics: ipython, ipython-magic, sqlparse
- Language: Jupyter Notebook
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sql-magics
Useful magic tools to facilitate SQL writing and execution within Jupyter## Quick Start
- Use `%%format` to reformat the sql, in addition you can change the rules in the function [format_sql](https://github.com/NPodlozhniy/sql-magics/blob/e8ab1b270593f105ce457b8d47ce2de62c41f998/sql_magics.py#L73)
- Use `%%format` or `%%pgsql` with the connection string to execute the queries in place
- Use `%%format engine` to put the result of the query to dataframe if you using `sqlalchemy` engine## Details
- Take a look at the demo notebook [testing.ipynb](https://github.com/NPodlozhniy/sql-magics/blob/master/testing.ipynb)