|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.informatica.powercenter.sdk.mapfwk.core.Table com.informatica.powercenter.sdk.mapfwk.core.Transformation com.informatica.powercenter.sdk.mapfwk.core.UpdateStrategyTransformation
public class UpdateStrategyTransformation
This class implements the Update Strategy Transformation. It extends the base
Transformation
to provide this functionality.
To control how rows are flagged for insert, update, delete, or reject within a mapping, add an Update Strategy transformation to the mapping. Update Strategy transformations are essential if you want to flag rows destined for the same target for different database operations, or if you want to reject rows. Frequently, the update strategy expression uses the IIF or DECODE function from the transformation language to test each row to see if it meets a particular condition. If it does, you can then assign each row a numeric code to flag it for a particular database operation.
The Update Strategy transformation is created using one or more InputSets and strategy condition.
The snippet code shows how to create the Update Strategy Transformation,
//create an Update Strategy Transformation using the constructor given below: Mapping mapping = ...; // mapping to which the transform should be added InputSet inputSets = ...; // the InputSet object String strategyExpr = ...; // the update stratgey expression TransformationProperties props = ...; // properties UpdateStrategyTransformation upStTrans = new UpdateStrategyTransformation ( "UpdateStTrans", "UpdateStTrans", "This is Update Strategy Transformation", "UpdateStTrans", mapping, inputSets, strategyExpr, props); //apply the transformation OutputSet outputSet = upStTrans.apply(); //get the first rowset as Update Strategy always returns a RowSet RowSet outRowSet = (RowSet)outputSet.getRowSets().get(0);
Field Summary |
---|
Fields inherited from class com.informatica.powercenter.sdk.mapfwk.core.Transformation |
---|
m_templateID, m_templateName, m_transformFieldAttr, sessionTransformInst |
Fields inherited from class com.informatica.powercenter.sdk.mapfwk.core.Table |
---|
m_bReusable, m_readOnly |
Constructor Summary | |
---|---|
UpdateStrategyTransformation()
Default Constructor |
|
UpdateStrategyTransformation(java.lang.String name,
java.lang.String busName,
java.lang.String desc,
java.lang.String instName)
Initialize the object with name, business name, description and instance name |
|
UpdateStrategyTransformation(java.lang.String name,
java.lang.String busName,
java.lang.String desc,
java.lang.String instName,
Mapping mapping,
java.util.Vector inputSets,
java.lang.String strategyExpr,
TransformationProperties properties)
Constructor for Update Strategy Transformation |
Method Summary | |
---|---|
OutputSet |
apply()
Apply the Transformation. |
Methods inherited from class com.informatica.powercenter.sdk.mapfwk.core.Transformation |
---|
add, addInitProp, defaultDuplicateNameRemovalSchema, genOutputSet, getGroupSet, getInitProps, getMapping, getOutFields, getOutputSet, getProperties, getSessionTransformInstanceKeySet, getSessionTransformInstanceProperty, getTemplateID, getTemplateName, getTransContext, getTransformationFieldAttr, getTransformationType, getTransformGroup, setGroupSet, setGroupSet, setMapping, setOutFields, setOutputSet, setReusable, setSessionTransformInstanceProperty, setTemplateIDAndName, setTransContext, setTransformationFieldAttr, setTransformationType, setTransformGroup, standardizeString |
Methods inherited from class com.informatica.powercenter.sdk.mapfwk.core.Table |
---|
addField, addMetaExtension, getBusinessName, getDescription, getField, getFields, getInstanceName, getMetaExtensions, getName, getReferencedField, isReadOnly, isReusable, removeField, removeMetaExtension, setBusinessName, setDescription, setFields, setInstanceName, setMetaExtensions, setMetaExtensionValue, setName, setReadOnly |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public UpdateStrategyTransformation()
public UpdateStrategyTransformation(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName)
name
- name of the tablebusName
- business namedesc
- descriptioninstName
- instance namepublic UpdateStrategyTransformation(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName, Mapping mapping, java.util.Vector inputSets, java.lang.String strategyExpr, TransformationProperties properties) throws InvalidTransformationException
name
- busName
- desc
- instName
- mapping
- inputSets
- strategyExpr
- properties
-
InvalidTransformationException
Method Detail |
---|
public OutputSet apply() throws InvalidTransformationException
Transform
InvalidTransformationException
- exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |