For information on converting to InterSystems IRIS, see the
InterSystems IRIS Adoption Guide
and the InterSystems IRIS In-Place Conversion Guide,
both available on the WRC Distributions page (login required).
classmethod %AddHijriTimeInterval(pDate As %Date, pInterval As %String, pCalendar As %String = "hijriTabular") as %Date
Add a time interval to a given date (in $H format).
The interval is of the form "99y99m99d" (years, months, and days).
There can be a leading minus sign.
classmethod %AddTimeInterval(pDate As %Date, pInterval As %String) as %Date
Add a time interval to a given date (in $H format).
The interval is of the form "99y99m99d" (years, months, and days).
There can be a leading minus sign.
Loop over all indices for a given cube and show details. pCubeName is the name of the cube. pFlags is a set of flags that can control what is analyzed:
flags include "i" (include indices), "f" (include facts), "c" (include cell cache).
The default is "i". pVerbose indicates that status information is to be displayed while the analysis is done.
classmethod %AnalyzeMissing(pCube As %String) as %Status
Examine the levels and measures for a given cube and report on how many missing values there are. pCubeName is the name of the cube.
classmethod %ArrayFromList(pParmsList As %List = $LB(), ByRef pParms) as %Status
Convert a parameters list in $LB format to an array
classmethod %ArrayToList(ByRef pParms, Output pParmsList As %List) as %Status
Update all facts in the DeepSee cube pCubeName
with data from the source table.
This will delete any information currently in the cube.
pAsync controls whether DeepSee performs the build in multiple background processes.
If this argument is true, the system uses multiple processes and does not return until they are all complete.
If this argument is false, the system uses a single process and does not return until it is complete.
If you have specified initialBuildOrder, the system will reset the value of pAsync to 0 and use a single process to build the cube.
The presence of initialBuildOrder in the cube definition will override this setting and will force pAsync=0.
The parameter may be passed by reference to communicate to the caller whether or not this
override has taken place.
If pVerbose is true, then status information is written to the console.
If pIndexOnly is true, only rebuild the fact table indices.
If pMaxFacts is non-zero, then only build this number of facts. pTracking is an internal argument used when this method is run in the background and specifies that status information should be stored. pBuildStatistics returns an array of information about the cube build.
The array has four subscripts. For example, if tStats is the argument used, as in:
do ##class(%DeepSee.Utils).%BuildCube("PATIENTS",1,,,,,.tStats) the array will look like the following:
tStats("elapsedTime")=10.000643
tStats("errors")=1
tStats("factCount")=5000
tStats("missingReferences")=1
classmethod %BuildDimensionTableIndices(pCubeName As %String, pVerbose As %Boolean = 1) as %Status
Rebuild the indices for every dimension table used for cube pCubeName.
If pCubeName is "*", then perform this on every cube within the current namespace
that is visible to the current user.
final classmethod %CheckPrivilege(pCubeName As %String) as %Status
Test that the current user holds privileges on the given cube.
Compute the "age" (time difference) between pStart and pEnd as a number
of units specified by pUnits ("years","months","days").
classmethod %ComputeAggregateCombos(pCubeName As %String, ByRef pCombos, pVerbose As %Boolean = 1, pTracking As %Boolean = 0) as %Status
Loop over fact table for cube and precompute the aggregates for the specified combinations
in pCombo.
pCombo(n) = "FactName1,FactName2,MsrName1"
classmethod %ComputeAggregateGroup(pCubeName As %String, pGroupName As %String, pVerbose As %Boolean = 1) as %Status
Precompute the aggregates witin the given cube and the given group name within the cube's
CellCache specification.
Set pGroupName to "*" for all groups.
classmethod %ComputeCellCache(pCubeName As %String, ByRef pSpec) as %Status
Generate and execute a query that will force the update of the
cell cache for given cube and levels.
Utility method. Convert a date value to %Date ($H) format. pDateType indicates the incoming date format.
classmethod %CreateParameterNonce(pParm As %String) as %String
Sometimes we need to pass parameters to another process via a URL.
I.E. has trouble with large URL parameters, so the best approach is to store the parameter
text in a global and pass a one-time token (or nonce) as part of the URL.
Assumes that the parm unencrypted.
Returns "ERROR:"_details if there is an error.
classmethod %CreateQueryNonce(pText As %String, pMode As %String = "MDX") as %String
Sometimes we need to pass a query (or XML) to another process via a URL.
I.E. has trouble with large URL parameters, so the best approach is to store the query
text in a global and pass a one-time token (or nonce) as part of the URL.
Assumes that the query is encrypted.
Returns "ERROR:"_details if there is an error.
Given the logical name, pCubeName of a DeepSee cube,
test if it exists.
classmethod %DayOfWeekToNumber(pDayName, pFullName As %Boolean = 1, pLocale As %String = "")
Method to convert day of week name to a number from 1 to 7
pDayName: full day name (e.g. Monday) or day short name (e.g. Mon)
pFullName: If true pDayName is the full day name: if false, pDayName is the short day name
pLocale: if not specified, default to current locale.
For the specified cube, delete one fact from the source table (with id of pSourceId).
If pVerbose is true, then status information is written to the console.
classmethod %DeleteNamedFilter(pCube As %String, pFilterName As %String = "", pUseCubeVersion As %Boolean = 0) as %Status
Delete the given named filter for the given cube.
If pFilterName is "*", then delete all named filters for the cube.
classmethod %DeletePivotVariable(pCube As %String, pVariableName As %String = "", pUseCubeVersion As %Boolean = 0) as %Status
Delete the given pivot variable for the given cube.
If pVariableName is "*", then delete all pivot variables for the cube.
classmethod %DeleteSharedCalcMember(pCube As %String = "", pCalcMbrName As %String = "", pDimension As %String = "", pUseCubeVersion As %Boolean = 0) as %Status
Delete the given shared calculated member for the given cube.
If pCalcMbrName is "*", then delete all shared calculated members for the cube.
classmethod %DenormalizeType(pType As %String) as %String
Convert a class name of the form %Library.xxx to %xxx.
Given a date in $H format and a calendar, return the number of days since Jan 0 1900
This is excel's version of $H and is needed to export dates as dates to excel
classmethod %ExecutePivot(pPivotFullName="", ByRef pParms, Output pResultSet) as %Status
Programmatically execute a stored pivot table. The pPivotTableName is the full
Folder/SubFolder/Name of the pivot table. Execute parameters may optionally be passed in through
the pParms array. If desired, the resultset constructed in the execution procedure can
be returned using pResultSet.
classmethod %ExportExcelToFile(pFile As %String, ByRef pParms As %String) as %Status
Export a DeepSee query or KPI to the file pFile in excel format. pParms defines the export parameters:
pParms("TITLE") = title
pParms("SUBTITLE") = subtitle
pParms("MDX") = MDX Statement
pParms("KPI") = KPI class name
pParms("LISTINGNAME") = Listing name
pParms("FILTERNAMES") = $C(10)-delimited list of filter names
pParms("FILTERVALUES") = $C(10)-delimited list of filter values
Export a DeepSee query or KPI to the file pFile in PDF format. pParms defines the export parameters:
pParms("TITLE") = title
pParms("SUBTITLE") = subtitle
pParms("MDX") = MDX Statement
pParms("KPI") = KPI class name
pParms("LISTINGNAME") = Listing name
pParms("FILTERNAMES") = $C(10)-delimited list of filter names
pParms("FILTERVALUES") = $C(10)-delimited list of filter values
classmethod %FilterSpecToArray(pCube As %String, pSpec As %String, ByRef pFilterArray) as %Status
Convert a string pSpec into array form and add it to the array pFilterArray. The
value for pSpec may be any valid MDX WHERE clause referencing non-calculated members.
If a member being inserted into the array already exists, the selection data will be replaced by the
intersection of the preexisting member or set and the new member or set provided by the argument.
classmethod %FindCubeMembers(pCube As %String, pSearchKey As %String, Output pMembers, pDimList As %String = "", pIncludeLevelNames As %Boolean = 0, pIncludeMeasures As %Boolean = 0, pIncludeComputed As %Boolean = 0, pMaxResults As %Integer = 10) as %Status
Utility method to retrieve pMaxResults cube members based on a simple search key. By default, this
method will return normal cube members only, but a range of flags serve to indicate which type
of results to return on top, as long as they match the search key (level names, measure
names or computed members).
Members are returned as
For the given cube, iterate over all facts in the build error log and attempt to
reprocess each fact. If the processing succeeds, remove the item from the error log.
Format a date value (in $H format) according to the format in pFormat.
The format string can contain:
"y" - Year number (4 digits).
"q" - Quarter number.
"m" - Month number, with no leading zero.
"mm" - Month number, with leading zero.
"mmm" - Short name of month (using server locale).
"mmmm" - Long name of month (using server locale).
"d" - Day number, with no leading zero.
"dd" - Day number, with leading zero.
"ddd" - Short name of day (using server locale).
"dddd" - Long name of day (using server locale).
"\x" - display character "x"
" " - space
"/" - "/"
"-" - "-"
"." - "."
classmethod %GetCubeDescription(pCubeName As %String, Output pStatus As %Status) as %String
Given the logical name, pCubeName of a DeepSee cube return its class description.
classmethod %GetCubeFactClass(pCubeName As %String, Output pStatus As %Status) as %String
Given the logical name, pCubeName of a DeepSee cube,
return the class name of its fact table.
classmethod %GetCubeFactCount(pCubeName As %String, Output pStatus As %Status) as %Integer
Given the logical name, pCubeName of a DeepSee cube,
return the number of rows within its fact table.
classmethod %GetCubeFactTable(pCubeName As %String, Output pStatus As %Status) as %String
Given the logical name, pCubeName of a DeepSee cube,
return the SQL name of its fact table.
classmethod %GetCubeLevels(pCube As %String, ByRef pLevels, pSkipAll As %Boolean = 0, pSkipComputed As %Boolean = 0) as %Status
Return a list of all levels within the given cube.
On return pLevels contains a list of all levels of the form:
pLevels(n) = $LB(type,dimName,hierName,levelName)
Type is "l" for level, "m" for measure (in which case there is no levelName) or
"r" for relationship (in which case there is only a dimension name).
If pSkipAll is true, do not return any "all" levels.
If pSkipComputed is true, do not return any levels for computed dimensions.
final classmethod %GetCubeList(Output pList, pType As %String = "", pNonAbstract As %Boolean = 0, pBaseCube As %String = "") as %Status
Return an array of all currently defined DeepSee Cubes visible to the current user.
This is used by utilities.
This array takes the form:
pList(NAME) = $LB(name,caption,moddate,type) pType, if defined, can be "cubes" or "subjectAreas". This will limit the returned
list to those item types. pNonAbstract, if true, limits the returned items to non-abstract cubes. pBaseCube, if provided, limits the returned items to the base cube and its descendants.
If there are no cubes, then pList will be undefined.
classmethod %GetCubeListingFields(pCube As %String, Output pFields As %List) as %Status
Return an array of all defined listing fields for the given cube.
The array is of the form:
pListings(name) = $LB(caption,expression)
If there are no listing fields, then pFields will be undefined.
classmethod %GetCubeListings(pCube As %String, Output pListings As %List, pType As %String = "") as %Status
Return an array of all (non-default) listings for the given cube.
The array is of the form:
pListings(name) = $LB(caption,fields,order,type,source,edit)
If there are no listings, then pListings will be undefined.
If pType is defined, then only return listings of the given type.
classmethod %GetCubeMeasures(pCube As %String, ByRef pMeasures, pSkipCalculated As %Boolean = 0) as %Status
Return the measures within the given cube as an array of form:
pMeasures(n) = $LB(name,caption,type,hidden,factName)
If pSkipCalculated is true, then do not include calculated measures.
classmethod %GetCubeMemberCount(pCubeName As %String, Output pStatus As %Status, pDimName As %String = "", pHierName As %String = "", pLevelName As %String = "") as %Integer
Given the logical name, pCubeName of a DeepSee cube,
return the number of members within the given dimension level.
Given the logical name, pCubeName of a DeepSee cube,
return the date and time that the cube definition was last modifed.
classmethod %GetCubeName(pCubeName As %String, Output pStatus As %Status) as %String
Given the logical name, pCubeName of a DeepSee cube,
return its name in its original case.
classmethod %GetCubeSearchableMeasures(pCube As %String, ByRef pMeasures) as %Status
Return the searchable measures within the given cube as an array of form:
pMeasures(n) = $LB(name,caption,type)
final classmethod %GetDashboardList(Output pList) as %Status
Return a list of all currently defined DeepSee dashboards visible to the current user.
This is used by utilities.
This list takes the form:
pList(NAME) = $LB(name,caption,moddate,type)
classmethod %GetDataSourceTree(pClass As %String, Output pTree, ByRef pParms, pLevel As %Integer = 0, pParentRef As %String = "", pRoot As %String = "") as %Status
Return the properties of a cube data source in a format that can be consumed
by a Zen dynaTree control. pRoot is used to specify that an incremental load of children is requested; if provided it is the spec of a parent node.
classmethod %GetDefaultHierarchy(pCubeName As %String, pDimName As %String) as %String
Given the logical name, pCubeName of a DeepSee cube,
and a dimension name, return the name of the default Hierarchy (this
is only defined if there is no more than one hierarchy for this dimension).
Given the logical name, pCubeName of a DeepSee cube,
and a dimension and hierarchy name, return the name of the default Level (this
is only defined if there is no more than one level for this hierarchy).
classmethod %GetDefaultMeasure(pCubeName As %String) as %String
Given the logical name, pCubeName of a DeepSee cube,
return the name of the default Measure.
Note: this is no longer used by DeepSee.
classmethod %GetDefaultMember(pCubeName As %String) as %String
Given the logical name, pCubeName of a DeepSee cube,
return the default cube element (dimension and possibly level) as a string ("[Product].[Name]").
Note: this is no longer used by DeepSee.
classmethod %GetDependencyGraph(ByRef pGraph, pCubeName As %String, pDirection As %String = "", pLevel As %Integer = 0) as %Status
Get the cube dependency graph for the given cube:
pGraph(cube, dependentCube) = ""
Return the fact name associated with a given element within the given cube.
classmethod %GetDimensionInfo(pCubeName As %String, pSpec As %String, Output pDimNo, Output pHierNo, Output pLevelNo, Output pRelationName As %String, Output pRelationSpec As %String, Output pSpecInfo As %String, ByRef pLocalCalcMembers, pStrict As %Boolean = 1, ByRef pLocalNamedSets) as %Status
Return the dimension,hierarchy, and level number of the specified element
within the specified cube. pCubeName is the name of the cube. pSpec specifies the dimension in the form:
"Dim.Hier.Level" or "Dim.Hier.Level.member".
If pStrict is false, then find a level: Hier or Level can be omitted if they are not ambiguous. pSpecInfo is the array produced by parsing pSpec.
This is returned as a convenience. pLocalCalcMembers is an optional list of locally defined calculated members.
pLocalNamedSets is an optional list of locally defined named sets.
classmethod %GetDimensionList(pCube As %String, ByRef pInfo, pIncludeCalcMbrs As %Boolean = 0, pUseInFilter As %Boolean = 0) as %Status
Return a list of the dimensions (and measures) within the specified cube.
On return, pInfo will contain array of the form:
pInfo(DimNo,HierNo,LevelNo) = $LB(type,DimName,HierName,LevelName)
type can be "d","h","l","m","r" or "all" for dimension, hierarchy, level, measure, relationship or all level.
Note that all measures are found under DimNo 0 and have no LevelName.
Dimensions whose name starts with "%" are not listed.
Dimensions that only contain calculated members are returned as:
pInfo(-1,hierNo,memberNo)
If pUseInFilter is true, then only return levels whose useInFilter flag is true.
classmethod %GetDimensionMembers(pCubeName As %String, pSpec As %String, pContext As %String = "", Output pMembers, pMaxMembers As %Integer = 100, Output pMemberClass As %String, ByRef pRelatedFilters, pCalcMode As %Integer = 0, pSearchKey As %String = "") as %Status
Return a list of members of the specified dimension
for the specified cube. pCubeName is the name of the cube. pSpec specifies the dimension in the form:
"Dim.Hier.Level". pContext is used to indicate a particular calling context. This affects the behavior when trimming the list of members using related filters.
The list is returned via pMembers. This takes the form:
pMembers(n) = $LB(value,name,memberId,memberKey,[description])
Return the member class as a convenience.
If pRelatedFilters is provided, it is an array of other filter values to use to
restrict the set of members. It takes the form:
pRelatedFilters(spec) = key
If pCalcMode is 1, then only return calculated members.
If pCalcMode is -1, then only return non-calculated members.
classmethod %GetDimensionProperties(pCube As %String, pDimName As %String, pHierName As %String, pLevelName As %String, ByRef pProperties) as %Status
Return the properties of a given level within the given cube as an array of form:
pProperties(n) = $LB(name,caption,type)
Given the dimension,hierarchy, and level number for a dimension
within the specified cube, return it's specification string.
classmethod %GetDimensionTables(pCubeName As %String, Output pStarTables, pCardinality As %Boolean = 0) as %Status
Return an array of the dimension tables (class names) used for a given cube.
If pCardinality is true, compute the size of each table.
classmethod %GetErrorPageURL(pError As %String) as %String
Return the URL for the DeepSee management portal error page.
final classmethod %GetFunctionList(Output pList, pAsTree As %Boolean = 0) as %Status
Return a list of all currently defined MDX functions.
This is used by utilities.
If pAsTree is true, return a format that a tree control can consume.
classmethod %GetFunctionSet(ByRef funcset, pClass As %String) as %Status
Builds a list of functions (methods) for a given FunctionSet class
This list is returned in funcset.
The list is of the form list(NAME) = $LB(class,name,specparsed,return).
This method is not currently used.
[Previously private]
Given the logical name, pKPIName of a DeepSee KPI,
return the class name of the KPI definition.
classmethod %GetKPIDescription(pKPIName As %String, Output pStatus As %Status) as %String
Given the logical name, pKPIName of a DeepSee KPI return its class description.
final classmethod %GetKPIList(Output pList) as %Status
Return a list of all currently defined DeepSee KPIs visible to the current user.
This is used by utilities.
This list takes the form:
pList(NAME) = $LB(name,caption,moddate,type)
Given the logical name, pKPIName of a DeepSee KPI,
return its name in its original case.
final classmethod %GetKPIPlugInList(Output pList, pBaseName As %String = "", pPlugInType As %String = "", pUseCubeVersion As %Boolean = 0) as %Status
Return a list of all currently defined DeepSee "Plug-in" KPIs visible to the current user.
If pBaseName is provided, then only list plug-ins visible to this base cube.
This is used by utilities.
This list takes the form:
pList(NAME) = $LB(name,caption,moddate,type)
pList(NAME,"props",propName) = ""
Give a cube, a level within the cube, and the key value of a member of the level,
return the name of the level member. pCubeName is the name of the cube. pSpec specifies the dimension in the form:
"Dim.Hier.Level". pKey is a key value. This may include the &[] around the key value. pValue is the returned display value.
classmethod %GetMDXFromPivot(pPivotFullName="", Output pStatus As %Status, pExecute As %Boolean = 0, ByRef pParms, Output pResultSet As %DeepSee.ResultSet) as %String
Method for programmatically creating a pivot table
The GetMDXforPivot method returns the MDX query for saved pivot.
Arguments:
pPivotFullName
The name of the pivot including folder name
Format: folder/pivot name
Example: My Folder/My Pivot
pExecute
Boolean value (optional):
0 - Do not execute the MDX query (Default)
1 - Execute the MDX query
pResultSet
Output argument (optional):
Instance of %DeepSee.ResultSet for the MDX query:
This can be used to access the query results, meta data, statistics, etc.
To get the text of the MDX query, use only the first argument
To get the text of the MDX query and run the query, use the first 2 arguments
To get the text of the MDX query, run the query, and get the ResultSet, use all 3 arguments
classmethod %GetMeasureFact(pCube As %String, pMeasureName As %String, Output pMeasureFact As %String) as %Status
Given a cube and a measure name, i.e. "Patient Count", return the fact table column name for that measured.
Return the localized display name for a given element within the given cube given a dimension,
hierarchy, and level name.
classmethod %GetMemberDescription(pCube As %String, pDimName As %String, pHierName As %String = "", pLevelName As %String = "", ByRef pDescription As %String) as %Status
Return the localized description for a given element within the given cube given a dimension,
hierarchy, and level name.
classmethod %GetMemberTree(pCube As %String, ByRef pTree, ByRef pVisited As %String, pSkipMeasures As %Boolean = 0, pRoot As %String = "", ByRef pLocalCalcMembers As %List, ByRef pLocalNamedSets As %List, pRelatedBy As %String = "", pLevel As %Integer = 0, pSkeleton As %Boolean = 0) as %Status
Get the members (dimensions, measures, and actual members of dimensions) of the specified cube as a tree format that can
be displayed within a %ZEN.Component.dynaTree. pCube is the cube name. pTree is an array returned by reference that contains the member data. pSkipMeasures is used internally and indicates that measures (as well as named filters) should not be listed. pRoot is used to specify that an incremental load of children is requested; if provided it is the spec of a parent node. pLocalCalcMembers is used to pass in additional calculated members. pLocalNamedSets is used to pass in additional named sets. pVisited and pRelatedBy are not used. pSkeleton indicates that members and relationships are not displayed.
final classmethod %GetMetricList(Output pList) as %Status
Return a list of all currently defined Ensemble Business Metrics visible to the current user.
This is used by utilities.
This list takes the form:
pList(NAME) = $LB(name,caption,moddate,type)
Given the logical name, pCubeName of a DeepSee cube,
return an instance of the %DeepSee.Model.cube
meta-data object that describes the cube.
Return "" if the given cube does not exist.
This method does not work on SubjectAreas; use %GetSubjectAreaModel.
classmethod %GetNamedFilterInfo(pCube As %String, pFilterName As %String, Output pInfo, pUseCubeVersion As %Boolean = 0) as %Status
Return details on the given named filter in the array pInfo.
classmethod %GetNamedFilters(pCube As %String, ByRef pFilters, pUseCubeVersion As %Boolean = 0) as %Status
Return all named filters for a given cube as an array of form:
pFilters(n) = $LB(name,tooltip,spec,cube)
classmethod %GetParameterNonce(pNonce As %Integer)
final classmethod %GetPivotList(Output pList, pHidden As %Boolean = 0, pCubeName As %String = "") as %Status
Return a list of all currently defined DeepSee Pivots visible to the current user.
This is used by utilities.
This list takes the form:
pList(NAME) = $LB(name,caption,moddate,type)
If pHidden is true, then include trash and local items.
If pCubeName is provided, then only list pivots based on it.
classmethod %GetPivotTree(pCube As %String, ByRef pTree, pCurrPivot As %String = "") as %Status
Get list of saved pivots for a cube for display within a tree.
classmethod %GetPivotVariableInfo(pCube As %String, pVariableName As %String, Output pInfo, pUseCubeVersion As %Boolean = 0) as %Status
Return details on the given pivot variable in the array pInfo.
classmethod %GetPivotVariableValues(pCube As %String, pVariableName As %String, Output pValues, pUseCubeVersion As %Boolean = 0) as %Status
Find all values for a given pivot variable.
Return pValues(n) = $LB(text,spec)
classmethod %GetPivotVariables(pCube As %String, ByRef pVariables, pUseCubeVersion As %Boolean = 0) as %Status
Return all pivot variables for a given cube as an array of form:
pVariables(n) = $LB(name,caption,defValue,context,desc)
classmethod %GetQualityMeasureTree(pCube As %String, ByRef pTree) as %Status
Get list of quality measures for display within a tree.
classmethod %GetRelatedCube(pCubeName As %String, pRelationName As %String) as %String
Given the logical name, pCubeName of a DeepSee cube,
and the name of a relationship in the cube, return the name of the cube referred to by the
relationship.
classmethod %GetResultSetFromPivot(pPivotFullName="", Output pStatus As %Status, pExecute As %Boolean = 0, ByRef pParms, Output pMDX) as %DeepSee.ResultSet
Programmatically create an instance of a %DeepSee.ResultSet from
a stored pivot table. The pPivotTableName is the full
Folder/SubFolder/Name of the pivot table. By default, the query is only prepared
and returned ready for execution. The query can be asynchronously executed as part
of the retrieval process by setting pExecute=1. Execute parameters may optionally be passed in through
the pParms array.
Returns the SQL name of property pProp for class pClass.
classmethod %GetSQLTableName(pClass As %String) as %String
Returns the SQL table name for class pClass.
classmethod %GetSharedCalcMemberInfo(pCube As %String, pDimension As %String = "", pCalcMbrName As %String = "", Output pInfo, pUseCubeVersion As %Boolean = 0) as %Status
Return details on the given shared calculated member in the array pInfo.
classmethod %GetSharedCalcMembers(pCube As %String, ByRef pCalcMbrs, pUseCubeVersion As %Boolean = 0) as %Status
Return all shared calculated members for a given cube as an array of form:
pCalcMbrs(n) = $LB(name,tooltip,dimension,cube)
classmethod %GetSourceClass(pCubeName As %String) as %String
Given the logical name, pName of a DeepSee subject,
return an instance of the %DeepSee.Model.SubjectArea.subjectArea
meta-data object that describes the cube.
Return "" if the given cube does not exist.
This method does not work on base cubes; use %GetModel.
classmethod %GetTimeLevelCalendar(pClassName As %String) as %String
Protected lookup of the calendar used for a time function. If the argument pClassName
is not a valid time class (extends %DeepSee.Time.AbstractLevel), then the
method returns an empty string.
classmethod %GetTimeLevelClasses(Output pClasses) as %Status
Builds a list of available time level classes.
The list is of the form pClasses(calendar,NAME) = class.
[Previously private]
classmethod %GetTimeLevelType(pClassName As %String) as %String
Protected lookup of the type of a time function. If the argument pClassName
is not a valid time class (extends %DeepSee.Time.AbstractLevel), then the
method returns an empty string.
final classmethod %GetWorksheetList(Output pList, pHidden As %Boolean = 0) as %Status
Return a list of all currently defined DeepSee worksheets visible to the current user.
This is used by utilities.
This list takes the form:
pList(NAME) = $LB(name,caption,moddate,type)
If pHidden is true, then include trash and local items.
classmethod %HasUpdates(pClassName="") as %Boolean
Test the ^OBJ.DSTIME update buffer for new updates in the class pClassName
classmethod %HijriDaysInMonth(y="", m="", calendar="hijriTabular") as %Integer
Return number of days in the given year and month.
classmethod %IsCubeAbstract(pCubeName As %String, Output pStatus As %Status) as %Boolean
Given the logical name, pCubeName of a DeepSee cube,
test if it is abstract.
An abstract cube does not contain any data and cannot be queried.
classmethod %IsCubeAvailable(pCubeName As %String, Output pReason As %String) as %Boolean
Test if the given cube is available for querying.
classmethod %IsCubeCompound(pCubeName As %String, Output pJoinList As %String, Output pStatus As %Status) as %Boolean
Given the logical name, pCubeName of a DeepSee cube,
test if it is a compound cube (composed of two or more cubes joined together).
classmethod %IsDataConnector(pClassName As %String = "", pStatus As %Status) as %Boolean
Test whether pClassName is a DataConnector. This uses a direct global lookup so users do not need to rely
on access to %Dictionary tables
classmethod %IsDeepSeeEnabled(pNamespace="") as %Boolean
Indicates whether the default application for this namespace will process DeepSee Pages.
classmethod %IsHijriLeapYear(y, calendar="hijriTabular") as %Boolean
Test if a given element within the given cube has child levels.
classmethod %ParseKeyForDisplay(pKey As %String, Output pValue As %String, pKPIClass As %String = "", pFilterName As %String = "") as %Status
Parse a filter key value and convert all keys to display values in the context of pKPIClass.
classmethod %ParseRangeExpression(pRange As %String, Output pOutput, pContext As %String = "", Output pCode As %String) as %Status
Parse the given DeepSee range expression.
A range expression takes the form:
spec:replace;spec:replace;
spec takes the form:
value | (value,value) | [value,value]
() specifies a non-inclusive edge of a range.
[] specifies a inclusive edge of a range. pContext is used for error reporting.
pCode contains a generated expression that
implement the range expression (using x as an input value).
classmethod %ParseSQLFieldList(pFieldString="", pDomain="", Output pFieldArray, pLocalize As %Boolean = 0) as %Status
Split a single fieldList string into the individual fields.
The output pFieldArray returns each SELECT item in
pFieldArray(termNumber) = $LB( $LB(fieldIdenitifier,"AS",logicalHeader), $LB(fieldIdenitifier,"AS",displayHeader))
The pLocalize parameter can be used to request behavior of the $$$TEXT macro in the header portion:
0 - Return the original text value from $$$TEXT
1 - Return the header value localized to the language of the current client
When pLocalize is used, a default domain can be provided in pDomain. This domain will be used for translation for each
instance of $$$TEXT that does not specify its own domain.
Precompute aggregate values for the given cube (if its precompute property is non-zero).
If pAsync is true, then background tasks are used.
If pVerbose is true, then status information is written to the console.
classmethod %PrintBuildErrors(pCube)
Display the list of errors encountered in the most recent build of the given cube.
classmethod %ProcessFact(pCubeName As %String, pSourceId As %String = "", pVerbose As %Boolean = 0, Output pMissingReferences As %Integer) as %Status
For the specified cube, update one fact from the source table (with id of pSourceId).
If the fact does not yet exist, it is inserted, if does exist it is updated.
If pVerbose is true, then status information is written to the console. pMissingReferences how missing references to related cubes were encountered.
Refer to the %SynchronizeCube() for details.
%PurgeDSTIME() purges all nodes in ^DeepSee.Update that have already been processed by all cubes,
and by all classes that extend %DeepSee.TimeSync.
This method checks the DSTIME value for each cube, and for each class that extends %DeepSee.TimeSync,
and computes the oldest DSTIME value that has not yet been
synchronized. All DSTIME values older than that time are purged from the DSTIME index.
If a class has entries in the DSTIME index and no cubes use that class as a source class then those DSTIME
entries are not purged.
Parameters
pVerbose
Input
If true then status messages will be displayed on the current device.
pPurged
Output
An array of DSTIME entries that have been purged. For example:
Purge the ^OBJ.DSTIME update buffer when there are no cubes present to clear entries
via updates. pClass [Required] - The class to be purged from the ^OBJ.DSTIME update buffer.
The "*" wildcard may be used to purge all classes present in the buffer. pPurgeUpTo [Required] - This is the oldest timestamp that must be retained in the purge.
Every entry older than this will be removed. The "*" wildcard may be used to remove all entries for
the given pClass. pIncrement - If true, the purge method will automatically advance the top node of ^OBJ.DSTIME
to advance the timestamp of all non-interval type entries to support the next purge. This parameter is set to
1 by default.
Stops all DeepSee background agents, clears any pending tasks,
and clears the result cache for the current namespace.
If pClearCells is true, then the cell cache for the
current namespace is also cleared.
This method is provided as a convenience for developers for
use on development or test systems. You should not use this method
on production systems as it will have immediate effect on the
performance of end user operations.
classmethod %RunServerAuditCode(pDashboardId As %String) as %Status
Run the server audit code.
This gives customer applications a chance to audit viewing of DeepSee dashboard pages.
This is called whenever a DeepSee dashaboard is viewed in the user portal.
The server audit code is a valid ObjectScript expression stored in the ^DeepSee.AuditCode global.
Server audit code should not write any output to the current device nor
should this code kill any % variables required by Zen or DeepSee.
The variable, %dsDashboard, will contain the id (name) of the current dashboard item.
Run the server init code.
This gives customer applications a chance to establish environmental settings.
This is called whenever a DeepSee session is created or when a background agent starts.
The server init code is a valid ObjectScript expression stored in the ^DeepSee.InitCode global.
Server init code should not write any output to the current device nor
should this code kill any % variables required by Zen or DeepSee.
Save a pivot variable.
The variable's attributes are in the array pInfo.
classmethod %SaveSharedCalcMember(pCube As %String = "", pCalcMbrName As %String = "", pDimension="", pValueExpression="", pFormatString="", pSolveOrder, pUseCubeVersion As %Boolean = 0) as %Status
Store the details of a calulated member in the shared location.
classmethod %SetAgentCount(pNumAgents As %Integer = "") as %Integer
Set the default number of background processes used by DeepSee.
DeepSee actually creates double the specified number of processes: one set is
used for high priority work, and the other set is used for low priority work.
If set to "", then 4 times the number of cores is used.
The minimum number of agents is 2; if you set agents to less than 2, then 2 agents will be create.
Return the current default agent count (which could be "").
This will only take effect after DeepSee is reset.
classmethod %SetDSTimeIndex(pClassName As %String, pObjectId As %String, pAction As %Integer, pInterval As %Integer = 0)
Set an entry into the DS Time index used to track changes to transactional classes.
This is intended for classes that use DSTIME="manual" and wish to maintain the DSTIME index
manually. It should be called whenever an instance of the class is inserted, updated, or deleted. pClassName is the (case-sensitive) class name of the transactional class. pObjectId is object id of the affected object instance. pAction is 0 for updates, 1 for inserts, and 2 for deletes. pInterval is the time interval value corresponding to the DSINTERVAL parameter. If this is not greater than zero then
a standard DSTIME index entry is set, otherwise a DSINTERVAL index entry is set.
classmethod %Shell()
Invoke the DeepSee command line shell.
classmethod %SynchronizeCube(pCubeName As %String, pVerbose As %Boolean = 1, Output pFactsUpdated As %Integer, pReadCommitted As %Boolean = 1, pCheckReferences As %Boolean = 1, pAsync As %Boolean = 0, ByRef pSynchronizeStatistics As %String = "") as %Status
For the specified cube, find and apply all changes from the source data that have been made since the
last call to this method.
If pVerbose is true, then status information is written to the console.
On return, pFactsUpdated will return the number of facts updated.
By default, reads from the source table use READ COMMITTED mode, you can turn this off
(if you can tolerate reads of values from uncommitted transactions) by setting
pReadCommitted to 0.
If this cube has facts that reference (via relationships) facts within another cube and any
of those remote facts are missing (because the related cube has not been synchronized), then
this method will report success and the missing references will be treated as build errors.
To avoid this type of error, it is better to plan your synchronization so that the related cubes are
synchronized first (in the same order the cubes are built).
The pCheckReferences argument is deprecated and no longer has any effect on updates.
pAsync controls whether DeepSee performs the synchronize in multiple background processes.
If this argument is true, the system uses multiple processes and does not return until they are all complete.
If this argument is false, the system uses a single process and does not return until it is complete.
By default this method runs in the synchronous mode to avoid any potential interference
with agents involved in background processing. If asynchronous mode is turned on, the synchronization work
will be divided among all available Low priority agents.
pSynchronizeStatistics returns an array of information about the synchronize.
The array has four subscripts. For example, if tStats is the argument used, as in:
do ##class(%DeepSee.Utils).%SynchronizeCube("PATIENTS",1,,,,,.tStats) the array might look like the following:
tStats("elapsedTime")=.000643
tStats("errors")=1
tStats("factCount")=5
tStats("missingReferences")=1
If any errors occur during the synchronize process but all source records are successfully checked,
this cube will treat processing for this timestamp as complete. The expectation is that any
individual update errors can and should be resolved individually or through the %FixBuildErrors()
method and not by the synchronize itself.
This utility method tests a DeepSee time level class to
verify that it is implemented correctly.
There are several tests:
Test 1: test the %Convert, %KeyToValue, and %ValueToKey methods.
Test 2: test the %Convert, %KeyToValue, and %ValueToKey methods.
classmethod %UnformatDate(pValue As %String, pFormat As %String = "") as %Date
Unformat a date value according to the given format and convert to $H (or "").
See %FormatDate() for information on formats.
Programmatic API for updating the value of a dimension property after a cube has been built.
Set tSC = ##class(%DeepSee.Utils).%UpdateDimensionProperty(
"Holefoods","[Outlet].[H1].[Region].&[Asia]","Asia2")
It takes the following arguments: pCubeName-name of the cube. pSpec-specification of member to update as an MDX expression. This must completely specify a level and a single key value
within the level. For example: "[Product].[P1].[Product Category].&[Candy]"
You can set the value of a dimension property by adding Properties(propName) to the end of the spec:
"[Outlet].[H1].[City].&[23].Properties(""Population"")"
pValue-if defined, this is new NAME value for a dimension member or the value to use for a dimension property. pKey-if defined, this is new KEY value for a dimension member. Ignored for a dimension property.
There a number of restrictions on this method:
You cannot update a time dimension.
You cannot update a member of relationship.
You cannot update a level property whose isReference is true.
classmethod %WriteDependencyGraph(pCubeName As %String)
Write the cube dependency graph for the given cube.