Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Presto have the equivalent of Hive's SET command

Tags:

presto

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?

like image 341
Kevin Morris Avatar asked Dec 15 '15 23:12

Kevin Morris


People also ask

How do you query in Presto?

If you want to run a query through a path, select Query Path from the drop-down list, then specify the cloud storage path that contains the Presto query file.


1 Answers

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.

like image 50
袁安峰 Avatar answered Sep 21 '22 15:09

袁安峰