Is there any way to declare variable and temp table in Dremio?
Does dremio support “Declare” keyword!!
Is there any way to declare variable and temp table in Dremio?
Does dremio support “Declare” keyword!!
@sauku Not yet supported
Is it still not supported? It would be immensely helpful in some cases where more complex transformation of columns are needed.
You can basically achieve the same with a scalar UDF like this:
create or replace function "variables".daysback() returns int return select 7;
Then, you can use this function in a WHERE clause like:
"timestamp" > DATE_ADD(now(), -"variables".daysback())