Target Designer

We spoke about the Source Analyzer in one of our previous posts.  After we create source definition using Source Analyzer, target schema should be created. This can be designed in the Target Designer tool in PowerCenter. The Target Designer provides a user interface for creating and customizing the logical target schema. Target definitions can be customized as needed and when the customization is complete, we can create the physical targets in the database from SQL scripts executed from the Target Designer.
We have different options to create target definition in Target definition. Lets see the different ways in detail:-

Try Creating your Target Definition.

I.Understand target designer

  1. Select TOOLS | TARGET DESIGNER to open the Target Designer or click on the Target Designer button as shown below.          121
  2. Make sure you are in the Workbook mode, by selecting VIEW | WORKBOOK. You should see the workbook tab.

122.jpg

3. Click on the Source Analyzer button. The tab now displays the Source Analyzer icon as shown below.
4. Select WINDOW | NEW WINDOW. A new Target Designer Window is created.
5. In the Workbook Tab section, notice that there are now 3 tabs.

123.png

6. If you need to switch back and forth between the tools, you can click on the appropriate workbook tab, or select WINDOW | WINDOWS and select the window.

II. Design the target schema (Physical target not existing in Database)

  1. Select TARGETS | CREATE. The Create Target Table dialog box appears.
  2. Enter the name of the target, TGT_EMPLOYEES_X.
  3. Select the database type for the target table, i.e. Oracle.
  4. Click on Create and Done.
  5. The new table definition appears in the Target Designer workbook.
  6. The target schema definition has also been added to your folder’s Targets section, or node.
  7. Double-click on the TGT_EMPLOYEES_X table. The Edit Tables dialog box appears.
  8. Click on the Columns tab.
  9. Add the following columns using 6icon.124
  10. Once the table has been defined, close the Edit Tables dialog box by clicking on OK.
  11. Select REPOSITORY | SAVE to save the newly designed schema to the repository

 III. Design the target schema(Physical target existing in database)

  1. Select TARGETS | IMPORT FROM DATABASE.
  2. Enter login details as shown below. Follow the steps for ODBC creation which are describe in Source Analyzer definition.
  3. Click on Connect, expand TRGX and Tables and select the target table.
  4. Click on OK.

125

5. The new table definition appears in the Target Designer workbook.
6. The target schema definition is added to your folder’s Targets section, or in the                    node in the Designer’s Window.

126.jpg

7. Double-click on the TGT_EMPLOYEES_X table. The Edit Tables dialog box                               appears. Click on Rename under the Table tab.
8.Click on the Columns tab and note the columns in the table.
9.Select REPOSITORY | SAVE to save the newly designed schema to the repository.

IV. Create the physical target in database

  1. Click on the TGT_EMPLOYEES_X table to select it.
  2. Select TARGETS | GENERATE/EXECUTE SQL from the menu. The Database Object Generation dialog box appears.127
  3. In the Filename entry box, accept the default script file name, MKTABLES.SQL.
  4. Select the Selected table’s radio button.                                                                           Note: Selecting the All tables radio button will write the code for all tables, which     are in the Target Designer workspace window.
  5. Under Generation options, make sure the Create Table, Primary Key, Foreign Key and Drop Table options are checked.
  6. Click on the Connect button.
  7. log in to the target database, using the proper ODBC connection string.
  8. Click the Generate and Execute button.
  9. If you receive a prompt asking if you want to overwrite the contents of the MKTABLES.SQL file, click on OK
  10. The MKTABLES.SQL containing the DDL script to create the TGT_EMPLOYEES_X table is created and runs against the target database.
  11. Scroll through the contents of the Output Window to verify that the table was successfully created.
  12. Click on the Close button.

Hope you enjoy this tutorial, please let us know if you have any difficulties in trying out these exercise.

 

 

 

 

%d bloggers like this: