Sei sulla pagina 1di 10

Lab 1

Defining Sources & Targets

Lab at a Glance................................................................2
Objectives..........................................................................
Duration.............................................................................
Exercises..........................................................................3
Exercise 1: Import a Source Schema.................................
Exercise 2: Import a Target Schema..................................

PowerCenter 7 Basics 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 7 Basics 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 7.0 |
PowerCenter 7.0 - Client | Designer .
You can turn off the Start Page by selecting Windows |
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 between an
expanded folder and an open folder
even though they both appear the same in
the Navigator window.

Right-click on the Studentxx folder and select Open.


When a folder is opened for the first time, the Source
Analyzer tool will be opened in the workspace.

Before PowerCenter objects can be


added, deleted or modified, a folder must
be explicitly opened.

PowerCenter 7 Basics 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 Analyzer,

or click the Source Analyzer

button in

the toolbar.

The Workbook View allows easy


navigation among open folders.

The Source Analyzer window opens by default


maximized and with workbook tabs. If your setting are
different:

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 PowerCenter source definition defines
the structure, or schema, of source data to
be read by the PowerCenter Server. For a
relational source, this includes information
about each of the columns including key
designation, data type, precision and
scale.

Select Sources | Import from Database.


The Import Tables dialog box appears.

Select the ODBC data source that corresponds to the


location of the source tables from the pull-down list.
The database user and password are
NOT the same as the PowerCenter
repository user and password.

There is no student number after sdbu; all


students read from the same source
schema.

Enter the database username and password:


username: sdbu
owner: SDBU
password: sdbu

Note that the Owner name field


defaults to the username that was
entered.

1- 4

PowerCenter 7 Basics 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 TABLES node.
Select the EMPLOYEE table:

Click the OK button.


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

PowerCenter 7 Basics 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 7 Basics 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 with a particular
column, highlight the column and enter a
description in the Description field.

Click

Apply.

Step 7. Create metadata extensions.


PowerCenter allows developers to extend
the metadata stored in the repository by
associating information with individual
objects in the repository.
There are two types of metadata
extensions non-reusable and reusable.
Non-reusable metadata extensions are
unique to each object, and will not appear
in other objects of the same type.
Reusable metadata extensions will appear
in every object of the same type.
Typically, the repository administrator
would create reusable metadata
extensions.

Click on the Metadata Extensions tab.


Click on the Add Metadata Extension

button.

Enter Author into the Extension Name column of the new


entry.
Select String for the Data type, and enter 30 for Precision.
Add a second metadata extension and name it
Creation_Date.

Select String for the Data type, and enter 10 for Precision.
Leave the Reusable checkbox unchecked.
Enter your name in the Value field for Author.
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 7 Basics 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 work must be manually saved


in the PowerCenter Designer. Additionally,
work can only be saved in one folder at a
time. The Save command will save the
contents of the folder that is currently
active in the workspace.

Save all work by selecting Repository | Save or by typing


Ctrl-S.
In the output windows Save tab, scroll up for a message
confirming your work is saved.

While working in the PowerCenter


Designer, save often to avoid losing any
changes! PowerCenter does not
automatically save changes in the case of
failure (network, database, Repository
Server, etc).

Step 9. Clear the workspace.


Right-click anywhere in the workspace and select Clear
All.
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 7 Basics 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 7.0 |
PowerCenter 7.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 previous exercise, the
sdbu database login did NOT include a
student number. But here, the tdbu login
DOES include a student number. This is
because all students share the same
source data, but each student has their
own TARGET schema.

Enter the database username and password:


username: tdbuxx
owner: TDBUxx (or DBO for MS SQL Server & Sybase)
password: tdbuxx
(xx is your assigned student number).
Click on Connect.
Expand the database owner name.
Expand the TABLES node.
Select the ODS_EMPLOYEE table:

PowerCenter 7 Basics 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 7 Basics Lab Guide

Potrebbero piacerti anche