Naming Convention for Workflows, Mappings and Sessions
To standardize names, you can customize the naming convention for the workflows, mappings, and sessions that TDM creates. All plans that you run use the format that you create. If you do not enter a format, the plan assigns a random name.
You can configure the naming format on the Workflow Generation tab of the Administrator | Preferences view. You can use functions and variables available in the expression editor to create an expression to define the naming format.
You can use the following functions in an expression:
Function | Description |
---|
CONCAT(string1, string2) | Creates a single character string by joining two or more strings. |
LOWER(str) | Converts a string to lowercase. |
SUBSTR(str,m,n) | Returns a portion of a string, beginning and ending at specified positions in the string. m = start index and n = end index. Indexes start from 0. The substring is calculated from start index to end index-1. |
UPPER(STR,m,n) | Converts a string to uppercase. |
You can use the following variables in an expression:
Variable Name | Description |
---|
$PROJECTNAME | The name of the project. |
$PLANNAME | The name of the plan. |
$SOURCECONNECTIONNAME | The name of the source connection in the plan. |
$TARGETCONNECTIONNAME | The name of the target connection in the plan. |
$SOURCESCHEMANAME | The name of the source schema in the plan. |
$TARGETSCHEMANAME | The name of the target schema in the plan. |
$TABLENAME | The name of the table in the workflow. If you use the variable $TABLENAME in an expression, the variable is ignored in the name in the following situations: - - The expression defines the naming format for workflows and the workflow contains more than one table.
- - The expression defines the naming format for mappings and the mapping contains more than one table.
- - The expression defines the naming format for sessions, and the session contains more than one table, and there are multiple tables with the same name.
|
For example, the following expressions use the CONCAT function with variables:
- •CONCAT('w_', $PLANNAME,'_',$SOURCECONNECTIONNAME,'_',$SOURCESCHEMANAME)
When used as the format for workflow names, generates workflow names that begin with "w_" and include the plan, source connection, and source schema names.
- •CONCAT('m_', $PLANNAME,'_',$SOURCECONNECTIONNAME,'_',$TARGETSCHEMANAME)
When used as the format for mapping names, generates mapping names that begin with "m_" and include the plan, source connection, and target schema names.
- •CONCAT('s_', $PROJECTNAME,'_',$SOURCECONNECTIONNAME,'_',$SOURCESCHEMANAME)
When used as the format for session names, generates session names that begin with "s_" and include the project, source connection, and target schema names.
When you create a format that uses variables, TDM uses information that you enter in the plan settings section of the plan creation workflow.
A plan appends a counter to mapping and session names if the names are not unique across the plan. It appends a counter to workflow names if the plan contains multiple workflows or if a workflow by the same name exists. The name of a workflow, mapping, or session can be a maximum of 75 characters. In addition to this, a counter is appended if required.
Note: To prevent overwriting of workflows, ensure that you create an expression that generates unique workflow names.
Creating a Naming Format For Workflows, Mappings and Sessions
Create a format for workflow, mapping, and session names to standardize names of workflow objects and to easily identify objects. If you do not create a format, plans assign a random name.
1. Open the Administrator | Preferences view.
2. Click Actions > Edit and click the Workflow Generation tab.
3. Click Edit in the Mapping Name, Workflow Name, or Session Name field.
The Configure Expression dialog box opens.
4. Select the required functions and variables from the Functions and Variables tabs and click the transfer arrow to move them to the Expression tab.
5. Configure the expression as required.
6. Click the Validate Expression button to verify that the expression is valid.
7. Click OK.