4 informatica transformation types sq and exp

Post on 12-Jun-2015

1.438 views 0 download

Tags:

description

informatica transformation

Transcript of 4 informatica transformation types sq and exp

Transformation Types

Transformation Types

Source QualifierExpressionAggregatorSorterFilterJoinerLookupUpdate StrategyRouterSequence GeneratorUnionUnstructured dataTransaction Control

Source Qualifier Transformation

ConnectedActive

Source qualifier qualifies a relational or flat file source definition in a mapping

Source qualifier represents the rows that Integration Service reads when it executes a session

Source qualifier displays transformation data types. These determine how the source database binds data when Integration Service reads it. Do not alter data types in Source qualifier

Source Qualifier Tasks

Join data originating from same source databaseFilter records at the time of readSpecify an outer join instead of default inner joinSpecify sorted ports – Order by clauseSelect distinct values from sourceCreate a custom query to issue a special select statement to read

Data Extract

Integration Service generates a query for each source qualifier when it runs session Default query is SELECT statement for extracting data for each source column used in mappingDefault query does not contain columns that are not used in mapping

Default query override

In SQL query properties tab, alter or override the default queryDo not change the list of selected ports or the order they appear in the querySQL query overrides the user defined join, source filter, number of sorted ports and select distinct setting of the source qualifier

Joining source data

Source qualifier can be used to join multiple relational tables provided they are from same databaseJoiner Transformation is used if the sources are heterogeneous or flat filesDefault join is inner equijoin based on related keys in each table

Custom Join

Override the default join when:– Columns do not have primary-foreign key

relationship– Datatypes of columns used for join do not match– Specify different type of join such as outer join

Create primary foreign key relationship in Source Analyzer to join the two table in Source qualifier

Specifying Source Qualification

Override default SQL QueryEnter User defined JoinOuter Join – Left & RightCombine multiple joins in a source qualifier in following order

– Normal– Left Outer– Right Outer

Entering a Source filterSorting the source dataSelect DistinctAdding Pre and Post session SQL commands

Two tables from Oracle Source

Properties

User Defined Joins

Connected

Passive

Expression

Expression is used to calculate values in a single row before writing to the target.

Adjust Employee salariesConcatenate first and last namesConvert string to numbers (Phone N0. 932-1123-6789)Test conditional statements before passing data (Set output port for delayed payment etc.)

Ports

Input or Input-output ports – For each value used in expression

Output ports– Return value for the output port matches the

return value of expression– Multiple Expressions using same set of Input data

will have multiple Output ports for generating results

Example: Single Output Port

Input port– Unit Price– Units ordered

Expression– Unit Price * Units Ordered

Output Port– Total value of order

Example: Multiple Output Port

Input port– Employee Salary– Grade

Expression– Income Tax Formula– PF

Output Port– Income Tax amount– PF Amount

Expression Transformation-Creation

Name

Transformation Created

Edit Transformation

Add Ports

Configure Ports

Add Expression to Port

Validate Expression

Transformation Properties

Expression Transformation Creation Complete

Create Mapping to use Expression Transformation (Add Source & Targets)

Drag Expression Transformation

Link Ports (Manually and by Autolink)

Validate Mapping

Mapping Validation Result

Save Mapping

Run Mapping in Debugger

Functions for Expression

Special Functions

Expression Transformation Exercise

Use expression Transformation to populate Product price (Order Amt / Quantity)If Order Amt > 10000 insert discount cd=1 else 0