Hive - Variable (hivevar)

> Database > Apache - Hive (HS|Hive Server)

1 - About

Hive variables are variables that can be set at the session level and referenced in Hive commands or queries.

Advertising

3 - Management

3.1 - Set

3.2 - Substitution

${VAR}

4 - 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)
db/hive/hivevar.txt · Last modified: 2019/06/04 15:17 by gerardnico