Previous Topic: Define Hive DomainsNext Topic: Define Hive Macros


Define Hive Functions

Use the Hive Function Editor to define a function for a database or table in a Hive physical model. Functions in Hive are schema-level.

Note: By default, the admin role is not in the current roles. While generating a function, on the Forward Engineer Schema Generation dialog box, under Other Options, ensure that you select Set Admin Role.

To define a Hive function

  1. In the Model Explorer, right-click Functions and click New.

    An instance of Function is created.

  2. Right-click the instance and click Properties.

    The Hive Function Editor opens.

  3. In the navigation grid, select the function that you want to define and work with the following options:

    Note: Click New New icon in property editors to create a new object on the toolbar to create a function. Use the Enter filter text box to filter a very large list of functions to quickly locate the one that you want to define.

    Name

    Specifies the name of the function. Set the name of the function in this field.

    Database

    Specifies the database to which the function belongs. Change the database of the function in this field.

    Generate

    Generates SQL during forward engineering. Clear the check box if you do not want to generate SQL.

  4. Click the Code tab and add the code for the function that you want to define.
  5. Work with the other tabs in the editor to access additional design features, for example:
  6. (Optional) Click the UDP tab to work with user-defined properties for the object.
  7. (Optional) Click the Notes tab to view and edit user notes.
  8. (Optional) Click the Extended Notes tab to view or edit user notes.
  9. Click Close.

    The function is defined and the Hive Function Editor closes.

For more information, refer to Hive documentation.