Developing DTL Transformations
Creating Data Transformations
[Home] [Back] [Next]
InterSystems: The power behind what matters   
Class Reference   
Search:    

This chapter describes generally how to create and edit data transformations. It contains the following sections:

Later chapters describe the syntax to use in data transformations, details for assign actions, and details for other kinds of actions.
Creating a Transformation
To create a transformation:
  1. Click New.
    If you are currently viewing a transformation and you have made changes but have not yet saved them, Ensemble prompts you to confirm that you want to proceed (which will discard those changes).
    Ensemble then displays a dialog box where you can specify the basic information for the transformation.
  2. Specify some or all of the following information:
    Apart from Package and Name, you can edit all these details later.
  3. Specify details on the Transform tab. See Specifying Transformation Details.”
Opening an Existing Transformation
To open a transformation:
  1. Click Open.
    If you are currently viewing a transformation and you have made changes but have not yet saved them, Ensemble prompts you to confirm that you want to proceed (which will discard those changes).
  2. Click the package that contains the transformation.
    Then click the subpackage as needed.
  3. Click the transformation class.
  4. Click OK.
Specifying Transformation Details
For a transformation, the Transform tab displays details that apply to the transformation as a whole. You may or may not have already specified some of these details. Other details can be edited only here. These details are as follows:
Using the Create existing Option
For Create, the existing option enables you to specify the target as an existing object, which results in a performance improvement. This option applies when you invoke a series of transformations programmatically (or perform other sequential processing). You would use this option in cases like the following scenario:
Editing Transformation Actions
This section describes generally how to add and edit the actions in a transformation. It includes the following subsections:
Later chapters describe the syntax to use in data transformations, details for assign actions, and details for other kinds of actions.
Adding an Action
To add an action, you can always do the following:
  1. Optionally click a source or target property, depending on the kind of action you want to add.
  2. Select an action from the Add Action drop-down list.
  3. Edit the details for this action on the Action tab.
    If applicable, the property that you selected is shown in the Property field, for use as a starting point. Optionally, you can disable the action with the Disabled checkbox. If you disable a foreach or if action, all actions within the block are also disabled.
Other techniques are possible for assign actions, as discussed in later in this book.
Editing an Action
To edit an action, first select it. To do so:
Now edit the values on the Action tab. Optionally, you can disable the action with the Disabled checkbox. If you disable a foreach or if action, all actions within the block are also disabled.
Tip:
If you double-click a property in the diagram, Ensemble updates the currently selected action, if applicable. \If you double-click a field in the source, then the editor interprets it as your wanting to set the value for the selected action. Similarly, if you double-click a target field, the editor interprets it as your wanting to set the target for the selected action.
Rearranging Actions
Ensemble executes the actions in the order they are listed in the table below the diagram.
To rearrange actions, you must use the table below the DTL diagram, as follows:
  1. Click the row corresponding to that action.
  2. Click one of the following icons in that row, as needed:
    Tool Description
    Move the selected action up one position. If the action is the first action in a for each or if block, then this moves the action up and out of the block.
    Move the selected action down one position. If the action is the last action in a for each or else block, then this moves the action just after the block. If the action is the last action in an if block just before the else, then this moves the action into the first position in the else block.
    Move the selected action out of the current for each or if block. This moves the action out of the current block to the position immediately before the block.
    Move the selected action into the next for each or if block.
    Remove all the actions of the data transformation.
    Remove the action in this row.
Undoing a Change
To undo the previous change, click the Undo button .
Saving a Transformation
To save a transformation, do one of the following:
Compiling a Transformation
To compile a transformation, click Compile. This option saves the transformation and then compiles it.
Deleting a Transformation
To delete a transformation, you must use a different page, the [Ensemble] > [Data Transformation List] page.
To access this page, click Ensemble, List, Data Transformations and then click Go.
To delete a transformation:
  1. Click the row that displays its name.
  2. Click the Delete button.
  3. Click OK to confirm this action.