MehrdadAP
MehrdadAP

Reputation: 427

Concatenation of variable value and string in apache hive

In apache Hive CLI or Beeline CLI, I need to concatenate value of a variable with a string. Is it possible to do so?

Example: set path_on_hdfs="/apps/hive/warehouse/my_db.db";

how to get something like '${hivevar:path_on_hdfs}/myTableName'?

Upvotes: 1

Views: 1381

Answers (1)

Giri
Giri

Reputation: 91

You can try something like this:

set path_on_hdfs= /test1/test2

create external table test(id int) location '${hiveconf:path_on_hdfs}/myTable';

is should work...

Upvotes: 2

Related Questions