About
Hive variables are variables that can be set at the session level and referenced in Hive commands or queries.
Articles Related
Management
Set
- Hive - Beeline –hivevar options
- Uri hivevar
Substitution
${VAR}
Example
Example with SQL - SQLLine (SQL at the command line) and a URL
sqlline -u "jdbc:hive2://HiveServer/db;#foo=bar"
- Select with substituion
select '${foo}';
+-----+
| bar |
+-----+
| bar |
+-----+
1 row selected (0.368 seconds)