Save table with global variable in the name of the table
![Florent1](https://us.v-cdn.net/6038231/uploads/Dataiku/nAvatar3.png)
Florent1
Registered Posts: 4 ✭✭✭
Hello,
I would like to know if it's possible to save a table in Hive with a global variable in the name of the table ?
Thank you very much in advance.
Florent
Best Answer
-
Hi Florent,
In your HDFS connection settings, you can leverage variable expansion in the "Hive table name prefix" and "Hive table name suffix" fields. This allows you to dynamically prefix or suffix the names of all generated Hive tables using variables. For example, if you have 2 global variables defined as such:
{ "prefix": "MYPROJ", "suffix": "DESIGN" }
Then, if you put ${prefix} in "Hive table name prefix" and ${suffix} in "Hive table name suffix", then any new table name will be of the form MYPROJ_TABLENAME_DESIGN.
Hope this helps!
Best,
Harizo
Answers
-
Hi Harizo,
Thank you very much, this was exactly what I wanted.
Florent