Current behavior is that if you close the “SQL Preview” drawer and then reopen it, your existing query is gone and all you see is the default “select *” example query. There’s several issues with this:
- If you haven’t run the query yet, then this causes your work to disappear entirely since it isn’t available in history.
- Even if it is available in history, it’s annoying to go to history and pull it up. This also removes any comments from the query.
- It’s a common use case to close a SQL query, inspect a column’s stats, and then go back to the query-- this behavior makes that flow harder.
- The default “select *” query can already be restored using the “Reset
” button.
My proposed behavior is to not reset the query when the preview drawer is reloaded, but to maintain the WIP (or at least reload the most recent query from history).
(sorry this is tagged for “data-lineage”, if there were a “dataset-preview” tag I would have used that)