Skip to content
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

adding SQL comments breaks jupysql #892

Closed
edublancas opened this issue Sep 20, 2023 · 3 comments · Fixed by #895
Closed

adding SQL comments breaks jupysql #892

edublancas opened this issue Sep 20, 2023 · 3 comments · Fixed by #895
Assignees

Comments

@edublancas
Copy link

From Slack:

Did something change with how jupysql handles SQL comments either before or after the %%sql command? I used to have commented code beforehand which now just errors (fairly certain it didn't before).
If I have commented code one line below the %%sql I get a Success message but no query output (unless I have a something like: %%sql --with first_part --with second_part and then a comment line below.
Thx.

image

marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 22, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 22, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 22, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 22, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 22, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 26, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 27, 2023
…in general. This parses the query and converts the expression back to sql, stripping comments in the process.
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 27, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 27, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 27, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 27, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 28, 2023
…nt. This may happen in the case of a statement like INSTALL 'xxx'. In these cases we assume the statement is not select or summarize.
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 28, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 28, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Sep 28, 2023
@edublancas
Copy link
Author

hey @marshallwhiteorg: @neelasha23 fixed a similar problem in #894

she's now deleting comments before storing them as snippets. it might be a sensible approach for this problem, too. if there isn't a cleaner option. we might wanna remove comments before running the query.

@marshallwhiteorg
Copy link

@edublancas let me know if this is still relevant given that my code is now passing the checks

@edublancas
Copy link
Author

you can ignore my earlier comment.

marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Oct 5, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Oct 5, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Oct 5, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Oct 5, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Oct 5, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Oct 6, 2023
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Oct 9, 2023
edublancas pushed a commit that referenced this issue Oct 10, 2023
* #880 User-level config

* 880 changelog

* 880 works if .jupysql dir doesn't exist yet

* #890 debugging windows

* #892 fix link

* Revert "#892 fix link"

This reverts commit 3354a8e.

* #890

* #880 fix link

* Revert "#880 fix link"

This reverts commit 815b05b.

* #880 PR feedback: tests and docs

* #880 formatting

* #880 patch -> monkeypatch
marshallwhiteorg added a commit to marshallwhiteorg/jupysql that referenced this issue Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants