Oracle® Enterprise Data Quality for Product Data Java API Interface Guide Release 11g R1 (11.1.1.6) Part Number E29133-03 |
|
|
PDF · Mobi · ePub |
Getting the data lens or Transform Map information uses a Java List interface. This is used to find out what data lenses or Transform Maps are available (deployed) on a particular server for processing. Details about the data lenses are also returned.
Import the InfoClient with the following lines:
import oracle.pdq.api1.api.client.InfoClient; import oracle.pdq.api1.api.client.ProjectData; import oracle.pdq.api1.api.client.MapData;
For all the examples in this chapter, an instance of the InfoClient
class needs to be created with the Oracle DataLens Server name and port.
The SERVER_NAME
can be either a machine name such as "localhost" or an IP address "12.1.20.117".
The SERVER_PORT
is the port number of the server. By default, the Oracle DataLens Server is installed on port 2229.
// Create the Server Api object and point to the server InfoClient projectApi = new InfoClient(SERVER_NAME, SERVER_PORT);
With the getDeployedProjectList
method, you get a List of ProjectData objects that contains all the Data Lenses that are deployed and loaded on the Oracle DataLens Server.
Each ProjectData
object contains a:
data lens name
description of the data lens
list of the Standardizations used by the data lens
list of the Classification schemas used by the data lens
list of the Unit Conversions used by the data lens
single Source Locale used by the data lens
list of the target Translation locales used by the data lens
This is a simple example of pulling the data from the returned List:
List prjList = infoApi.getDeployedProjectList(); Iterator itr = prjList.iterator(); while (itr.hasNext()) { // Get the data lens information ProjectData prjData = (ProjectData)itr.next(); String projectName = prjData.getProject(); String projectDesc = prjData.getDescription(); List standardizations = prjData.getStandardizations(); List schemas = prjData.getClassifications(); List unitConversions = prjData.getUnitConversions(); String sourceLocale = prjData.getSourceLocale(); List targetLocales = prjData.getTargetLocales(); }
The ProjectData
object contains lists of classification and translation data for each data lens as shown above. These are just lists of String data. These lists include:
Classification Schemas used (UNSPSC, eCl@ss, or user-defined)
Target Translation locales supported.
In addition, the ProjectData
object contains lists of input and output data for each data lens, as in the preceding. These are just lists of string data. These lists include:
Input data list
Output data list
With the getDeployedWorkflowList
method, you get a List of WorkflowData
objects that contains all the DSAs that are deployed and loaded on the Oracle DataLens Server.
Each WorkflowData
object contains:
DSA name
Description of the DSA
List of input fields
List of output fields
A list of Transform Maps used by this DSA
A list of the Database Connections used by this DSA
Follwoing is a simple example of pulling the data from the returned list:
List workflowList = infoClientApi.getDeployedWorkflowList(); Iterator itr = workflowList.iterator(); while (itr.hasNext()) { // List the DSAs WorkflowData workflowData = (WorkflowData)itr.next(); String name = workflowData.getWorkflowName(); String desc = workflowData.getDescription(); List inputFields = workflowData.getInputFields(); List outputFields = workflowData.getOutputFields(); List transformMaps = workflowData.getTransformMaps(); List dbConnections = workflowData.getDbConnections(); }