Save table with global variable in the name of the table

Options
Florent1
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

  • HarizoR
    HarizoR Dataiker, Alpha Tester, Registered Posts: 138 Dataiker
    edited July 17 Answer ✓
    Options

    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

Setup Info
    Tags
      Help me…