-
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
Move feat from %sqlrender to %sqlcmd snippets #656
Conversation
Moved features, added FutureWarning, update API Reference documentation, modified test functions
update changelog for #647
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bbeat2782
lgtm. Please rebase.
@edublancas do you think we should remove the sqlrender
guide from the doc tree?
`-d`/`--delete` Delete a snippet. | ||
|
||
`-D`/`--delete-force` Force delete a snippet. This may be useful if there are other dependent snippets, and you still need to delete this snippet. | ||
|
||
`-A`/`--delete-force-all` Force delete a snippet and all dependent snippets. | ||
|
||
```{code-cell} ipython3 | ||
cte = %sqlcmd snippets gentoo | ||
print(cte) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is currently displaying
WITH
SELECT * FROM penguins.csv where species == 'Gentoo'
Is it supposed to display WITH
even when it is not used as subquery as part of another query?
Also, previously we could sqlrender
the final query as well, that uses a snippet as subquery. e.g.
SELECT * from gentoo where bill_length < 50
... can you add a similar example ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@neelasha23: yes, this is a bug we discovered recently. I reported it on #657, @bbeat2782 will work on it.
@bbeat2782: please work on this first, and then tackle the other one
Added some comments. Few other observations:
|
I was thinking about replacing %sqlrender with %sqlcmd snippets with a separate PR, but if you think it works better with one PR, I will add those changes to this PR. |
yes, please tackle documentation changes here. usually whenever we modify a feature, the PR that changes the feature also updates the docs. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please address the observations from @neelasha23
@bbeat2782: we just merged #654 which moved the implementation of |
@edublancas it says So it seems like I would have to apply the changes I made manually. |
I think you'll be able to do it from the CLI, but yeah feel free to do it manually (create a new branch from master and then apply your changes) |
Describe your changes
Moved
%sqlrender
feature to%sqlcmd snippets
, added FutureWarning when user call%sqlrender
, modified API Reference documentation, and modified test functions to test%sqlcmd snippets {snippet_name}
Issue number
Closes #647
Checklist before requesting a review
pkgmt format
📚 Documentation preview 📚: https://jupysql--656.org.readthedocs.build/en/656/