04 - Informatica Desiner Features
04 - Informatica Desiner Features
com +917411642061
Lab 4
Features and Techniques I
Lab at a Glance................................................................3 Objectives..............................................................3 Summary................................................................3 Duration.................................................................3 Exercises.........................................................................4 Exercise 1: Prepare the Environment ....................4 Exercise 2: Arrange Objects...................................4 Exercise 3: Remove Links......................................6 Exercise 4: Manual Linking....................................6 Exercise 5: Revert to Saved...................................7 Exercise 6: Link Path.............................................8 Exercise 7: Autolink by Name and Position..........10 Exercise 8: Moving Ports......................................12 Exercise 9: Shortcut from Normal View to Edit Port .............................................................................14 Exercise 10: Copy Columns versus Link Columns .............................................................................14 Exercise 11: Create Transformation Methods......16 Exercise 12: Zoom and Scale-to-Fit.....................18
PowerCenter 9.x Level I Developer Lab Guide 4-1
Exercise 13: Designer Options.............................19 Reference.......................................................................20 Copy Columns versus Link Columns....................20 Creating Transformations.....................................20 Other Zoom Options.............................................21
4-2
Lab at a Glance
The exercises in this lab are designed to demonstrate and explain the various features and tools that can improve efficiency and ease-of-use in the Designer.
Objectives
After completing the lab, the student will be able to use some of the more commonly used features and techniques in the Designer, including: Auto Arrange Remove Links Link Manually Revert to Saved Link Path Autolink by Name and Position Moving Ports Shortcut to Port Editing from Normal View Copy Columns versus Link Columns Create Transformation Methods Scale-To-Fit
Summary
Do not save changes during any of the exercises or at the end of the lab, except in Exercise 2 (Layout|Arrange All). Other changes may invalidate the mapping.
Duration
This lab should take approximately 30 minutes.
4-3
Exercises
Exercise 1: Prepare the Environment
Step 1. Start PowerCenter Designer. Select Start | Programs | Informatica Platform 9.0 | Informatica PowerCenter Client 9.0 | Designer . Step 2. Connect to the repository. If the repository is not already open, select the repository and select Repository | Connect. The Connect to Repository dialog box appears:
Enter the assigned username and password. Click the Connect button. Step 3. Open the folder.
When a folder is opened for the first time, the Source Analyzer tool will appear by default in the Workspace.
4-4
Or this:
Step 1. Display iconic view of mapping. Choose Layout | Arrange All Iconic or right-click in the Workspace and select Arrange All Iconic. Step 2. Restore mapping view to normal. Choose Layout | Arrange All or right-click in the Workspace and select Arrange All.
This is the reset point (Normal View with the objects aligned) that, when instructed to execute the Revert to saved command, everyone will be at the same starting point.
4-5
By default, each selected link changes in color from blue to red. If any other objects (e.g., transformations) were selected along with the links, redo the process. Press the Delete key to remove the connections. Ensure no icons are deleted.
The cursor does not change to a link icon so you cannot create a link this way. To successfully create a link, the cursor must originate on text in any column visible (e.g. Name, Expression, Data type, etc.) not the white space to the right of the text.
4-6
Now, left-click and hold the mouse on the NAME_out text. Drag the cursor towards the ODS_EMPLOYEE target definition.
Now the cursor does change to a link icon so you can create a link this way. Drag the cursor onto the target NAME port to create a link. Delete the link to try another manual link method. Select only the output ports (Ctrl-click) in the exp_ODS_EMPLOYEE expression and drag them onto the ODS_EMPLOYEE target definition.
In order to be successful, the port data types must be compatible. If the ports are out of order, but match by name, consider Autolink as an option (see later).
4-7
Select Yes to proceed. Edit the exp_ODS_EMPLOYEE expression. In the Ports tab, select the NAME_out port and click the Delete button. Similarly, delete the DATE_HIRED ports. Edit the sq_EMPLOYEE source qualifier similarly to remove the DATE_HIRED port. Select only the sq_EMPLOYEE source qualifier and choose
Edit | Revert to Saved.
The same dialog box appears all changes must be reverted. Select Yes to proceed.
4-8
Step 1. Trace a link path. To make sure all students are on the same page, Revert to
Saved.
Right-click on EMPLOYEE_ID in the sq_EMPLOYEE Source Qualifier and select Select Link Path | Forward.
Notice how the path for EMPLOYEE_ID, from sq_EMPLOYEE all the way to ODS_EMPLOYEE, is highlighted in red.
Notice how the NAME_out ports path not only shows where it proceeds to the ODS_EMPLOYEE target definition, but also from its origin all the way back to the EMPLOYEE source definition. Both the FIRST_NAME and LAST_NAME are used in the formula to produce NAME_out, so both links are highlighted in red. Similar to the last example, with the FIRST_NAME going forward it doesnt stop at the exp_ODS_EMPLOYEE Expression where the port is input only. Because it is used in the formula to calculate the NAME_out, the path continues to the target.
Right-click on the NAME_out port in the exp_ODS_EMPLOYEE expression and click select Link Path |
Both.
Right-click on the FIRST_NAME port in the EMPLOYEE source definition and click Select Link Path | Forward.
4-9
Revert to Saved
Remove the links between the exp_ODS_EMPLOYEE expression and the ODS_EMPLOYEE target definition. From the Main Menu, choose Layout | Autolink. The Autolink dialog box opens. Another technique is to right-click in the Workspace and the same dialog box will open.
Using the drop down list, only one transformation may be selected in the From Transformation box and one to many transformations may be selected in the To Transformations section. For objects that contain groups such as router transformations or XML targets, select the group name from the To Transformations list.
Select the exp_ODS_EMPLOYEE transformation from the From Transformation drop-down menu; then highlight the ODS_EMPLOYEE transformation in the To Transformations box. Click OK. The Designer adds links between input and output ports that have the same name, regardless of case.
4 - 10
Select the exp_ODS_EMPLOYEE transformation from the From Transformation drop-down menu; then highlight the ODS_EMPLOYEE transformation in the To Transformations box. Select the Name radio button. Click More to view the options for entering prefixes and suffixes. Note the button toggles to become the Less button. Type _out in the From Transformation Suffix field.
Revert to Saved
Remove the links between the exp_ODS_EMPLOYEE Expression and the ODS_EMPLOYEE target definition. Choose Layout | Autolink or right-click in the Workspace and select Autolink.
4 - 11
be considered when using this Autolink option. In addition, not every port visible in the Normal View has both the input and the output ports selected. In other words, some ports may be required to create an output port (derived port), however, are not needed down stream. A best practice is to uncheck the output port of those ports deemed to be input only. It not only gives the mapping a cleaner look, it simplifies features like Autolink by position.
As noted above, ports that have incompatible data types will not link automatically. Ports with compatible data types will link, because they do pass the validation check. However, it is a best practice to double-check the results of the Autolink.
Click OK. The Designer links the first output port to the first input port, the second output port to the second input port, and so forth.
Open the exp_ODS_EMPLOYEE expression and click on the Ports tab. Single-click on the TYPE_CODE port and move it up to the top using the Up arrow corner of the toolbar. icon found in the upper right
4 - 12
Step 2. Use drag-and-drop method to move a port. Single-click on the number to the left of the DATE_HIRED port. Single-click and hold the left mouse button and note the faint square that appears at the bottom of the pointer.
While still holding the left mouse button, position the pointer just below the TYPE_CODE port until a red line appears under it.
Release the mouse button and DATE_HIRED will appear below TYPE_CODE.
4 - 13
Remove the links between the sq_EMPLOYEE source qualifier and the exp_ODS_EMPLOYEE expression. Resize or scroll down until the TYPE_CODE port appears in the exp_ODS_EMPLOYEE expression. Double-click on the TYPE_CODE port. This is the shortcut that goes directly to the port in the Edit View. Delete the port by using the icon.
Click on the OK button and the transformation objects should look as follows:
4 - 14
Select Layout | Copy Columns or click the Copy Columns button. Use the drag-and-drop method to copy the TYPE_CODE port from the sq_EMPLOYEE source qualifier to the exp_ODS_EMPLOYEE expression:
The exp_ODS_EMPLOYEE expression displays the TYPE_CODE port just copied from the sq_EMPLOYEE source qualifier as shown above. However, in this mode no link should have been created. Step 2. Link columns. Select Layout | Link Columns or the Link Columns button. Link the TYPE_CODE port from sq_EMPLOYEE source qualifier to the exp_ODS_EMPLOYEE expression.
4 - 15
Step 3. Copy and link columns. The Link Columns option can also be used to copy and link ports. Delete the TYPE_CODE port from the exp_ODS_EMPLOYEE expression. Drag-and-drop the TYPE_CODE port from the sq_EMPLOYEE source qualifier to the exp_ODS_EMPLOYEE expression.
Revert to Saved
On the Transformation toolbar, find the aggregator transformation button and single-click.
Move the mouse into the Workspace. The cursor changes to crosshairs. Single-click in the Workspace where you want to place the transformation. The selected transformation appears in the desired location of the Workspace and the cursor changes back to an arrow.
4 - 16
Enter the name agg_TargetTableName and click Create. Click on the Done button and the new transformation appears in the Workspace.
4 - 17
There are features to change the magnification of the contents of the Workspace. Use the toolbar or the Layout menu options to set zoom levels. The toolbar has the following zoom options:
on the toolbar.
Click anywhere in the Workspace and the mapping will zoom out by 10% each time the mouse is clicked. Keep clicking until the mapping is small enough to fit within the window. Step 3. Zoom in.
Zoom in 10% on button increases the current magnification of a rectangular area selected. Degree of magnification depends on the size of the area selected, Workspace size, and current magnification.
on the toolbar.
Click anywhere in the Workspace and the mapping will zoom in by 10% each time the mouse is clicked.
4 - 18
Step 4. Scale to fit. This feature scales all objects to fit in the Workspace. Toggle off the Zoom in 10% on button Click on the Scale to Fit .
4 - 19
Reference
Copy Columns versus Link Columns
In the Mapping Designer, copying ports from one transformation to another is a valuable time saver. In lieu of entering the ports manually (name, datatype, length/precision), developers can use drag-and-drop to create ports in the desired transformation. The Designer includes a toggle feature to switch between Copy Columns and Link Columns. With Copy Columns, a port may be dragged from one transformation to another, preserving the name, datatype, and length/precision. With Link Columns, if the desired port does not exist in the transformation to be linked, it will copy and link the port. If the port does exist, the port can simply be linked. A link is only made if the transformation satisfies Designer validation, e.g. datatype compatibility. If linking and copying, the port will still be copied.
Creating Transformations
Developers can create transformations using the following Designer tools:
Mapping Designer.
Create transformations that connect sources to targets. Transformations in a mapping cannot be used in other mappings unless Developers configure them to be reusable.
Transformation Developer.
Create and configure a set of transformations, called mapplets that Developers can use in multiple mappings
You can create transformations from scratch using either the transformation toolbar or the Transformation | Create menu option. Using the transformation toolbar, developers can click and drop transformations to a desired location in the
4 - 20 PowerCenter 9.x Level I Developer Lab Guide
Workspace. The transformation takes a default name. Using the Transformation | Create option, developers select the desired transformation from a drop down list and enter a name (no default).
Zoom Center maintains the center point of the Workspace and zooms in or out by 10 percent.
Zoom Center
Zoom Point uses a point selected as the center point from which to zoom in or out by 10 percent increments.
Zoom Point
Zoom Rectangle increases the current magnification of a rectangular area selected. Degree of magnification depends on the size of the area selected, Workspace size, and current magnification.
Zoom in based on rectangle
Zoom Normal
Zoom Normal.
Scale to Fit This feature scales all objects to fit in the visible Workspace. Zoom Percent
Zoom Percent.
that percent.
4 - 21