%DeepSee.PlugIn.iKnow
Class %DeepSee.PlugIn.iKnow Extends %DeepSee.KPIPlugIn [ Deprecated, System = 4 ]
Sample DeepSee plugin implementation exposing the numeric results for iKnow Queries in a domain associated with an iKnow measure in this cube, as returned for the individual iKnow measure values for each fact. This PlugIn has only one result property named Result.
The following arguments can be passed through
- %cube: the Subject Area which' iKnow measure to look for. Uses the default cube for this query if not specified.
- %measure: the iKnow measure (in cube %cube) whose domain needs to be queried. Uses the first iKnow measure in %cube if not specified.
- aggregate: how to aggregate the query results for the individual facts. Any of total (default), sum, average, max or min.
- iKnowQuery: which iKnow query to invoke, specified as "queryClass:queryName". This should be a query returning a single number taking the domain ID and source ID (or a filter object) as its first two arguments. Defaults to "%iKnow.Queries.EntityAPI:GetCountByDomain"
Sample usage:
%KPI("%DeepSee.iKnow","Result",1,"aggregate","total","%CONTEXT")
Note: it is essential to pass in the "%CONTEXT" special parameter into the %KPI function for it to return correct results.
Parameters
BASECUBE
Parameter BASECUBE = "*";
LISTINGSOURCE
Parameter LISTINGSOURCE = "FactTable";
PLUGINTYPE
Parameter PLUGINTYPE = "Aggregate";
LISTINGFIELDS
Parameter LISTINGFIELDS = "ID";
XDatas
KPI
XData KPI [ XMLNamespace = "http://www.intersystems.com/deepsee/kpi" ]
This XData definition defines the KPI.
Methods
GetCubeName
Method GetCubeName() As %String [ Internal ]
GetIKnowMeasureName
Method GetIKnowMeasureName(Output pSC As %Status) As %String [ Internal ]
%OnGetMDX
Method %OnGetMDX(ByRef pMDX As %String) As %Status
Get the base query for this plug-in.
%OnCompute
Method %OnCompute(pSQLRS As %SQL.StatementResult, pFactCount As %Integer) As %Status
Compute the median of values within the result set.