Skip to main content

%DeepSee.Utils

class %DeepSee.Utils extends %Library.RegisteredObject

This class contains a number of DeepSee utility methods.

Method Inventory

Parameters

parameter DOMAIN = %DeepSee;

Methods

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.
classmethod %Analyze(pCubeName As %String, pFlags As %String = "i", pVerbose As %Boolean = 1) as %Status
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
Convert a single-subscript array to an $LB format
classmethod %AtScaleExportCube(pCubeName As %String = "", pFileName As %String = "", pCalendar As %String = "") as %Status
Produce a serialized representation of the cube model suitable for import to an AtScale environment. The JSON output will be saved in the file pFileName.
If a calendar has been created to support time dimensions in the AtScale environment, that can be passed in via pCalendar using either table or class reference syntax.
classmethod %BuildCube(pCubeName As %String = "", pAsync As %Boolean = 1, pVerbose As %Boolean = 1, pIndexOnly As %Boolean = 0, pMaxFacts As %Integer = 0, pTracking As %Boolean = 1, ByRef pBuildStatistics As %String = "", pFactList As %String = "") 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.
When a limit is imposed on background agents for a particular namespace using %SetAgentCount(), only one build may be active at a time in that namespace. This will not have any effect on behavior of builds in other namespaces.
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

If the pFactList is supplied the build will only update the columns listed in that fact list. The list must consist of the specific fact names and can have either a comma-delimited or $LB format. If this list is supplied, the specific facts being updated will be individually marked as unavailable for queries and queries referencing dimensions based on those facts will throw an error on prepare.
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.
classmethod %BuildStatus(pCubeName As %String = "")
Command line utility for monitoring cube build progress. This repeats the same information available to the Architect's build winow in a terminal.
final classmethod %CheckPrivilege(pCubeName As %String) as %Boolean
Test that the current user holds privileges on the given cube.
classmethod %CompressIndices(pCubeName As %String, pVerbose As %Boolean = 0) as %Status
Loop over all indices for the given cube and compress them.
classmethod %ComputeAge(pStart As %Date, pEnd As %Date, pUnits As %String = "years") as %Integer
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.
classmethod %ConvertDate(pDate As %String, pDateType As %String) as %Date
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.
classmethod %CubeExists(pCubeName As %String = "", Output pStatus As %Status) as %Boolean
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.
classmethod %DaysInMonth(y, m) as %Integer
Return number of days in the given year and month.
classmethod %DeleteFact(pCubeName As %String, pSourceId As %String = "", pVerbose As %Boolean = 0) as %Status
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.
This method logs current time as the cube's last data update but does not advance the cube's DSTIME timestamp.
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.
classmethod %ExcelFormatDate(pDate As %String, pCalendar As %String) as %String
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 %ExportCSVToFile(pFile As %String = "", ByRef pParms As %String, Output pOutFile) as %Status
Export a DeepSee query or KPI to the file pFile in CSV format.
pParms controls the content and display of the export.
pParms("TITLE") = title
pParms("SUBTITLE") = subtitle
pParms("SHOWDATE") = "on" (includes current date and time in the export)
pParms("SIMPLE") = 1 (exports only the data table without any filter or title information)

Data export should rely on either a base MDX query or an available KPI.
pParms("MDX") = MDX Statement to execute
pParms("KPI") = KPI class name
Exports operating in MDX mode expect filter clauses to be included in the query. When filters are being applied to the KPI class, they may be provided in the array:
pParms("FILTER",filterName) = filterValue
Filters can optionally be included as a printed table in the export, provided by the FILTERNAMES and FILTERVALUES parameters:
pParms("FILTERNAMES") = A $C(10)-delimited list of filter names to display
pParms("FILTERVALUES") = A $C(10)-delimited list of filter values to display

Defined listings can be applied to a resultset using:
pParms("LISTINGNAME") = Name of a listing to execute.
A KPI must support use of a named listing or else this will be ignored. An MDX query must be in DRILLTHROUGH mode and the cube must have that listing defined for the listing to be applied.

classmethod %ExportExcelToFile(pFile As %String, ByRef pParms As %String) as %Status
Export a DeepSee query or KPI to the file pFile in CSV format.
pParms controls the content and display of the export.
pParms("TITLE") = title
pParms("SUBTITLE") = subtitle
pParms("SHOWDATE") = "on" (includes current date and time in the export)

Data export should rely on either a base MDX query or an available KPI.
pParms("MDX") = MDX Statement to execute
pParms("KPI") = KPI class name
Exports operating in MDX mode expect filter clauses to be included in the query. When filters are being applied to the KPI class, they may be provided in the array:
pParms("FILTER",filterName) = filterValue
Filters can optionally be included as a printed table in the export, provided by the FILTERNAMES and FILTERVALUES parameters:
pParms("FILTERNAMES") = A $C(10)-delimited list of filter names to display
pParms("FILTERVALUES") = A $C(10)-delimited list of filter values to display

