Table of Contents

Search

  1. Preface
  2. Performance Tuning Overview
  3. Target Optimization
  4. Source Optimization
  5. Transformation Optimization
  6. Mapping Optimization
  7. Partitioned Mapping Optimization
  8. Run-time Optimization
  9. SQL Data Service Optimization
  10. Web Service Optimization
  11. Connections Optimization
  12. Data Transformation Optimization

Performance Tuning Guide

Performance Tuning Guide

Early Selection Optimization with the Java Transformation

Early Selection Optimization with the Java Transformation

You can enable an active or passive Java transformation for early selection optimization if the Java transformation has no side effects. The optimizer passes the filter logic through the Java transformation and modifies the filter condition as required.
To view the code snippets for early selection optimization, choose PredicatePushOptimization in the navigator of the
Optimizer Interfaces
tab.

allowPredicatePush

Boolean. Enables early selection. Change the function to return a true result and message in order to enable early selection. Default is false, and the function returns a message that optimization is not supported.
public ResultAndMessage allowPredicatePush(boolean ignoreOrderOfOp) { // To Enable PredicatePushOptimization, this function should return true //return new ResultAndMessage(true, ""); return new ResultAndMessage(false, "Predicate Push Optimization Is Not Supported"); }

canGenerateOutputFieldEvalError

Boolean. Indicates whether or not the Java transformation can return an output field error, such as a division by zero error. Change the function to return false if the Java transformation does not generate output field errors. When the Java transformation can generate field errors, then the Data Integration Service cannot use early selection optimization.
public boolean canGenerateOutputFieldEvalError() { // If this Java transformation can never generate an output field evaluation error, // return false. return true; }

getInputExpr

Returns an Informatica expression that describes which input values from input fields comprise an output field. The optimizer needs to know which input fields comprise an output field in order to push the filter logic through the transformation.
public InfaExpression getInputExpr(TransformationField field, TransformationDataInterface group) { // This should return an Informatica expression for output fields in terms of input fields // We will only push predicate that use fields for which input expressions are defined. // For example, if you have two input fields in0 and in1 and three output fields out0, out1, out2 // out0 is the pass-through of in1, out2 is sum of in1 and in2, and out3 is unknown, the code should be: //if (field.getName().equals("out0")) // return new InfaExpression("in0", instance); //else if (field.getName().equals("out1")) // return new InfaExpression("in0 + in1", instance); //else if (field.getName().equals("out2")) // return null; return null; }
For example, a mapping contains a filter expression,
"out0 > 8
". Out0 is the value of the out0 output port in the Java transformation. You can define the value of out0 as the value of the in0 input port + 5. The optimizer can push the following expression
"(in0 + 5) > 8"
past the Java transformation with early selection optimization. You can return NULL if an output field does not have input field expression. The optimizer does not push filter expressions past output fields with no input expression.
You might include the following code:
if (field.getName().equals("out0")) return new InfaExpression("in0 + 5", instance); else if (field.getName().equals("out2")) return null;

inputGroupsPushPredicateTo

Returns a list of groups that can receive the filter logic. The Java transformation has one input group. Do not modify this function for the Java transformation.
public List<TransformationDataInterface> inputGroupsPushPredicateTo( List<TransformationField> fields) { // This functions returns a list of input data interfaces to push predicates to. // Since JavaTx only has one input data interface, you should not have to modify this function AbstractTransformation tx = instance.getTransformation(); List<DataInterface> dis = tx.getDataInterfaces(); List<TransformationDataInterface> inputDIs = new ArrayList<TransformationDataInterface>(); for (DataInterface di : dis){ TransformationDataInterface tdi = (TransformationDataInterface) di; if (tdi.isInput()) inputDIs.add(tdi); } if(inputDIs.size() == 1) return inputDIs; else return null; }

0 COMMENTS

We’d like to hear from you!