Previous Topic: Define Hive FunctionsNext Topic: Define Hive Table Properties


Define Hive Macros

You can use the Hive Macro Editor to define a set of statements that are frequently used or that perform a complex operation in a Hive physical model.

Note: Macros in Hive do not support Reverse Engineering from Database (REDB). Also, by default, the admin role is not in the current roles. While generating a macro, on the Forward Engineer Schema Generation dialog box, under Other Options, ensure that you select Set Admin Role.

To define a Hive macro

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

    An instance of a Macro is created.

  2. Right-click the instance and click Properties.

    The Hive Macro Editor opens.

    Note: Click New New icon in property editors to create a new object on the toolbar to create a new macro. Use the Enter filter text text box to filter a very large list of macros to quickly locate the one you want to work with.

    Name

    Specifies the name of the macro.

    Generate

    Generates DDL for this object during Forward Engineering.

  3. Click the Parameters tab and work with the following options. Click New New icon in property editors to create a new object on the toolbar to create a new parameter.
    Parameters

    Specifies the parameter name.

    Physical Data Type

    Specifies the data type of the parameter.

  4. Enter the macro code in the text area on the Code tab. Click the Text Editor icon Text Editor Icon to work with the macro code in a larger box. Click the Macro Toolbox icon Macro Toobox to open the Macro Toolbox where you can select and insert a pre-configured macro.
  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 Hive Macro Editor closes.

For more information, refer to Hive documentation.