Defined listings can be applied to a resultset using:
pParms("LISTINGNAME") = Name of a listing to execute.
A KPI must support use of a named listing or else this will be ignored. An MDX query must be in DRILLTHROUGH mode and the cube must have that listing defined for the listing to be applied.

classmethod %ExportPDFToFile(pFile As %String, ByRef pParms As %String) as %Status
Export a DeepSee query or KPI to the file pFile in CSV format.
pParms controls the content and display of the export.
pParms("TITLE") = title
pParms("SUBTITLE") = subtitle
pParms("SHOWDATE") = "on" (includes current date and time in the export)

Data export should rely on either a base MDX query or an available KPI.
pParms("MDX") = MDX Statement to execute
pParms("KPI") = KPI class name
Exports operating in MDX mode expect filter clauses to be included in the query. When filters are being applied to the KPI class, they may be provided in the array:
pParms("FILTER",filterName) = filterValue
Filters can optionally be included as a printed table in the export, provided by the FILTERNAMES and FILTERVALUES parameters:
pParms("FILTERNAMES") = A $C(10)-delimited list of filter names to display
pParms("FILTERVALUES") = A $C(10)-delimited list of filter values to display

Defined listings can be applied to a resultset using:
pParms("LISTINGNAME") = Name of a listing to execute.
A KPI must support use of a named listing or else this will be ignored. An MDX query must be in DRILLTHROUGH mode and the cube must have that listing defined for the listing to be applied.

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

pMembers(n) = $lb(Caption, Spec, ["measure"|"level"|"member"])

Use pDimList to limit the search scope to those dimensions, hierarchies or levels listed in this comma-separated list of specs.

This method does not return "all" levels, nor will it check cube relationships.

