Transformation 20
Transformation 20
S. PA
Transformation I O V R M L Important GE
No
Source Qualifier SQ
8
1 A/C * * Distinct,
Filter FIL
4
2 A/C * * Expression
Expression EXP
3 P/C * * * Group by port, Sorted input, Expression
Sequence Generator SEQ
10
4 P/C * * NEXTVAL,CURVAL
Router RTR
5 A/C * * Expression
Union UN
6 A/C * *
Transactional control TC
7 A/C * *
Sorter SRT
7
8 A/C * * Distinct
Normalizer NRM
9 A/C * * Sequence, restart
Stored Procedure SP
11 P/C-UC * * * Bad file created
Joiner JNR
12 A/C * * * Sorted Input
Aggregator AGG
13 A/C * * * Group by port, Sorted input
Rank RNK
14 A/C * * * * Group by port, Expression
Look-up LKP
15 A/C-UC * * * *
XML Source Qualifier XML
16 A/C
Custom CT
17 A-P/C * *
External Procedure EP
18 P/C-UC * * *
DD_INSERT, DD_UPDATE, DD_DELETE,
DD_REJECT - UP as UP , UP as IN, UP else In ,
Update Strategy UPD Tranc
19 A/C * * EXPRESSION - Reject file created
DEFINITION
AGGREGATOR FUNCTIONS
PORTS
PROPERTIES
COMPONENT
AGGREGATOR CACHE:
The PCS stores data in the aggregate cache until it complete the aggregator calculation
Index Cache : It stores the group value, As Configured in the group by port
Data Cache : Stores calculation ( Row data Stores, output value) Based on group-by-ports
OPTIMIZATION
− Group by simple columns like numbers instead of string or date
− Use sorted input
− Use incremental aggregation
− Minimize the aggregate function
− Before filter transformation best ( Reduce the Data)
− Lookup unconnected & stored procedure – we can call
DEFINITION
EXPRESSION FUNCTIONS
COMPONENT
Expression - we can call – Unconnected Stored Procedure and Unconnected Lookup
PORTS
PORTS
PROPERTIES
OPTIMIZATION (TIPS)
TROUBLESHOOTING
FUNCTIONS
PORTS
COMPONENT
Case sensitive string comparison - (Character data only enable)
Cache directory -
Join condition -
Joiner type - ( Normal, Master Outer, Detail Outer, Full outer)
CACHE
Joiner Data cache size : Out put value only
Joiner Index cache size : The index cache holds rows from the master source that are in
the join condition.
DEFINITION
This an Active and Connected Transformation
Which is used to identify the Top or Bottom rank of data based on condition.
Rank transformation to return the largest or smallest numeric value in a port or group
We can use a rank transformation to return the strings at the top or the bottom of a session
sort order.
FUNCTIONS
ASCII - Binary sort order
UNICODE - Session sort order in session properties (code Page)
Binary sort order
Binary value string and returns rows with the highest binary values for string
PORTS
INPUT ( I) - minimum of one
OUTPUT (O) - minimum of one
VARIABLE (V) - Stores values or calculations to use in an expressions
RANK (R) - Only one (default port-only out put return only)
EXPRESSION -
GROUP BY PORT -
PROPERTIES
CACHE DIRECTORY - $PMCacheDir
TOP / BOTTOM - TOP
NUMBER OF RANKS -
CASE SENSITIVE STING COMPARISON -
TRACING LEVEL - normal
RANK DATA CACHE SIZE - 2000000
RANK INDEX CACHE SIZE - 1000000
TRANSFORMATION SCOPE - All input (All input/ Transformation)
CACHE
Index Cache Data Cache
Stores group values as configured in the Stores ranking information based on the group
group by ports. by ports.
Can must run the session on a 64bit PoweCen
PERFORMANCE
- Configure ASCII mode
FUNCTIONS
- Sort data from relational or flat file source.
- The sorter transformation treats the data passing through each successive sort key port as a
Secondary sort of the previous port.
COMPONENT
DIRECTION (V) - Ascending or Descending
PORTS
INPORTS (I) - Receive data from source
OUTPORTS (O) - Pass the data to other Transformation
KEY (V) - Which one u want to sort the A/D)
PROPERTIES
Sorter cache size :10000000 #input rows + [ (∑column size) + 16]
Case sensitive : (enable)Uppercase higher than lower case
Work directory : #PMTempDir (Temp file store-sorting time
Distinct : enable– eliminate duplicate value in out put
Tracing level : normal ( Terse / Normal / Verb init / Verb data )
Null treated low : (enable–treat null values higher than any other value)
Transformation scope :All input 1) Transaction 2) All Input
SORT DATA
Each successive sort key port as a secondary sort of the previous port
FORMULA
# input rows [( Σ column size ) + 16]
PERFORMANCE
- Sorter transformation to sort data passing through an Aggregator transformation configured to use
sorted transformation
- You should configure sort criteria to PCS applies to all sort key ports
IMPORTANT TOPIC
Target load order - Constraint based load
Parameter & variable - $$$ session start time
Default query -
SQL Overwrite -
Override the default SQL query (user defined join, source filter, no of sorted ports, select distinct
setting
PORTS
INPORTS (I) - Receive data from source
OUTPORTS (O) - Pass the data to other Transformation
PROPERTIES
SQL Query - (custom query replace the default query)
User Defined join - (user defined join)
Source filter - (filter condition)
No of Sorted ports - 0 (order by includes no of ports-sort order)
Tracing level - normal ( Terse / Normal / Verb init / Verb data )
Select Distinct - (enable-unique values from source) only enable flat file
Pre SQL - (before reads to the source)
Post SQL - (after it writes to the target)
OPTIMIZATION
- Use the source qualifier to filer. The source qualifier limits the row set extracted from the source where
as filter limits the row set sent to a target.
PERFORMANCE
- Join data originating from the same source database
- Filter rows when the PCS reads source data
- Specify an outer rather than the default inner join
- Specify sorted ports
- Select only distinct values from the source
- Create custom query to issue a special select statement for the PCS to read source data
- Data type we can’t change, if you can change mapping is invalid.
Target Load Order:
- Multiple SQ connected multiple target.
- One SQL provide multiple target you can enable constraint based loading in a session to have the
PCS load data based on target table PK & FK relationship.
Default Join:
- PK – FK Relationship
- Matching Data Type
Custom Join:
- Custom don’t have PK & FK relationship
- Data type of columns used for the join don’t match
Outer Join support :
- Default query outer join statement nested query created -( left outer, right outer, full outer)
PORTS
Input Port - (enable ) only input group
Output Port - (not visible) - only output group ( because group only findout)
GROUP
Input group - user define group to test a condition based on incoming data
Output group - 1. user defined group
2. Default group
- we can’t modify on delete output ports
- only connected target group
- out put group of sequential only default created.
- If you want the PCS to drop all rows in the default group, don’t connect it to a
transformation or a Target in a mapping.
- If rows meet more then one group filter condition, the PCS Passes this rows multiple time
PROPERTIES
Tracing Level -
COMPONENT
Input and Output groups
Input and Output ports
Group filter conditions
PERFORMANCE &TIPS
- One group can be connected to more then one transformation or target
- One output ports in a group can be connected to multiple transformation or targets.
- Multiple output ports in one group can be connected to multiple transformations or targets
- More than one group cannot be connected to one transformation or target
- We can’t connect more then one group to multiple input group Transformation, except for joiner
transformations, when you connect each output group to different input group.
FUNCTIONS
CURRVAL - NEXTVAL + INCREMENTAL BY VALUE
One row in each block
Currval port without connecting the nextval port
PowerCenter server passes a constant value for each row
One row in each block
NEXTVAL - primary key – down stream transformation
Unique PK values formation to generate the sequential based on the current value
PROPERTIES
Start value - 0 cycle option (enter the value complete the cycle value after restart the
value
Increment by - 1 D b/w 2 consecutive values from the nextval port the default values is 1
End value - (1-2147483647) the maximum values powerCenter generates.
- sequence is not configured to cycle it fails the session.
Current value- enter you want first value PC server to use in sequence
-must be generate than or equal to the start value and less than the end
value.
Cycle - If selected –sequence range (up to limit)
- If not selected – session failure with overflow error.
Number of cached values –1 no of cached values determine the number of values the PC
server caches at one time
Reset - If selected, PC generates values based on the original current value for each
session (other wise)
Reflect the last – generated value
(Reusable is disabled for reusable sequence generator Transformati
Tracing level - level of information
PERFORMANCE
NON REUSABLE SEQUENCE GENERATOR
Cache enable limit grater than 0.
- row skipped the value.
- discards the unused values.
REUSABLE SEQUENCE GENERATOR
-Cache enable some upto limit Eg.1000
OPTIMIZATION
− Use reusable sequence generator if the same sequence generator is to be used in more than one sessions.
− Optimize performance by connecting only the nextval port in a mapping
− Sequential reusable and use it in multiple mapping.
PROPERTIES
Update strategy expression -0 (DD_INSERT-0,DD_UPDATE-1,DD_DELETE-2,DD_REJECT-3,)
Forward rejected rows - enable - flags the rows for reject and writes them to the session reject file.
Tracing level - normal ( Terse / Normal / Verb init / Verb data )
FUNCTION
SCD-1 : It keeps the most recent updated values in the target
SCD-2 : It keeps the full historical business information in the target
The full history is maintain by inserting the new record in the target
SCD-3 : It keeps previous value and current
PERFORMANCE
1. Whenever use Dynamic cache - at the time you must use UPD transformation
2. Dynamic lookup use you can must select
1. Select insert 2. select update as update 3. Don’t select delete
3. UPD - > AGG Use only – Update , Insert , Delete
4. AGG - > UPD Use only – Update , Insert , Delete, Reject
UPDATE STRATEGY
Dynamic lookup – u must use UPD transformation
Business Logic :
IFF((current date>Previousdate) , DD_reject, DD_update)
Update, Insert , Delete
UPD AGG
PROPERTIES
Look up SQL Override (R) -
Lookup table name (R) -
Lookup caching enabled (R/F) -
Lookup policy on multiple match ”-
Lookup condition -
Location information -
Source type -
Re cache if stale
Tracing level
Lookup cache directory name
Lookup cache initialize
COMPONENT
Look up table
Ports
Properties
Condition
Metadata Extensions
LOOK UP CACHE
Persistent cache
Re cache from database
Static cache
Dynamic cache
Shared cache
PERFORMANCE
Cached lookup:By indexing the columns in the lookup Order by
Look up
To look up data in Flat File, Table, Synonym, View.
Use multiple lookup transformation in a mapping
Performs the following tasks
Get related value
Perform calculations
Updated slowly changing dimension tables.
Connected Lookup
Static cache : return value from the lookup query.
Dynamic cache : Case 1 : No rows found in cache – inserts the record
Case 2 : Row found in cache - updates the records
Unconnected Lookup
- Common use into update slowly changing dimension – tables
- Returns one value into the return port of look up transformation
Connected or Unconnected
- Receive input and send output in different ways
Cached or uncached
Dynamic - Relational
Static - Flat file
Cached - Performance ( store the value whenever you want lookup table refer only
Uncached - each time lookup the value.
PROPERTIES
Lookup SQL override (R) -
Lookup table name (R) - Table, Synonym, View
Lookup caching enabled (R/F) -
Lookup policy on multiple match (F/R)- enable mean (first, last, return an error)
Look Condition (F/R) -
Connection information (R) -
Source Type (R/F) -
Lookup Query
Default lookup query
• SELECT - SQL override
• ORDER BY - we can use enabled the cache ( u can’t view this )
Overriding the lookup Query
• override the ORDER BY statement
• A lookup table name(or) columns contain a reserved word - 'reserved word’
• Use mapping parameter & variables
• A Lookup column name contains a slash (/) character
• Add where statement
• Other
Overriding the ORDER BY Statement
Order by - -
Reserved words
- lookup or column names contain a database reserved word
such as Month,Year – session fails
- resword.txt (PC initialization Directory)
Guideline to Overriding the Lookup Query
- SQL override only lookup SQL query relational only
- Cache not enable PCS doesn’t recognize the override
- Default query or configure override – lookup / output port – add or subtract port from the
SELECT statement, the session fails,
- Filter before lookup using dynamic cache when you add where clause to lookup SQL override
Lookup condition
1 . Data type in condition must match
2. Multiple condition – use AND, OR
3. Flat file for sorted input – session fail (condition are not grouped so you select group column)
Dynamic cache
1. Only = operator
2. can’t handling for multiple matches – otherwise PCS fail
Lookup Cache
Index cache - Condition value
Data cache - Output value
1. Persistent Cache :
- Save and reuse them the next time
2. Recache from source
- persistent cache is not synchronized with the lookup table
- Rebuild
3. Static Cache
- Read only
- Default cache
- PCS doesn’t update the cache
4. Dynamic Cache
- insert new rows or update existing row
- Dynamic insert & update – pass data to target table
- Can’t use flat file
5. Shared Cache
- use can use multiple transformation
1. PERSISTENT CACHE :
- PCS save or delete lookup cache files after successful session based on the lookup cache
persistent property.
- Lookup table doesn’t change between session you can configure the lookup transformation to
use a persistent lookup cache.
- PCS saves & reuses cache files from session to session so eliminating time required to read the
lookup table.
Non Persistent Cache
- Enable caching in lookup transformation the PCS delete the cache files at the end of a session
- Next time you run the session the PCS build the memory cache from the database.
Persistent cache
- If you want save and reuse the cache files you can configure the transformation
- Use persistent cache the lookup table doesn’t change between session runs
- Lookup table changes occasionally, can override session properties to re caches the lookup from
the database
- Use Persistent cache means you can specify a name for the cache file
- Rebuild the Lookup caches, lookup sources changed size the last time the PCS build the cache
- When you rebuild the cache the PCS create new cache file overriding existing persistent cache
file
- The PCS server write a message to the session log file when if rebuild the caches
- Don’t choose the to recache the lookup source PCS automatically rebuild the persistent cache
DEFINITION
- Union Transformation is a multiple input group transformation which is responsible for merging the
data coming from more then one source.
- Union Transformation also merge the data Hetero geneous sources also.
- Union Transformation is newly introduced in Informatica 7.1 version onwards.
- Union Transformation to the UNION ALL statement
- Union Transformation is developed using the custom Transformation.
FUNCTIONS
- Create Multiple input groups but only one output groups
- All Input groups and the out put groups must have matching port. The precision, data type, and scale
must be identical across all groups
- Union Transformation doesn’t remove duplicate rows.
- To remove duplicate rows you must add another transformation upstream from a union Transformation.
- Can’t use sequence generator or update strategy transformation upstream from a Union Transformation.
- Union Transformation doesn’t generate transaction.
COMPONENT
Transformation Tab : you can rename the transformation and add a description
Properties Tab : you can specify the Tracing level
Groups : you can create & delete input groups (Design displays groups you create
on the ports tab
Groups ports tab : you can create & delete ports for the input groups
We can’t modify ports, Initialization properties, meta data Extension or port attributes definition Tab
PORTS
Groups & ports :
Multiple input groups & one output groups, Design create output groups by default we can’t edit
or delete the outputs groups
MAPPING
- Union Transformation is a non blocking multiple input group Transformation
- When you add a Union Transformation to a mapping you must verify that you connect the same ports in
all inputs groups. If you connect all ports in one input group but don’t connect a port in another input
groups. If you connect all ports in one input groups, but don’t connect a port in another input group the
PCS passes Nulls to the unconnected ports
PROPERTIES
Mapping level - Session Level
Module identifies - Pmuniontrans
Function identifiers - pmunionfunc
Runtime Location - enable
Tracing Level - Normal enable
Is Partition able -
Inputs Must Block -
Is Active -
Update Strategy Transfomat -
Transformation Scope - Row
Generate Transformation -
Output Repeatable - Never
PERFORMANCE