I am working in deepnote, and since I cannot alter my table (How do I rename a column in Dataframe SQL?) I wondered if there is a possibility to reuse a query in a new SQL block.
I know that every query can be saved as pandas DataFrame, and with the syntax {{ variable_name }}
variables can be reintroduced into DataFrame SQL.
However, after saving a previous SQL query as df
the code
SELECT *
FROM {{ df }}
does unfortunately not work.
The error message I get is: "There is no Dataframe named ? in scope!"
What am I missing here?
FYI: Deepnote's DataFrame SQL is based on JinjaSQL, if that helps in any way.