We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The best way to write large SQL queries is via CTEs:
WITH something AS ( SELECT * FROM some_table WHERE column = 1 ) SELECT * FROM something WHERE another_column = 2
However, when writing CTEs, we lose the ability to run the sub-expressions interactively.
We could add something like this:
%%sql --name something SELECT * FROM some_table WHERE column = 1
Then, to re-use the previous query:
%%sql SELECT * -- refer to the previous query FROM ':something' WHERE another_column = 2
And have the extension automatically expand the expression above to:
Before submitting to the database.
The text was updated successfully, but these errors were encountered:
Copying Slack thread over to this GitHub issue.
Instead of converting a subquery to a CTE for the user, it might be more explicit to have them specify the CTEs in the magics function. For example,
%%sql --with something SELECT * FROM something WHERE another_column = 2
Sorry, something went wrong.
dd5a144
No branches or pull requests
The best way to write large SQL queries is via CTEs:
However, when writing CTEs, we lose the ability to run the sub-expressions interactively.
We could add something like this:
Then, to re-use the previous query:
And have the extension automatically expand the expression above to:
Before submitting to the database.
The text was updated successfully, but these errors were encountered: