Impala - how to set a variable in a query?

hadoop, hive, impala

Solution

impala-shell> set var:id=123;select * from users where id=${VAR:id};

This variable can also be passed from command-line using `--var`

impala-shell --var id=123
impala-shell> select * from users where id=${VAR:id};

Problem

How can I set a variable in an Impala query? In SQL: ``` select * from users where id=(@id:=123) ``` In Impala: ``` impala-shell> ? ``` Impala version is v2.0.0. Any suggestions will be appreciated. Thanks!

Original source