Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

do not expand ctes when the user supplies a cte #795

Merged
merged 6 commits into from
Aug 12, 2023
Merged

Conversation

edublancas
Copy link

@edublancas edublancas commented Aug 11, 2023

Describe your changes

Issue number

closes #753

Checklist before requesting a review


📚 Documentation preview 📚: https://jupysql--795.org.readthedocs.build/en/795/

@edublancas edublancas marked this pull request as ready for review August 11, 2023 05:09
@edublancas edublancas requested a review from neelasha23 August 11, 2023 05:09
@neelasha23
Copy link

Still getting this error:
Screenshot 2023-08-11 at 10 37 14 PM

@neelasha23
Copy link

It looks like, if there's a table some-table and we create a snippet some-table and run the below query:

%%sql
with something as(
select * from some-table
)
select * from something

this query refers to the main table some-table. What if user wants to refer to the saved snippet instead? If I pass --with it throws error (there's a table as well as snippet by name names2):

Screenshot 2023-08-11 at 10 51 36 PM

@edublancas
Copy link
Author

@neelasha23 I'm now raising an exception to tell the user they should not use --with if they're running a CTE: 143edc1

@edublancas edublancas requested a review from neelasha23 August 11, 2023 19:38
@edublancas edublancas merged commit 31fa726 into master Aug 12, 2023
@edublancas edublancas deleted the dev/fixes branch August 12, 2023 14:57
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

error when running CTEs
2 participants