You can create your own personalized Java indicators.
Management processes for Java user-defined indicators are the same as those for system
indicators.
You can also import a ready-to-use Java user-defined indicator from the
Exchange folder in the DQ Repository
tree view. This Java user-defined indicator connects to the mail server and checks if
the email exists.
Defining the custom indicator
Big Data Platform
Cloud API Services Platform
Cloud Big Data Platform
Cloud Data Fabric
Cloud Data Management Platform
Data Fabric
Data Management Platform
Data Services Platform
MDM Platform
Qlik Talend Cloud Enterprise Edition
Qlik Talend Cloud Premium Edition
Real-Time Big Data Platform
Procedure
In the DQ Repository tree view,
expand Libraries > Indicators.
Right-click User Defined
Indicators.
Select New Indicator from the
contextual menu.
The New Indicator wizard is
displayed.
In the Name field, enter a name for
the Java indicator you want to create.
Information noteImportant:
Do not use the following special characters in the item names: ~ ! ` # ^ * & \\ / ? : ; \ , . ( ) ¥ ' " « » <
>
These characters are all replaced with "_" in the file system and you may end up
creating duplicate items.
Optional: Set other metadata (Purpose,
Description and Author) in the
corresponding fields and click Finish.
The indicator editor opens displaying the metadata of the user-defined
indicator.
Setting the definition and category of the custom indicator
Big Data Platform
Cloud API Services Platform
Cloud Big Data Platform
Cloud Data Fabric
Cloud Data Management Platform
Data Fabric
Data Management Platform
Data Services Platform
MDM Platform
Qlik Talend Cloud Enterprise Edition
Qlik Talend Cloud Premium Edition
Real-Time Big Data Platform
Before you begin
You have selected the Profiling perspective.
Procedure
Click Indicator Category and select
from the list a category for the Java indicator.
The selected category determines the columns expected in the result
set of the analysis that uses this indicator.
The table below explains available categories.
Indicator category
Description
Expected query results
User Defined Match
Evaluates the number of data matching a condition.
The result set should have one row and two columns.
The first column contains the number of values that
match and the second column the total count.
User Defined Frequency
Evaluates the frequency of records using user-defined indicators
for each distinct record.
The result set should have 0 or more rows and two
columns. The first column contains a value and the
second the frequency (count) of this value.
User Defined Real Value
Evaluates real functions of data.
The result set should have one row and one column
that contain a real value.
User Defined Count
Analyzes the quantity of records and returns a row count.
The result set should have one row and one column
that contain the row count.
Click Indicator Definition and then
click the [+] button.
From the Database list, select
Java.
Enter the Java class in the Java
Class field.
Information noteNote: Make sure that the class name includes the package path, if this string
parameter is not correctly specified, an error message will display when you
try to save the Java user-defined indicator.
Select the Java archive holding the Java class:
Click the Edit... button. The UDI
Selector dialog box opens.
In the Select libraries view, select the check box of
the archive holding the Java class and then select the class in the bottom
panel of the wizard.
Click OK.
The dialog box is closed and the Java archive is displayed in the indicator
editor.
You can add or delete Java archives from the Manage
Libraries view of this dialog box.
Click Indicator Parameters to open
the view where you can define parameters to retrieve parameter values
while coding the Java indicator.
You can retrieve parameter values with a code similar to this one that
retrieves the parameter of EMAIL_PARAM:
// Check prerequisite
IndicatorParameters param = this.getParameters();
if (param == null) {
log.error("No parameter set in the user defined indicator " + this.getName()); //$NON-NLS-1$
return false;
}
Domain indicatorValidDomain = param.getIndicatorValidDomain();
if (indicatorValidDomain == null) {
log.error("No parameter set in the user defined indicator " + this.getName()); //$NON-NLS-1$
return false;
}
// else retrieve email from parameter
EList<JavaUDIIndicatorParameter> javaUDIIndicatorParameter = indicatorValidDomain.getJavaUDIIndicatorParameter();
for (JavaUDIIndicatorParameter p : javaUDIIndicatorParameter) {
if (EMAIL_PARAM.equalsIgnoreCase(p.getKey())) {
For a more detailed sample of the use of parameters in a Java user-defined
indicator, check the available documentation.
Click the [+] button at the bottom of
the table and define in the new line the parameter key and value.
You can edit these default parameters or even add new parameters any
time you use the indicator in a column analysis. To do this, click the
indicator option icon in the analysis editor to open a dialog box where
you can edit the default parameters according to your needs or add new
parameters.
Click the save icon on top of the editor.
The indicator is listed under the User Defined
Indicators folder in the DQ
Repository tree view. You can use this indicator to analyzed
columns through a simple drag-and-drop operation from the DQ Repository tree view to the columns listed in
the editor.
Creating a Java archive for the user-defined indicator
Big Data Platform
Cloud API Services Platform
Cloud Big Data Platform
Cloud Data Fabric
Cloud Data Management Platform
Data Fabric
Data Management Platform
Data Services Platform
MDM Platform
Qlik Talend Cloud Enterprise Edition
Qlik Talend Cloud Premium Edition
Real-Time Big Data Platform
Before creating a Java archive for the user defined indicator, you must define,
in Eclipse, the target platform against which the workspace plugins will be compiled and
tested.
Before you begin
You have selected the Profiling perspective.
Procedure
Define the target platform:
In Eclipse, select Preferences to display the
Preferences window.
Expand Plug-in Development, select Target
Platform and click Add... to open a view
where you can create the target definition.
Select the Nothing: Start with an empty target
definition option and click Next.
In the Name field, enter a name for the new target
definition and click Next.
Select Installation from the Add
Content list and click Next.
Use the Browse... button to set the path of the
installation directory and click Next.
Click Finish to close the dialog box.
Create a Java archive for the user defined indicator