-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
%sql does not parse JSON operators appropriately #918
Comments
hi @maciejb, thanks for reporting this! We've had similar issues to this one in the past. We inherited the for now, using |
Thanks, @edublancas! And thank you for your work on this important project :) I'm not sure about this being inherited logic, though. We encountered this only upon transitioning from ipython-sql to jupysql, where this had been working without issue. Also, in case it's useful for anyone else, if
|
ah, thanks for sharing this. I think we modified the parser recently so I guess we introduced the bug there. alright, we'll get to it! |
Should have a fix for this out soon, but as I was testing I wanted to document a few more errors/details I found. The parsing bug occurs because the operator begins with Interestingly, removing any whitespace before the occurrence of
|
Not sure whether to open a new issue or not, but I found another case of this issue which #938 did not address: operations with negative numbers. For example: |
@maciejb: please open another issue! |
What happens?
It seems that the
->
operator which is used to access JSON fields, is incompatible with%sql
and is being interpreted as an argument switch instead. I am unable to locate any methods for escaping this in the documentation, although it can be worked around by using%%sql
blocks.To Reproduce
Connect to a Postgres database, and issue the following:
The resulting error
OS:
macOS
JupySQL Version:
0.10.2
Full Name:
Maciej Bukczynski
Affiliation:
Darkhorse Analytics
The text was updated successfully, but these errors were encountered: