Useful magic tools to facilitate SQL writing and execution within Jupyter
- Use
%%format
to reformat the sql, in addition you can change the rules in the function format_sql - 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 usingsqlalchemy
engine
- Take a look at the demo notebook testing.ipynb