Hi @AKO ,
Impala has variable substitution like this:
[hostname.local.net:21000] default> SET VAR:query=SELECT 1+2;
Variable QUERY set to SELECT 1+2
[hostname.local.net:21000] default> ${VAR:query};
Query: SELECT 1+2
Query submitted at: 2024-10-15 15:54:29 (Coordinator: https://hostname.local.net:25000)
Query progress can be monitored at: https://hostname.local.net:25000/query_plan?query_id=nnnn
+-------+
| 1 + 2 |
+-------+
| 3 |
+-------+
Fetched 1 row(s) in 1.15s
See official Impala docs at:
https://impala.apache.org/docs/build/html/topics/impala_shell_running_commands.html
This is a feature of impala-shell, and not impala itself, so depending on what you call "Impala Query Manager", your experience might be different.
If you want a solution that is more database independent, then I recommend to use a view or a SELECT CTE (WITH statement) instead:
WITH sub_query AS (
SELECT 1+2
)
SELECT * FROM sub_query;