com.informatica.powercenter.sdk.mapfwk.core
Class LookupTransformation
java.lang.Object
com.informatica.powercenter.sdk.mapfwk.core.Table
com.informatica.powercenter.sdk.mapfwk.core.Transformation
com.informatica.powercenter.sdk.mapfwk.core.LookupTransformation
- All Implemented Interfaces:
- Transform
public class LookupTransformation
- extends Transformation
This class implements the Lookup Transformation. It extends the base
Transformation
to provide this functionality.
Use a Lookup transformation in a mapping to look up data in a flat file or a
relational table,view, or synonym. It compares Lookup transformation port
values to lookup source column values based on the lookup condition. Pass the
result of the lookup to other transformations and a target.
The code snippet for the Lookup Transformation is given below,
//create a Lookup Transformation using the constructor given below:
Mapping mapping = ...; // mapping to which the transform should be added
Vector vInputSets = ...; // collection of InputSet objects
SourceTarget sourceTgtObj = ...; // The SourceTarget object
String condition = ...; // The lookup condition
TransformationProperties props = ...; // properties
LookupTransformation lookupTrans = new LookTransformation( "LookupTrans", "LookupTrans",
"This is lookup transformation", "LookupTrans",
mapping, vInputSets, condition, props );
//apply the transformation
OutputSet outputSet = lookupTrans.apply();
//get the first rowset as Lookup always returns a RowSet
RowSet outRowSet = (RowSet)outputSet.getRowSets().get(0);
Constructor Summary |
LookupTransformation()
Default constructor |
LookupTransformation(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 |
LookupTransformation(java.lang.String name,
java.lang.String busName,
java.lang.String desc,
java.lang.String instName,
Mapping mapping,
java.util.Vector vInputSets,
SourceTarget sourceTgtObj,
java.lang.String condition,
TransformationProperties props)
Constructor for Lookup 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 |
LookupTransformation
public LookupTransformation()
- Default constructor
LookupTransformation
public LookupTransformation(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
- Parameters:
name
- name of the tablebusName
- business namedesc
- descriptioninstName
- instance name
LookupTransformation
public LookupTransformation(java.lang.String name,
java.lang.String busName,
java.lang.String desc,
java.lang.String instName,
Mapping mapping,
java.util.Vector vInputSets,
SourceTarget sourceTgtObj,
java.lang.String condition,
TransformationProperties props)
throws InvalidTransformationException
- Constructor for Lookup Transformation
- Parameters:
name
- busName
- desc
- instName
- mapping
- vInputSets
- sourceTgtObj
- condition
- props
-
- Throws:
InvalidTransformationException
apply
public OutputSet apply()
throws InvalidTransformationException
- Apply the Transformation.
- Returns:
- OutputSet object
- Throws:
InvalidTransformationException
- exception