Sunteți pe pagina 1din 10

Lab 1

Defining Sources & Targets

Lab at a Glance ..............................................................2


Objectives........................................................................2
Duration...........................................................................2
Exercises........................................................................3
Exercise 1: Import a Source Schema................................3
Exercise 2: Import a Target Schema.................................9

PowerCenter 9.x Level I Developer Lab Guide

1-1
Lab 1. Defining Sources & Targets

Lab at a Glance
The exercises in this lab are designed to walk the student
through the process of creating source & target definitions by
importing metadata from a relational database table.

Objectives
After completing the lab, the student will be able to:
Start the PowerCenter Designer.
Open a folder.
Import a relational source definition.
Create metadata extensions.
Import a relational target definition.
Save the repository.

Duration
This lab should take approximately 20 minutes.

1- 2 PowerCenter 9.x Level I Developer Lab Guide


Lab 1. Defining Sources & Targets

Exercises

Exercise 1: Import a Source Schema


This exercise walks the student through the process of creating
a source definition from the EMPLOYEE table.
Step 1. Start the PowerCenter Designer.

Select Start | Programs | Informatica Platform 9.0 |


PowerCenter 9.0 - Client | Designer.

You can turn off the Start Page by selecting Windo ws |


Windows. Then select Start Page and click the Close
Window(s) button.

Step 2. Connect to the repository.

Select the PC_Course repository.


Select Repository | Connect.
The Connect to Repository dialog box appears:

Enter the assigned username and password--


username: studentxx
password: studentxx
(where xx is your student number).
Click the Connect button.
Step 3. Open the folder.
Note that there is a difference betw een an Right-click on the Studentxx folder and select Open.
ex panded folder and an open folder
ev en though they both appear the same in When a folder is opened for the first time, the Source
the Nav igator w indow .
Analyzer tool will be opened in the workspace.
Before Pow erCenter objects can be
added, deleted or modified, a folder must
be ex plic itly opened.

PowerCenter 9.x Level I Developer Lab Guide 1-3


Lab 1. Defining Sources & Targets

Step 4. Open the Source Analyzer.

If the Source Analyzer is not already open, select Tools |

Source A nalyzer, or click the Source A nalyzer button in


the toolbar.
The Source Analyzer window opens by default
maximized and with workbook tabs. If your setting are
The Workbook View allow s easy different:
nav igation among open folders.
Maximize the Source Analyzer window by clicking on
the maximize window button.
Create workbook tabs at the bottom of the workspace
by selecting View | Workbook.
Step 5. Import the source definition.
A Pow erCenter source definition defines Select Sources | Import from Database.
the structure, or schema, of source data to
be read by the Pow erCenter Serv er. For a The Import Tables dialog box appears.
relational source, this includes information
about each of the columns including key
designation, data ty pe, precision and
scale.

Select the ODBC data source that corresponds to the


location of the source tables from the pull-down list.
The database user and passw ord are Enter the database username and password:
NOT the same as the PowerCenter
repository user and password. username: sdbu
owner: SDBU
password: sdbu
There is no student number after sdbu; all
students read from the same source
schema.

Note that the Owner name field


defaults to the username that w as
entered.

1- 4 PowerCenter 9.x Level I Developer Lab Guide


Lab 1. Defining Sources & Targets

Click the Connect button.


Once the Connect button changes to read Re-connect , a
direct connection to the source database has been
established.
In the Select Tables window, expand the database owner
name (SDBU).
Expand the TA BLES node.
Select the EMPLOYEE table:

Click the OK button.


The new source table definition now appears in the
Source Analyzer workspace:

PowerCenter 9.x Level I Developer Lab Guide 1-5


Lab 1. Defining Sources & Targets

Note that the EMPLOYEE source definition is also added to


the Sources node in the Navigator window:

Step 6. Edit the source definition.

In the Source Analyzer workspace, double-click on the


header of the EMPLOYEE source definition.
The Edit Tables dialog box appears.
In the Table tab, Description field, enter the following text:
This source comes from the CRM system and
includes all Sales Representatives from the
Sales Department.

Select the Columns tab.


Select TYPE_CODE.
In the Description field (at the bottom of the dialog box),
enter the following text: Human Resource Job Code .

