catherinedevlin/ipython-sql

Comments with %%sql is not working

vramku5 opened this issue · 1 comments

I am using the 0.4.0 version of ipython-sql in Jupyterlab

When using %%sql syntax, I am unable to add a comment in a cell. The same works fine with a single line sql.

e.g. this works

%%sql $user@db select * 
from some table where idx  = 140778;

and if I add a comment like this, then I get an error saying "invalid syntax"

# test comment
%%sql $user@db select * 
from some table where idx  = 140778;

Am I using the right syntax for comments? the above syntax works fine with %sql (single line)

I think this is a fundamental limitation of IPython cell magics (the double-% ones). For example:

# do nothing 
%%bash
ls 
ls

throws the same error.