classmethod %FixBuildErrors(pCube As %String, pVerbose As %Boolean = 1) as %Status
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.
classmethod %FormatDate(pDate As %Date, pFormat As %String = "") as %String
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 %FormatPartialDate(pDate As %String = "", pFormat As %String = "") as %String
Format a date value (in partial date ODBC 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
"/" - "/"
"-" - "-"
"." - "."
Missing pieces are replaced with the localized text "Unknown".
classmethod %GetAgentCount(pType="build", Output pStatus As %Status) as %Integer
Get the current default agent count for the group specified by pType. pType can be used to query any of the limits:
- "build" - number of agents that will be requested for a single worker group performing cube build tasks
- "runTime" - number of agents that will be requested for queries and processing of user code such as KPIs
- "buildMax" - the maximum number of agents that can be active for build tasks
- "runTimeMax" - the maximum number of agents that can be active for user tasks
classmethod %GetBaseCube(pCubeName As %String) as %String
Given the logical name, pCubeName of a DeepSee subject area known to exist, return its base cube.
classmethod %GetChildSpec(pItemList As %String, pCubeName As %String, pAxisNo As %Integer = 0, Output pChildSpec As %String = "") as %Status
classmethod %GetCollectionProjections(pClassname As %String, ByRef pProjectedClass As %String(MAXLEN=255)) as %Status
Given a class name, return the set of classes projected for collection properties of the class.
classmethod %GetCountCaption(pCubeName As %String, Output pStatus As %Status) as %String
Given the logical name, pCubeName of a DeepSee cube, return the display name of its %COUNT measure.
classmethod %GetCountName(pCubeName As %String, Output pStatus As %Status) as %String
Given the logical name, pCubeName of a DeepSee cube, return the logical name of its %COUNT measure.
classmethod %GetCubeActionClass(pCubeName As %String, Output pStatus As %Status) as %String
Given the logical name, pCubeName of a DeepSee cube, return the class name of it associated actionClass, if any.
classmethod %GetCubeCaption(pCubeName As %String, Output pStatus As %Status) as %String
Given the logical name, pCubeName of a DeepSee cube, return its caption.
classmethod %GetCubeClass(pCubeName As %String, Output pStatus As %Status) as %String
Given the logical name, pCubeName of a DeepSee cube, return the class name of the cube definition.
classmethod %GetCubeDSTime(pCubeName As %String, Output pStatus As %Status) as %Integer
Query the sync timestamp for the given cube.
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.
classmethod %GetCubeModifiedDate(pCubeName As %String, Output pStatus As %Status) as %DeepSee.Datatype.dateTime
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).
classmethod %GetDefaultLevel(pCubeName As %String, pDimName As %String, pHierName As %String) as %String
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) = ""
classmethod %GetDimensionCaption(pCube As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, ByRef pCaption As %String) as %Status
Return the localized display name for a given element within the given cube.
classmethod %GetDimensionFact(pCube As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, ByRef pFactName As %String) as %Status
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, pExtendedInfo As %Boolean = 0, pShowAll 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.
If pExtendedInfo is true, also return $LB(factNumber, factID, SQL column ID, isEnabled, inProgress) settings.
If pShowAll is true, include hidden items in the return list.
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)
classmethod %GetDimensionSpec(pCubeName As %String, Output pSpec As %String, pDimNo As %Integer, pHierNo As %Integer = 0, pLevelNo As %Integer = 0) as %Status
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]
classmethod %GetKPICaption(pKPI As %String, Output pStatus As %Status) as %String
Given the logical name, pKPI of a DeepSee KPI, return its caption.
classmethod %GetKPIClass(pKPIName As %String, Output pStatus As %Status) as %String
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)
classmethod %GetKPIModifiedDate(pKPI As %String, Output pStatus As %Status) as %DeepSee.Datatype.dateTime
Given the logical name, pKPI of a DeepSee KPI, return the date of the time the KPI definition was modified (in $H format).
classmethod %GetKPIName(pKPIName As %String, Output pStatus As %Status) as %String
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) = ""
classmethod %GetLevelNameForKey(pCubeName As %String, pSpec As %String, pKey As %String, Output pValue As %String) as %Status
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 pPivotFullName argument
    To get the text of the MDX query and run the query, use pPivotFullName and pExecute
    To get the text of the MDX query, run the query, and get the ResultSet, use pPivotFullName, pExecute and pResultSet
    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.
    classmethod %GetMemberCaption(pCube As %String, pDimName As %String, pHierName As %String = "", pLevelName As %String = "", ByRef pCaption As %String) as %Status
    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 Business Metrics visible to the current user. This is used by utilities.
    This list takes the form:
    pList(NAME) = $LB(name,caption,moddate,type)
    classmethod %GetModel(pCubeName As %String, Output pStatus As %Status) as %DeepSee.Model.cube
    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.
    When called on a subject area, this redirects to %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.
    final classmethod %GetSQLColumnName(pClass As %String, pProp As %String) as %String
    Returns the SQL name of property pProp for class pClass.
    classmethod %GetSQLTableName(pClass As %String, pVerifyExists=0) as %String
    Returns the SQL table name for class pClass. Returns the empty string if the supplied pClass does not have an associated table.
    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
    classmethod %GetSubjectAreaModel(pName As %String, Output pStatus As %Status) as %DeepSee.Model.SubjectArea.subjectArea
    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 %IsFactEnabled(pCubeName As %String = "", pSpec As %String = "", Output pStatus As %Status, Output pFactName As %String, Output pInProgress) as %Boolean
    Check to see if a given dimension is currently queryable for a given cube.
    classmethod %IsHijriLeapYear(y, calendar="hijriTabular") as %Boolean
    Return whether the given year is a leap year.
    classmethod %IsKPIPublic(pKPIName As %String) as %Boolean
    Given the logical name, pKPIName of a DeepSee KPI, test if it is public.
    classmethod %IsLeapYear(y) as %Boolean
    Return whether the given year is a leap year.
    classmethod %IsRelationship(pCubeName As %String, pDimension As %String) as %Boolean
    Given the logical name, pCubeName of a DeepSee cube, and the name of a dimension, test if the dimension is a relationship.
    classmethod %IsValidCubeName(pCubeName As %String = "", Output pReason) as %Boolean
    Test the raw string to verify it is a valid cube name. A valid cube name must begin with an alpha-numeric character or an underscore. Remaining characters in the cube name must be alpha-numeric, space, underscore, period, slash, and colons.
    classmethod %IsValidFactList(pCube As %String = "", pFactList As %String = "", Output pStatus As %Status, pReason As %String = "") as %Boolean
    Test a pFactList to make sure it contains only SQL column identifiers that are actually defined in pCube.
    classmethod %KPIExists(pKPIName As %String = "", Output pStatus As %Status) as %Boolean
    Given the logical name, pCubeName of a DeepSee cube, test if it exists.
    classmethod %KillCube(pCubeName As %String = "", pForce=0) as %Status
    Delete all indices and cache values for the given cube.
    classmethod %KillKPICacheForCube(pCubeName As %String) as %Status
    Delete any KPI cache values for the given cube.
    classmethod %LoadCellCache(pCubeName As %String) as %Status
    Compute pre-loaded cell cache entries for the given cube based on the cell cache specification within the cube's definition.
    classmethod %LockFactList(pCubeName As %String, pFactList As %List, ByRef pLocked, pLockTimeout=1) as %Status
    Take out locks for the specific column identifiers in a pFactList under the synchronze lock. This will prevent a general build or a synchronize but will not prevent selected updates of other columns in the fact table.
    classmethod %LogBuildError(pCubeName As %String = "", pRecordID As %Integer = 0, pStatus As %Status = $$$OK) as %Status
    Log a %Status to the ^DeepSee.BuildErrors global.
    classmethod %MarkFactsEnabled(pCubeName As %String = "", pFactList As %String = "", pEnabled=1, pInProgress=0) as %Status
    Mark dimensions as enabled or disabled according to pEnabled. If the fact list is not supplied, mark all as enabled. Otherwise, mark only the dimensions supplied in the fact list.
    This method can also optionally mark that a dimension is in the process of updating using the pInProgress paraeter.
    classmethod %MemberHasChildren(pCube As %String, pDimNo As %Integer, pHierNo As %Integer, pLevelNo As %Integer, ByRef pHasChildren As %Boolean) as %Status
    Test if a given element within the given cube has child levels.
    classmethod %NormalizeFactList(pFactList="", Output pStatus As %Status, pCubeName="") as %List
    Take as input a pFactList in either comma-delimited string or $LB format and return a fact list in $LB format with any empty entries removed. If pCubeName is supplied, any supporting fields that are required to produce a successful Selective Build given the cube definition are added to the original list.
    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.
    classmethod %PrecomputeAggregates(pCubeName As %String, pAsync As %Boolean = 1, pVerbose As %Boolean = 1, pTracking As %Boolean = 0) as %Status
    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 As %String = "", pMaxErrors=0)
    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, pFactList As %String = "") 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.
    This method logs current time as the cube's last data update but does not advance the cube's DSTIME timestamp.
    classmethod %PurgeDSTIME(pVerbose As %Integer = 0, Output pPurged As %Library.String(MAXLEN="")) as %Status

    %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:
    		purged("DeepSee.Study.CityRainfall")=1
    		purged("DeepSee.Study.Patient")=2
    		purged("HoleFoods.Transaction")=0
    			
    The array subscript is the class name and the value is the DSTIME value that was purged.


    Return value: This method returns a %Status value indicating success or failure.

    classmethod %PurgeListings(pVerbose As %Integer = 0, pStartDay="") as %Status
    Purge all entries in the listing cache older than pStartDay. If this is omitted, the start day used will be the current day.
    classmethod %PurgeUpdateBuffer(pClass As %String = "", pPurgeUpTo As %String = "", pIncrement As %Boolean = 1, pVerbose As %Boolean = 0) as %Status
    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.
    classmethod %Reset(pClearCells As %Boolean = 0) as %Status
    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.
    classmethod %RunServerCloseCode() as %Status
    Run the server close code.
    This gives customer applications a chance to clear environmental settings. This method is called whenever a DeepSee session is closed or when a background process completes work on a %DeepSee.WorkMgr queue.
    The server close code is a valid ObjectScript expression stored in the ^DeepSee.CloseCode global. Server close code should not write any output to the current device nor should this code kill any % variables required by Zen or DeepSee.
    classmethod %RunServerInitCode() as %Status
    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 process begins work on a %DeepSee.WorkMgr queue.
    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.
    classmethod %SaveNamedFilter(pCube As %String, pFilterName As %String, pTooltip As %String, pSpec As %String, pUseCubeVersion As %Boolean = 0) as %Status
    Save a named filter.
    classmethod %SavePivotVariable(pCube As %String, pVariableName As %String, ByRef pInfo As %String, pUseCubeVersion As %Boolean = 0) as %Status
    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 = "", pType="build", Output pStatus As %Status) as %Integer
    Set the default number of background processes used by DeepSee for the group specified by pType. Tasks executed by background agents are divided into "build" and "runTime" groups. This method can be used to set a per-group limit or to set a maximum number of processes that may be active across multiple groups. The limits can be set with the following value for pType:
    - "build" - number of agents that will be requested for a single worker group performing cube build tasks
    - "runTime" - number of agents that will be requested for queries and processing of user code such as KPIs
    - "buildMax" - the maximum number of agents that can be active for user tasks
    - "runTimeMax" - the maximum number of agents that can be active for user tasks
    classmethod %SetCubeDSTime(pCubeName As %String, pVersion As %Integer = "") as %Status
    Update the sync timestamp for the given cube.
    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.
    classmethod %TestTimeClass(pClassName As %String, pTest As %Integer = 1, pFormat As %String = "") as %Status
    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.
    classmethod %UnformatPartialDate(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.
    classmethod %UnlockFactList(pCubeName As %String, pFactList As %List) as %Status
    Release the update locks for the selected fact list.
    classmethod %UpdateDimensionProperty(pCubeName As %String, pSpec As %String, pValue As %String, pKey As %String) as %Status
    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.
    classmethod GetResourceList() as %String
    Return resource list containing type=Application only.

    Inherited Members

    Inherited Methods

    FeedbackOpens in a new tab