Hive: Variables

(Last Updated On: )

This tutorial will show you some common usage for working with Hive variables. If you have no installed Hive yet please follow this tutorial.

Create HiveVar:

SET hivevar:MY_DATE='2019-02-01';

Show HiveVar:
This will show you the value of the variable.

SET MY_DATE;

Use HiveVar:

SELECT ${MY_DATE};