Does Presto have the equivalent of Hive's SET command

Kevin Morris picture Kevin Morris · Dec 16, 2015 · Viewed 13.8k times · Source

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?

Answer

袁安峰 picture 袁安峰 · Dec 16, 2015

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.