Physical Modeling › Teradata Physical Property Editors › Define a Teradata Macro
Define a Teradata Macro
You can use the Macro editor to define a set of statements that are frequently used or that perform a complex operation in a Teradata physical model.
To define a Teradata macro
- Click Macros on the Database menu.
The Macro Editor opens.
- Select a macro and work with the following options:
Note: Click New
on the toolbar to create a new macro.
- Name
-
Specifies the name of the macro.
- Database
-
Specifies the schema of the database to which the table belongs. Select from the drop-down.
- Type
-
Shows the type (Model Level or Table Level).
- Attach To New
-
Specifies if upon creating a new (table-level only) table, this script will automatically be attached to it.
- Enabled
-
Specifies if the macro is enabled or not.
- Use Replace Syntax
-
Lets you select whether Forward Engineering will use the REPLACE command instead of the CREATE command.
- Generate
-
Generates DDL for this object during Forward Engineering.
- Enter the macro code in the text area on the Code tab. Click the Text Editor icon
to work with the macro code in a larger box. Click the Macro Toolbox icon
to open the Macro Toolbox where you can select and insert a pre-configured toolbox macro.
You can work with the other tabs in the editor to access additional design features, for example:
- View the fully expanded macro code on the Expanded tab
- Work with parameters associated with the macro on the Parameters tab
- Work with permissions on the Permissions tab
- Change the object creation order on the Object Creation Order tab
- (Optional) Click the Comment tab and enter any comments you want associated with the macro.
- (Optional) Click the UDP tab to work with user-defined properties for the macro.
- Click Close.
The Macro Editor closes.
More information:
Edit Code in a Teradata Property Editor
View Expanded Code in a Property Editor
View Parameters Associated with the Selected Function
Add Permissions in a Teradata Property Editor
Add a Comment in a Property Editor
Change the Object Creation Order in a Property Editor
Add a UDP in a Physical Property Editor