It's very convenient to be able to set script variables. For example,
SET start_date = 20151201;
SELECT * FROM some_table where date = {$hiveconf:start_date};
Does Presto have this capability?
It's very convenient to be able to set script variables. For example,
SET start_date = 20151201;
SELECT * FROM some_table where date = {$hiveconf:start_date};
Does Presto have this capability?
You can do this
WITH VARIABLES AS (SELECT VALUE AS VAR1, VALUE AS VAR2)
SELECT *
FROM TABLE CROSS JOIN VARIABLES
WHERE COLUMN = VAR1
Not yet. Presto only have set session command for setting some presto properties during current session. For example SET SESSION distributed_join=true;
But presto can not set a variable and use it in following sql like hive does.
Not quite a script variable per say; but some UIs like DataGrip (probably DBeaver as well) emulate passing variables; e.g.:
where date = ${start_date}