Oracle® Enterprise Data Quality for Product Data COM API Interface Guide Release 5.6.2 Part Number E23724-02 |
|
|
View PDF |
This API has been deprecated. The TransformServer Object should be used instead.
The Oracle DataLens Server provides a COM component called Client Info, which is part of the DataLensServices.dll
library.
This is used as an interface to the Oracle DataLens Server. This COM component provides functions to get information on the data lenses and the Transform Maps.
Server name or address
Server port number
Oracle DataLens Server-supplied application API access code
Application name/identifier used for tracking statistics/usage
REM Initialize the COM Object with the server information call oInfoClient.initProjectClient(serverName, serverPort, clientCode, userName)
REM Do the Transform Map Transformation Dim dataResultPrj dataResultPrj = oInfoClient.transformData()
dataResultPrj
is an array of data lens information with the following output fields:
Data lens Name
Source locale
FOR i=1 to UBound(dataResultPrj, 1) Val = "DataLensName" & dataResultPrj(i,1) Val2 = "Source Locale" & dataResultPrj(i,2) Next
There are both array and collection interfaces to this information. This document describes the collection interface.
Server name or address
Server port number
Oracle DataLens Server-supplied application API access code
Application name/identifier used for tracking statistics/usage
REM Initialize the COM Object with the server information Call oInfoClient.initMapClient(serverName, serverPort, clientCode, userName)
Rem Do the Transform Map Transformation and get a ProjectClient.STARMapInfo object Set oStarMapInfo = oInfoClient.transformData2()
StarMapInfo
is an Object that can be accessed as follows:
Dim oStarMap As Object Dim cStarMaps As Collection Set cStarMaps = oStarMapInfo.getStarMaps() For Each oStarMap In cStarMaps Dim sMapName As String Dim bIsDecision, bHasDbSource As Boolean Dim lInputColumnsCount, lOutputColumnsCount As Long Rem Get the name and properties sMapName = oStarMap.mapName bIsDecision = oStarMap.IsDecisionMap bHasDbSource = oStarMap.hasDbSource resultStr = resultStr + sMapName + vbCrLf resultStr = resultStr + vbTab + "Is Decision: " + CStr(bIsDecision) + vbCrLf resultStr = resultStr + vbTab + "Has Db Src: " + CStr(bHasDbSource) + vbCrLf Rem Get the Input columns lInputColumnsCount = oStarMap.InputColumnsCount resultStr = resultStr + vbTab + CStr(lInputColumnsCount) + " Input Columns." + vbCrLf Dim cInputColumns As Collection Set cInputColumns = oStarMap.InputColumns Dim oInputColName As Variant For Each oInputColName In cInputColumns resultStr = resultStr + vbTab + vbTab + oInputColName + vbCrLf Next Rem get the Output columns lOutputColumnsCount = oStarMap.OutputColumnsCount resultStr = resultStr + vbTab + CStr(lOutputColumnsCount) + " Output Columns." + vbCrLf Dim cOutputColumns As Collection Set cOutputColumns = oStarMap.OutputColumns Dim oOutputColName As Variant For Each oOutputColName In cOutputColumns resultStr = resultStr + vbTab + vbTab + oOutputColName + vbCrLf Next resultStr = resultStr + vbCrLf Next
This function can be used to output informational messages while dumping out the state of the ClientProcessMap object. This function must be called after the object has been initialized and a session has been started.
checkStr = ObjReference.CheckInitAndStart("Processing was done with the following parameters.")
The output will be similar to the following:
Processing was done with the following parameters.; Run-Time Server URL: http://127.0.0.1:8080/datalens/XfmRt; Oracle Enterprise Data Quality for Product Data Cleansing and Matching Server Map name: sampleMap; Oracle Enterprise Data Quality for Product Data Cleansing and Matching Server User name: testApplication
Another function that can be used to check that the COM object is being accessed correctly from the application program is just called CheckCOM. This function just returns the string that is passed to it, verifying that the COM object has be instantiated correctly and that it is working properly. The Oracle DataLens COM object does not need any special initialization to call this particular function.
dim checkComStr checkComStr = ObjReference.CheckCOM("Test the COM object for a response.")