com.informatica.powercenter.sdk.mapfwk.core
Class AggregateTransformation

java.lang.Object
  extended by com.informatica.powercenter.sdk.mapfwk.core.Table
      extended by com.informatica.powercenter.sdk.mapfwk.core.Transformation
          extended by com.informatica.powercenter.sdk.mapfwk.core.AggregateTransformation
All Implemented Interfaces:
Transform

public class AggregateTransformation
extends Transformation

The class AggregateTransformation extends Transformation .

The Aggregator transformation allows you to perform aggregate calculations, such as averages and sums.The Aggregator transformation is unlike the Expression transformation, in that you can use the Aggregator transformation to perform calculations on groups. The AggregateTransformation can have GroupBy port. The user has to give the Aggregate expression only in the Aggregator transformation.

The code snippet for the AggregateTransformation is given below

   
            //create an Aggregation Transformation using the constructor given below: 
            Mapping mapping = ...; // mapping to which the transform should be added
            Vector vInputSets = ...; // collection of InputSet objects
            Vector vTransformFields = ...; // collection of TransformField objects
            String[] groupBy = ...; // group by criteria
            TransformationProperties props = ...; // properties           
            AggregationTransformation aggTrans = new AggregateTransformation( "AggTrans", "AggTrans", 
                                                    "This is aggregate transformation", "AggTrans", 
                                                    mapping, vInputSets, vTransformFields, groupBy, props );
                
            //apply the transformation
                OutputSet outputSet = aggTrans.apply();
            
            //get the first rowset as Aggregate 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
AggregateTransformation()
          Default constructor
AggregateTransformation(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
AggregateTransformation(java.lang.String name, java.lang.String busName, java.lang.String desc, java.lang.String instName, Mapping mapping, java.util.Vector vInputSets, java.util.Vector vTransformFields, java.lang.String[] groupBy, TransformationProperties props)
          Constructor for Aggregate 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

AggregateTransformation

public AggregateTransformation()
Default constructor


AggregateTransformation

public AggregateTransformation(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 table
busName - business name
desc - description
instName - instance name

AggregateTransformation

public AggregateTransformation(java.lang.String name,
                               java.lang.String busName,
                               java.lang.String desc,
                               java.lang.String instName,
                               Mapping mapping,
                               java.util.Vector vInputSets,
                               java.util.Vector vTransformFields,
                               java.lang.String[] groupBy,
                               TransformationProperties props)
                        throws InvalidTransformationException
Constructor for Aggregate Transformation

Parameters:
name -
busName -
desc -
instName -
mapping -
vInputSets -
vTransformFields -
groupBy -
props -
Throws:
InvalidTransformationException
Method Detail

apply

public OutputSet apply()
                throws InvalidTransformationException
Apply the Transformation.

Returns:
OutputSet object
Throws:
InvalidTransformationException - exception