prestoでグローバル変数がつくれないようなので代替案を考えた
条件が複雑なクエリを見やすくするために、Prestoでグローバル変数をアドホックに定義できないか調べてみたのですが、Prestoはできないようです。
Does Presto have the equivalent of Hive's SET command - Stack Overflow
代替案として以下のやり方をとりあえず考えてみました。
with conditions as ( select 1234 as condition1 , 'abcd' as condition2 , '2019-06-10' as condition3 ) select * from table where number = (select condition1 from conditions) and character = (select condition2 from conditions) and date = (select condition3 from conditionss)
簡潔さにはかけますが、これで条件の部分とselectの部分を分離することは一応できました。
以上