1- 6 PowerCenter 9.x Level I Developer Lab Guide


Lab 1. Defining Sources & Targets

Note that the Description field can be used


to add a description for each column. To
associate a description w ith a particular
column, highlight the column and enter a
description in the Description field.

Click A pply .

Step 7. Create metadata extensions.

Click on the Metadata Extensions tab.


Pow erCenter allow s dev elopers to ex tend
the metadata stored in the repository by Click on the A dd Metadata Extension button.
associating information w ith indiv idual
objects in the repository . Enter Author into the Extension Name column of the new
entry.
There are tw o ty pes of metadata
ex tensions non-reusable and reusable. Select String for the Data type , and enter 30 for Precision.
Non-reusable metadata ex tensions are
unique to each object, and w ill not appear Add a second metadata extension and name it
in other objects of the same ty pe. Creation_Date.
Reusable metadata ex tensions w ill appear
in ev ery object of the same ty pe. Select String for the Data type , and enter 10 for Precision.
Ty pically , the repository administrator Leave the Reusable checkbox unchecked.
w ould create reusable metadata
ex tensions. Enter your name in the Value field for A uthor.
Enter the current date [using the syntax mm/dd/yyyy] in
the Value field for Creation Date :

Click OK to save the source definition.

PowerCenter 9.x Level I Developer Lab Guide 1-7


Lab 1. Defining Sources & Targets

Step 8. Save all work.

Add the Repository toolbar to the PowerCenter client by


selecting Tools | Customize.
The Customize dialog box appears.
Check the Repository checkbox on the Toolbars tab:

Click OK.
The new toolbar appears at the top right of the Designer
window:

Note that all w ork must be manually sav ed Save all work by selecting Repository | Save or by typing
in the Pow erCenter Designer. Additionally ,
w ork can only be sav ed in one folder at a Ctrl-S.
time. The Sav e command will sav e the
contents of the folder that is currently
In the output windows Save tab, scroll up for a message
activ e in the w orkspace. confirming your work is saved.
While w orking in the Pow erCenter
Designer, sav e often to av oid losing any
changes! Pow erCenter does not
automatically sav e changes in the case of
failure (netw ork, database, Repository
Serv er, etc).

Step 9. Clear the workspace.

Right-click anywhere in the workspace and select Clear


A ll.

To view a source definition in the workspace, select the


source definition in the Navigator window, then drag and
drop it into the Workspace window.

1- 8 PowerCenter 9.x Level I Developer Lab Guide


Lab 1. Defining Sources & Targets

Exercise 2: Import a Target Schema


In this exercise, the student will import a target definition for
the relational database table, ODS_EMPLOYEE.
Step 1. Start the PowerCenter Designer.

If the PowerCenter Designer application is not already


running, select Start | Programs | Informatica Platform 9.0 |
PowerCenter 9.0 - Client | Designer.

Step 2. Open the Warehouse Designer.

Select Tools | Warehouse Designer, or click the Warehouse


Designer button in the toolbar.
Step 3. Import the structure of the ODS_EMPLOYEE
table.
Select Targets | Import from Database
The Import Tables dialog box appears.
Select the odbc_target ODBC data source connection
from the pull-down list.
Recall that, in the prev ious ex ercise, the Enter the database username and password:
sdbu database login did NOT include a
student number. But here, the tdbu login username: tdbuxx
DOES include a student number. This is owner: TDBUxx (or DBO for MS SQL Server & Sybase)
because all students share the same
source data, but each student has their password: tdbuxx
ow n TARGET schema. (xx is your assigned student number).
Click on Connect.
Expand the database owner name.
Expand the TA BLES node.
Select the ODS_EMPLOYEE table:

PowerCenter 9.x Level I Developer Lab Guide 1-9


Lab 1. Defining Sources & Targets

Click the OK button.


The new target table definition now appears in the
Warehouse Designer workspace:

Note that the EMPLOYEE target definition is also added to


the Targets folder in the Navigator window:

Step 4. Save the target definition.

Save all work by selecting Repository | Save or by typing


Ctrl-S.

1- 10 PowerCenter 9.x Level I Developer Lab Guide

S-ar putea să vă placă și