Академический Документы
Профессиональный Документы
Культура Документы
POWERCENTER 8X DESIGNER
1
Mahindra Satyam 2009 1
Module Objectives
In this module you will learn about The Power Center Designer Components Transformations
2
Mahindra Satyam 2009 2
Designer Overview
Designer has tools to help you build mappings and mapplets so you can specify
how to move and transform data between source and targets
The Designer has the following tools that we use to analyze sources, design
target schemas, and build source-to-target mappings
Source Analyzer Target Designer Transformation Developer Mapplet Designer Mapping Designer
3
Mahindra Satyam 2009 3
4
Mahindra Satyam 2009 4
5
Mahindra Satyam 2009 5
6
Mahindra Satyam 2009 6
Designer Overview
7
Mahindra Satyam 2009 7
Designer Components
Navigator Workspace Output Status Bar Overview Instance data Target data
What is a Transformation?? A transformation is a repository object that generates, modifies, or passes data Transformations in a mapping represent the operations the Informatica Server
performs on the data
Data passes into and out of transformations through ports that are linked in a
mapping or mapplet Ports can be one of the three types:
Input data is received Output data is provided Input/Output data passes directly through transformation unchanged
Designer Transformations
Aggregator Expression Filter Joiner Lookup Rank Sequence Generator Source Qualifier Stored Procedure Update Strategy Router Normalizer
10
Mahindra Satyam 2009 10
Transformation Types
Active Changes the number of rows passing through it Passive Do not change the number of rows passing through it Connected Connected to the transformations in the data flow Unconnected Not connected to any transformations in the data flow
11
Types Of Transformation
Active Transformation Passive transformations
12
Mahindra Satyam 2009 12
Aggregator Transformation The Aggregator is an active transformation The Aggregator transformation allow us to perform aggregate calculations,
such as averages and sums
13
Mahindra Satyam 2009 13
Group by port
Sorted input
Aggregate cache
Store group values in a index cache and row data in the data cache
14
14
Aggregator Transformation
Aggregation Statement
15
Mahindra Satyam 2009 15
Aggregator Transformation
Conditional Clauses
We use conditional clauses in the aggregate expression to reduce the number of rows used in the aggregation The conditional clause can be any clause that evaluates to TRUE or FALSE
Null Values in Aggregate Functions When we configure the Integration Service, we can choose how we want
the Integration Service to handle null values in aggregate functions
We can choose to treat null values in aggregate functions as NULL or zero By default, the Integration Service treats null values as NULL in aggregate
functions
16
Mahindra Satyam 2009 16
17
Expression Transformation
To calculate values in a single row before we write to the target To test conditional statements To perform calculations involving multiple rows, such as sums or averages To perform any non-aggregate calculations
Expression Statement
18
Mahindra Satyam 2009 18
19
Filter Transformation
Used to filter rows in a Mapping Active transformation Specify a filter condition which returns TRUE or FALSE Records that return TRUE are allowed to pass Filtered records are lost
20
Mahindra Satyam 2009 20
Filter Condition
Filter Condition is entered in the Expression Editor of the Filter transformation The transformation language is used to enter the filter condition expression
Filter Condition
21
22
Joiner Transformation
An active transformation Used to join source data from two related heterogeneous sources residing in different locations or file systems We can also join data from the same source Joins sources with at least one matching column Uses a condition that matches one or more pairs of columns between the two sources We can use the following sources with the joiner transformation
Two relational tables existing in separate databases Two flat files in potentially different file systems Two different ODBC sources A relational table and an XML source A relational table and a flat file source Two instances of the same XML source
23
Mahindra Satyam 2009 23
Joiner Transformation
Settings for joiner Master and detail source One of the sources is specified as the master source, and the other as the detail source Type of join Normal (Default) Master Outer Detail Outer Full Outer
Mahindra Satyam 2009 24
Condition of join
Perform joins in a database when possible Join sorted data when possible For an unsorted Joiner transformation, designate the source with fewer rows as the master source For a sorted Joiner transformation, designate the source with fewer duplicate key values as the master source
25
Mahindra Satyam 2009 25
a2
26
Lookup Transformation
Used to look up data in a relational table, view, or synonym Passive Transformation We can import a lookup definition from any flat file or relational database to which both the PowerCenter Client and Integration Service can connect The Integration Service queries the lookup source based on the lookup ports in the transformation Can be Connected/Unconnected It compares Lookup transformation port values to lookup source column values based on the lookup condition
Mahindra Satyam 2009 27
27
Lookup Transformation
To configure a Lookup Transformation the following components are defined:
28
Look up condition
29
30
31
32
Lookup Caches The Integration Service builds a cache in memory when it processes the
first row of data in a cached Lookup transformation
It allocates memory for the cache based on the amount we configure in the
transformation or session properties
The Integration Service stores condition values in the index cache and
output values in the data cache
The Integration Service queries the cache for each row that enters the
transformation
36
Rank Transformation
Used to select only the top or bottom rank of data Active transformation Generates the Rank Index Grouping can be done
37
38
The Sequence Generator Transformation is used to generate numeric values It is a Passive Transformation It has two predefined output ports CURRVAL NEXTVAL The output ports cannot be changed No ports can be added Sequence Generator Transformation can be used to generate numeric values for the following: Create keys Replace missing values Cycle through a sequential range of numbers
39
The Integration Service generates a value each time a row enters a transformation, even if that value is not used
When NEXTVAL is connected to the input port of another transformation, Integration Service generates a sequence of numbers When CURRVAL is connected to the input port of another transformation, Integration Service generates the NEXTVAL value plus one
We might reuse a Sequence Generator when we perform multiple loads to a single target
40
Mahindra Satyam 2009 40
CURRVAL is the NEXTVAL value plus one or NEXTVAL plus the Increment By value. Connecting CURRVAL and NEXTVAL Ports to a Target
When we run the workflow, the Integration Service generates the following values for NEXTVAL and CURRVAL. If we connect the CURRVAL port without connecting the NEXTVAL port, the Integration Service passes a constant value for each row
41
1 2 3 4 5
41
Mahindra Satyam 2009
OUTPUT Current Value = 1, Increment By = 1 When we run the workflow, the Integration Service generates the following constant values for CURRVAL
CURRVAL 1 1 1 1 1
42
Mahindra Satyam 2009 42
43
A Source Qualifier is an active transformation The Source Qualifier represents the rows that the Integration Service reads when it executes a session When we add a relational or a flat file source definition to a mapping source Qualifier transformation automatically comes
44
Mahindra Satyam 2009 44
Join data originating from the same source database Filter records when the Integration Service reads source data Specify an outer join rather than the default inner join Specify sorted ports Select only distinct values from the source Create a custom query to issue a special SELECT statement for the Integration Service to read source data
45
Mahindra Satyam 2009 45
From the Properties tab, select SQL Query Click Generate SQL Click Cancel to exit
Example of source Qualifier Transformation We might see all the orders for the month, including order number, order amount, and customer name The ORDERS table includes the order number and amount of each order, but not the customer name. To include the customer name, we need to join the ORDERS and CUSTOMERS tables.
46
46
SQL Query:
We can use one Source Qualifier transformation to join data from multiple relational tables. These tables must be accessible from the same instance or database server
Sorted Ports:
The Integration Service adds the configured number of columns to an ORDER BY clause, starting from the top of the Source Qualifier transformation. The source database sort order must correspond to the session.
47
Mahindra Satyam 2009 47
48
A Stored Procedure is a passive transformation A Stored Procedure transformation is an important tool for populating and maintaining databases. Database administrators create stored procedures to automate tasks that are too complicated for standard SQL statements Stored procedures run in either connected or unconnected mode The mode we use depends on what the stored procedure does and how we plan to use it in a session We can configure connected and unconnected Stored Procedure transformations in a mapping
49
Mahindra Satyam 2009 49
50
Update Strategy
An Update Strategy is an active transformation When we design a data warehouse, we need to decide what type of information to store in targets. As part of the target table design, we need to determine whether to maintain all the historic data or just the most recent changes The model we choose determines how we handle changes to existing rows. In PowerCenter, we set the update strategy at two different levels
51
Mahindra Satyam 2009 51
52
Mahindra Satyam 2009 52
53
Update Strategy
To control how rows are flagged for insert, update, delete, or reject within a mapping, add an Update Strategy transformation to the mapping Define how to flag rows when we configure a session We can flag all rows for insert, delete, or update, or we can select the data driven option, where the Integration Service follows instructions coded into Update Strategy transformations within the session mapping Define insert, update, and delete options for each target when we configure a session
54
Mahindra Satyam 2009 54
Update Strategy
You can set the following update strategy options:
Insert. Select this option to insert a row into a target table Delete. Select this option to delete a row from a table Update. You have the following options in this situation: Update as Update. Update each row flagged for update if it exists in the target table Update as Insert. Inset each row flagged for update Update else Insert. Update the row if it exists. Otherwise, insert it Truncate table. Select this option to truncate the target table before loading data
55
55
When we configure a session, we have several options for handling specific database operations, including updates.
When we configure a session, we can select a single database operation for all rows using the Treat Source Rows As setting Configure the Treat Source Rows As session property
56
56
57
Router Transformation A Router transformation is an Active Transformation. A Router transformation is similar to a Filter transformation because both transformations allow us to use a condition to test data A Filter transformation tests data for one condition and drops the rows of data that do not meet the condition. However, a Router transformation tests data for one or more conditions and gives us the option to route rows of data that do not meet any of the conditions to a default output group If we need to test the same input data based on multiple conditions, use a Router transformation in a mapping instead of creating multiple Filter transformations to perform the same task
58
Mahindra Satyam 2009 58
Router Transformation
Group tab in Router Transformation Click the Group Filter Condition field to open the Expression Editor. Enter a group filter condition. Click Validate to check the syntax of the conditions we entered. Click OK. Connect group output ports to transformations or targets. Choose Repository-Save
59
Mahindra Satyam 2009 59
Router Transformation
A Router transformation has the following types of groups. Input Output There are two types of output groups. Working with Ports User-defined groups Default group A Router transformation has input ports and output ports. Input ports reside in the input group, and output ports reside in the output groups
Port tab in Router Transformation Router Transformation Components
We can create input ports by copying them from another transformation or by manually creating them on the
60
60
Router Transformation
Connecting Router Transformations in a Mapping
61
Demonstration: Router
62
Reusable Transformation
Reusable transformation is a transformation that can be used in multiple
mappings
Design it in the Transformation Developer Promote a non-reusable transformation from the Mapping Designer
63
Mahindra Satyam 2009 63
Reusable Transformation
Creating Reusable Transformation
When we
change a port name, expressions that refer to the port are no longer valid in the reusable transformation, mappings that use the transformation are no longer valid
Demonstration: Reusable
65
66
Mahindra Satyam 2009 66
Columns tab
Edit
column information such as column names, data types, precision, and formats.
Properties tab
We
can edit the default numeric and date time format properties in the Source Analyzer and the Target Designer. can extend the metadata stored in the repository by associating information with repository objects, such as flat file definitions.
67
67
68
Once you create user-defined functions, we can manage them from the UserDefined Function Browser dialog box. We can also use them as functions in the Expression Editor
We
create a user-defined function in the Transformation Developer. Configure the following information when we create a user-defined function
Name Type Description Arguments Syntax
69
Mahindra Satyam 2009 69
70
Mahindra Satyam 2009 70
Click OK The Designer assigns the data type of the data the expression returns. The data
types have the precision and scale of transformation data types.
Click OK The expression displays in the User-Defined Function Browser dialog box.
71
Mahindra Satyam 2009 71
72
Mapplet Designer
A mapplet is a reusable object that we create in the Mapplet Designer. It contains
a set of transformations and mappings we reuse that transformation logic in multiple
Use multiple source definitions and source qualifiers to provide source data for a
mapping
Accept data from sources in a mapping If we want the mapplet to receive data from the mapping, we use an Input
transformation to receive source data
A mapplet can contain as many transformations as you need We can create a mapplet to feed data to multiple transformations Contain unused ports
Mahindra Satyam 2009 73
73
An input transformation must receive data from a single active source A mapplet must contain at least one Input transformation or source definition
with at least one port connected to a transformation in the mapplet and same applies for output transformation
When a mapplet contains a source qualifier that has an override for the default
SQL query, we must connect all of the source qualifier output ports to the next transformation within the mapplet
We cannot include PowerMart 3.5-style LOOKUP functions in a mapplet We cannot include the following objects : Normalizer transformations, Cobol
sources, XML Source Qualifier transformations, XML sources and targets, Preand post- session stored procedures and other mapplets
74
Mahindra Satyam 2009 74
Demonstration: Mapplet
75
Data Profiling
Data profiling is a technique used to analyze source data PowerCenter Data Profiling can help us to evaluate source data and detect
patterns and exceptions. we can profile source data to suggest candidate keys, detect data patterns and evaluate join criteria
profile profile
Custom
76
Mahindra Satyam 2009 76
Data Profiling
Steps To Create Auto Profile: we can profile the entire source. To create an auto profile. Select the source definition in the Source Analyzer or mapplet in the Mapplet Designer you want to profile. Launch the Profile Wizard from the following Designer tools.
When we create an auto profile, we can profile groups or columns in the source. Or,
77
Mahindra Satyam 2009 77
Data Profiling
We can create a custom profile from the following Designer tools Source Analyzer. Click Sources > Profiling > Create Custom Profile. Mapplet Designer. Click Mapplets > Profiling > Create Custom Profile. Profile Manager. Click Profile > Create Custom.
78
Mahindra Satyam 2009 78
Profile Manager
Profile Manager is a tool that helps to
manage data profiles.
Profile View
Debugger Overview
We can debug a valid mapping to gain troubleshooting information about data and error conditions.
Debugger is used in the following situations: Before we run a session After we run a session Create breakpoints Configure the Debugger Run the Debugger Monitor the Debugger Modify data and breakpoints
80
Mahindra Satyam 2009 80
Debugger Overview
Create Breakpoints Goto mapping<<debugger<<edit transformations. Choose the instant name, breakpoint type. And then ADD to add the breakpoints. Give the condition for data breakpoint type. Give no. of errors before we want to stop. Run The Debugger Got mapping<debugger<start debugger Click next and then choose the session as create debug session other wise choose existing session Click on next
81
Mahindra Satyam 2009 81
Debugger Overview
Choose
connections of target and source and click next. Click on next Debug Indicators
82
Mahindra Satyam 2009 82
Review Summary
83
Mahindra Satyam 2009 83
Review
Designer is used to create mappings that contain transformation instructions for the Integration Service . (True/False) A Filter Transformation is an -------------------------- Transformation. User-defined functions are not available to other users in a repository.(True/False) Explain briefly about connected and unconnected transformation
84
Mahindra Satyam 2009 84
THE END
85
Mahindra Satyam 2009 85