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
- Copy the jars to the directory
<DENODO_HOME>/extensions/thirdparty/lib
- 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.
- 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 classCustomConnectionFilter
. 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).
-
ClassesClassDescriptionParent class of all the connection filters.To develop a custom connection filter, override this class and implement the method
ConnectionFilter.execute(java.io.InputStream)