Package com.denodo.parser.connection.filter


package com.denodo.parser.connection.filter

Provides the classes to develop custom input filters.

When creating a DF, JSON or XML data source, you can select an input filter that preprocesses the data retrieved from the source before the Execution Engine processes it. Besides providing several out of the box input filters, Virtual DataPort provides a Java API that allows you to develop filters that pre-process the data from the source in any way you need.

Virtual DataPort includes a sample custom filter that reads the data from the source and replaces one character with another one. This example is at the folder <DENODO_HOME>/samples/vdp/customConnectionFilter. The README file in this directory explains how to compile, install and use this custom filter.

Required Libraries to Develop Custom Filters

To develop a custom filter, add the following jar files to the CLASSPATH of your environment:

  • <DENODO_HOME>/lib/contrib/denodo-connection-util.jar
  • <DENODO_HOME>/lib/contrib/denodo-commons-util.jar
Note: if the custom filter relies on external jars, do the following:
  1. Copy the jars to the directory <DENODO_HOME>/extensions/thirdparty/lib
  2. Or, copy the contents of the required jars into the jar that contains the stored procedure. You have to copy the contents of the required jars, not the jars themselves.
  3. Or, import the external jars (see section “Importing Extensions” of the Virtual DataPort Administration Guide) and when importing the new custom filter, select the jar with the custom filter and also the external jars.

Virtual DataPort includes a sample custom filter that reads the data from the source and replaces one character with another one. This example is at the folder <DENODO_HOME>/samples/vdp/customConnectionFilter. The README file in this directory explains how to compile, install and use this custom filter.

Developing Custom Filters

To develop a custom filter, create a new class that extends the class CustomConnectionFilter.
This class has to implement the method execute.
A custom connection filter may have input parameters. They can be useful if you want the behavior of the custom filter to change depending on the value of these parameters. To retrieve these parameters entered by the user when assigning the filter to a data source, invoke the method getParameters of the superclass, from the execute method.

After developing the custom filter, generate its jar and import it into Virtual DataPort (see section Importing Extensions of the Administration Guide).