Presto: how to pass dynamical parameter value to presto query in command line

Created on 4 Feb 2019  路  3Comments  路  Source: prestodb/presto

how to pass dynamical parameter value to presto query in command line

Most helpful comment

Is:

cat << EOF | presto-cli
select * from table_a where dat='${date_value}';
EOF

Good enough for you?

All 3 comments

@kiranps11 I don't understand the question. Could you explain a bit more?

Hello @mbasmanova ,
My query is like : select * from table_a where dat='${date_value}' and the date_value will be a variable .
I need to pass the $date_value to presto in command line .

Is:

cat << EOF | presto-cli
select * from table_a where dat='${date_value}';
EOF

Good enough for you?

Was this page helpful?
0 / 5 - 0 ratings