Useful magic tools to facilitate SQL writing and execution within Jupyter
- Use
%%formatto reformat the sql, in addition you can change the rules in the function format_sql - Use
%%formator%%pgsqlwith the connection string to execute the queries in place - Use
%%format engineto put the result of the query to dataframe if you usingsqlalchemyengine
- Take a look at the demo notebook testing.ipynb