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

Push-Into Optimization with the Java Transformation

Push-Into Optimization with the Java Transformation

You can enable an active Java transformation for push-into optimization if it has no side effects and the optimization does not affect the mapping results.
When you configure push-into optimization for the Java transformation, you define a way for the Java transformation to store the filter condition that it receives from the optimizer. Add code that examines the filter condition. If the Java transformation can absorb the filter logic, then the Java transformation passes a true condition back to the optimizer. The optimizer removes the Filter transformation from the optimized mapping.
When you configure the Java transformation you write the code that stores the filter condition as transformation metadata during optimization. You also write the code to retrieve the filter condition at run-time and to drop the rows according to the filter logic.
When you define the Java transformation, you add code for push-into optimization on the Java transformation
Optimizer Interfaces
tab. To access the code snippets for push-into optimization, choose FilterPushdownOptimization in the navigator of the transformation
Optimizer Interfaces
tab.
The Developer tool displays code snippets to enable push-into optimization and to receive the filter condition from the optimizer. Update the code snippets to enable optimization and to save the filter logic as transformation metadata.

isFilterSupported

Returns true to enable push-into optimization. Returns false to disable push-into optimization.
Change the function to return true in order to enable push-into optimization.
public ResultAndMessage isFilterSupported() { // To enable filter push-into optimization this function should return true // return new ResultAndMessage(true, ""); return new ResultAndMessage(false, "Filter push-into optimization is not supported"); }

pushFilter

Receives the filter condition from the optimizer.
Add code to examine the filter and determine if the filter logic can be used in the transformation. If the transformation can absorb the filter, then use the following method to store the filter condition as transformation metadata:
storeMetadata(String key, String data)
The key is an identifier for the metadata. You can define any string as a key. The data is the data you want to store in order to determine which rows to drop at run time. For example, the data might be the filter condition that the Java transformation receives from the optimizer.
public ResultAndMessage pushFilter(InfaExpression condition) { // Add code to absorb the filter // If filter is successfully absorbed return new ResultAndMessage(true, ""); and the optimizer // will remove the filter from the mapping // If the filter is not absorbed, return new ResultAndMessage(false, msg); return new ResultAndMessage(false, "Filter push-into optimization is not supported"); }

Back to Top

0 COMMENTS

We’d like to hear from you!