Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword
Like this
0 of .
Results for:
No results containing your search query
P. 1
Transaction Control Transformation Overview

Transaction Control Transformation Overview

Ratings: (0)|Views: 1,039|Likes:
Published by ypraju

More info:

Published by: ypraju on Dec 21, 2009
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as DOC, PDF, TXT or read online from Scribd
See more
See less





Transaction Control Transformation Overview 
By PenchalaRaju.Yanamala
Transformation type:
ActiveConnectedPowerCenter lets you control commit and roll back transactions based on a set of rows that pass through a Transaction Control transformation. A transaction is theset of rows bound by commit or roll back rows. You can define a transactionbased on a varying number of input rows. You might want to define transactionsbased on a group of rows ordered on a common key, such as employee ID or order entry date.In PowerCenter, you define transaction control at the following levels:
Within a mapping.
Within a mapping, you use the Transaction Controltransformation to define a transaction. You define transactions using anexpression in a Transaction Control transformation. Based on the return value of the expression, you can choose to commit, roll back, or continue without anytransaction changes.
Within a session.
When you configure a session, you configure it for user-defined commit. You can choose to commit or roll back a transaction if theIntegration Service fails to transform or write any row to the target.When you run the session, the Integration Service evaluates the expression for each row that enters the transformation. When it evaluates a commit row, itcommits all rows in the transaction to the target or targets. When the IntegrationService evaluates a roll back row, it rolls back all rows in the transaction from thetarget or targets.If the mapping has a flat file target you can generate an output file each time theIntegration Service starts a new transaction. You can dynamically name eachtarget flat file.
You can also use the transformation scope in other transformationproperties to define transactions.
Transaction Control Transformation Properties
Use the Transaction Control transformation to define conditions to commit androll back transactions from transactional targets. Transactional targets includerelational, XML, and dynamic MQSeries targets. Define these parameters in atransaction control expression on the Properties tab. A transaction is the row or set of rows bound by commit or roll back rows. The number of rows may vary for each transaction.When you configure a Transaction Control transformation, you define thefollowing components:
Transformation tab.
You can rename the transformation and add a descriptionon the Transformation tab.
Ports tab.
You can add input/output ports to a Transaction Controltransformation.
Properties tab.
You can define the transaction control expression, which flagstransactions for commit, roll back, or no action.
Metadata Extensions tab.
You can extend the metadata stored in therepository by associating information with the Transaction Controltransformation.
Properties Tab
On the Properties tab, you can configure the following properties:Transaction control expressionTracing levelEnter the transaction control expression in the Transaction Control Conditionfield. The transaction control expression uses the IIF function to test each rowagainst the condition. Use the following syntax for the expression:IIF (condition, value1, value2)The expression contains values that represent actions the Integration Serviceperforms based on the return value of the condition. The Integration Serviceevaluates the condition on a row-by-row basis. The return value determineswhether the Integration Service commits, rolls back, or makes no transactionchanges to the row. When the Integration Service issues a commit or roll backbased on the return value of the expression, it begins a new transaction. Use thefollowing built-in variables in the Expression Editor when you create a transactioncontrol expression:
The Integration Service does not performany transaction change for this row. This is the default value of the expression.
The Integration Service commits the transaction,begins a new transaction, and writes the current row to the target. The currentrow is in the new transaction.
The Integration Service writes the current row to thetarget, commits the transaction, and begins a new transaction. The current rowis in the committed transaction.
The Integration Service rolls back the currenttransaction, begins a new transaction, and writes the current row to the target.The current row is in the new transaction.
The Integration Service writes the current row to thetarget, rolls back the transaction, and begins a new transaction. The current rowis in the rolled back transaction.If the transaction control expression evaluates to a value other than commit, rollback, or continue, the Integration Service fails the session.
You want to use transaction control to write order information based on the order entry date. You want to ensure that all orders entered on any given date arecommitted to the target in the same transaction. To accomplish this, you cancreate a mapping with the following transformations:
Sorter transformation.
Sort the source data by order entry date.
Expression transformation.
Use local variables to determine whether the dateentered is a new date.The following table describes the ports in the Expression transformation:Port NameExpressionDescriptionDATE_ENTEREDDATE_ENTEREDInput/Output port.Receives and passes thedate entered.NEW_DATEIIF(DATE_ENTERED=PREVDATE,0,1)Variable port.Tests current value for DATE_ENTERED againstthe stored value for DATE_ENTERED in thevariable port, PREV_DATE.PREV_DATEDATE_ENTEREDVariable port.Receives the value for DATE_ENTERED after theIntegration Serviceevaluates the NEW_DATEport.DATE_OUTNEW_DATEOutput port.Passes the flag fromNEW_DATE to theTransaction Controltransformation.Note: The Integration Service evaluates ports by dependency. The order in whichports display in a transformation must match the order of evaluation: input ports,variable ports, output ports.
Using Transaction Control Transformations in Mappings

Activity (11)

You've already reviewed this. Edit your review.
1 hundred reads
1 thousand reads
Hanu Rao liked this
veerendrakbongu liked this
Jeya Prabakar liked this
Mani Angara liked this
salwand liked this
vthumma liked this
natrajdreams liked this

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->