Data Cube
The callback functions provide access to the cross tabulation data cube data structure.
The data cube is an n-dimensional array (cube) that holds counts for each cell in the cross tabulation request. The data cube structure differs from the structure presented to the SuperSTAR end user in SuperCROSS.
The following diagram shows a table in SuperCROSS with three fields (two fields in the row and one in the column):

When represented by a data cube, each field is represented in its own unique dimension that can be referenced by an integer value:

Dimension Functions
GetDimensionCountT()
Retrieve the number of dimensions in the data cube.
The type of a dimension can either be summation or classification.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionCountT(PreJobInfoT *JobInfo)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionCountT(JobInfoT *JobInfo)
Arguments |
| |||
|---|---|---|---|---|
Returns | The number of dimensions in the cube. |
GetDimensionTypeT()
Retrieve the dimension type.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionTypeT(PreJobInfoT *JobInfo, int Dimension)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionTypeT(JobInfoT *JobInfo, int Dimension)
Arguments |
| ||||||
|---|---|---|---|---|---|---|---|
Returns |
|
Field Functions
GetDimensionFieldCountT()
Retrieve the number of fields for the specified dimension.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldCountT(PreJobInfoT *JobInfo, int Dimension)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldCountT(JobInfoT *JobInfo, int Dimension)
Arguments |
| ||||||
|---|---|---|---|---|---|---|---|
Returns |
|
GetDimensionFieldIdentifierT()
Return the ID of a field within the specified dimension.
The ID is derived from the name of the column in the source database that this field is associated with. For SXV4 databases, field IDs are only useful internally within SuperSTAR and are generated when the SXV4 is built in SuperCHANNEL.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldIdentifierT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldIdentifierT(JobInfoT *JobInfo, int Dimension, int FieldOffset)
Arguments |
| |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Returns | The field ID or NULL if the dimension index or field offset are invalid. |
GetDimensionFieldLabelT()
Return the label of a field within the specified dimension.
The label is the "display name" shown to end users in the clients (e.g. "Gender"/"Area").
If the field has been recoded then this function returns the renamed/recoded label (use GetDimensionBaseFieldLabelT to retrieve the original label).
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldLabelT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldLabelT(JobInfoT *JobInfo, int Dimension, int FieldOffset)
Arguments |
| |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Returns | The field label or NULL if the dimension index or field offset are invalid. |
GetDimensionFieldBaseIdentifierT()
Return the ID of a field within the specified dimension.
The ID is derived from the name of the column in the source database that this field is associated with. For SXV4 databases, field IDs are only useful internally within SuperSTAR and are generated when the SXV4 is built in SuperCHANNEL.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldBaseIdentifierT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldBaseIdentifierT(JobInfoT *JobInfo, int Dimension, int FieldOffset)
Arguments |
| |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Returns | The field ID or NULL if the dimension index or field offset are invalid. |
GetDimensionFieldBaseLabelT()
Return the label of a field within the specified dimension.
The label is the "display name" shown to end users in the clients (e.g. "Gender"/"Area").
This function always returns the original label for this field that was set when the SXV4 was generated in SuperCHANNEL, even if the field has subsequently been recoded.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldBaseLabelT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldBaseLabelT(JobInfoT *JobInfo, int Dimension, int FieldOffset)
Arguments |
| |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Returns | The field label or NULL if the dimension index or field offset are invalid. |
GetDimensionFieldTypeT()
Return the type of a field.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldTypeT(PreJobInfoT* JobInfo, int Dimension, int FieldOffset)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldTypeT(JobInfoT* JobInfo, int Dimension, int FieldOffset)
Arguments |
| |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Returns | The field type. If the return type is |
IsDimensionFieldVisibleT()
Return the visibility of a given field within a dimension, in regards to the end user (i.e., can the end user see the field?)
Fields added by SuperSERVER, for example summation options added via PreJob AppendSummation methods, will be invisible. Fields requested by the end user are visible.
Available To |
|
|
|
|---|
GetDimensionFieldIdentifierT(JobInfoT *JobInfo, int Dimension, int FieldOffset)
Arguments |
| |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Field Item Functions
Each dimension contains a number of DimensionFieldItems. For example, the Area field has field items called New South Wales, Victoria etc.
GetDimensionFieldItemCountT()
Return the number of field items in a given dimension for a given field.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldItemCountT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldItemCountT(JobInfoT *JobInfo, int Dimension, int FieldOffset)
Arguments |
| |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Returns | The field item count or -1 if the dimension index or field offset are invalid. |
GetDimensionFieldItemContributorsT()
Return the classification values that are related to a field item.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldItemContributorsT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem, const SourceValueInfoT** Values, int* IndexLen)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldItemContributorsT(JobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem, const SourceValueInfoT** Values, int* IndexLen)
Arguments |
| ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
GetDimensionFieldItemIdentifierT()
Return the ID of a field item.
Each DimensionFieldItem has an ID and a label (display name). For example, for the dimension containing the Gender field:
GetDimensionFieldItemIdentifierTwill return codes such as M and F.GetDimensionFieldItemLabelTwill return labels such as Male and Female.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldItemIdentifierT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldItemIdentifierT(JobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem)
Arguments |
| ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns | The field ID or NULL if the dimension index, field offset, or item index are invalid. |
GetDimensionFieldItemLabelT()
Return the label (display name) of a field item.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldItemLabelT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldItemLabelT(JobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem)
Arguments |
| ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns | The field label or NULL if the dimension index, field offset, or item index are invalid. |
GetDimensionFieldItemTypeT()
Return the type of a field item.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldItemTypeT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldItemTypeT(JobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem)
Arguments |
| |||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns | One of the following item types:
|
Totals and Field Types
AreAllCubeTotalsAdditiveT()
For the item type CAT_TYPE_GRAND_TOTAL, the totals may be additive or non-additive. This function provides a way to identify whether the totals are additive or non-additive.
Available To |
|
|
|
|---|
AreAllCubeTotalsAdditiveT(JobInfoT *JobInfo)
Arguments |
| ||||
|---|---|---|---|---|---|
Returns |
|
DoesFieldItemContainUnclassifiedValuesT()
Determine whether the field Item contains unclassifiable data.
Unclassifiable data may be caused by null input values when data is channelled in to a SuperSTAR database, or by classification User Defined Fields that are based on the results of illegal mathematical operations such as division by zero.
Unclassified data may be grouped with other underlying field items. In this situation, the Grouped output variable will be set to true. Your application can then use the function GetDimensionFieldItemContributorsT to determine which items have been grouped.
Available To |
|
|
|
|
|---|
PreJob:
DoesFieldItemContainUnclassifiedValuesT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem, int* Grouped)
PrepareJob, PerformJob or CleanUpJob:
DoesFieldItemContainUnclassifiedValuesT(JobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem, int* Grouped)
Arguments |
| |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
GetDimensionStatisticalFieldTypeT()
Retrieve the type of a statistical field. This function does not take a WhichItem argument because summation fields can only have 1 item.
For a string representation of a summation field use GetDimensionFieldLabel to get the base summation option and GetDimensionFieldItemIdentifier to get the statistical function used.
Available To |
|
|
|
|---|
GetDimensionStatisticalFieldTypeT(JobInfoT* JobInfo,int Dimension, int FieldOffset)
Arguments |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns | One of the following item types:
|
GetDimensionStatisticFunctionTypeT()
Retrieve the type of a statistical function being applied to a summation field.
Available To |
|
|---|
GetDimensionStatisticFunctionTypeT(PreJobInfoT* JobInfo,int Dimension, int FieldOffset)
Arguments |
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns | One of the following item types:
|
GetDimensionFieldTotalsT()
Retrieve the indexes of the totals within a dimension.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldTotalsT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset, const int** Values, int *IndexCount)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldTotalsT(JobInfoT *JobInfo, int Dimension, int FieldOffset, const int** Values, int *IndexCount)
Arguments |
| |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
GetDimensionFieldTotalItemsT()
Retrieve the indexes of the items that make up a field total item.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldTotalItemsT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem, const int** Values, int *IndexCount)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldTotalItemsT(JobInfoT *JobInfo, int Dimension, int FieldOffset, int WhichItem, const int** Values, int *IndexCount)
Arguments |
| |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
Default Summation
GetDefaultSummationIdentifierT()
Retrieve the ID of the default summation that is used when no summation is explicitly added to a table.
Available To |
|
|
|
|
|---|
PreJob:
GetDefaultSummationIdentifierT(PreJobInfoT *JobInfo)
PrepareJob, PerformJob or CleanUpJob:
GetDefaultSummationIdentifierT(JobInfoT *JobInfo)
Arguments |
| |||
|---|---|---|---|---|
Returns | The default summation ID or NULL on failure. |
GetDefaultSummationFieldTypeT()
Retrieve the field type of the default summation that is used when no summation is explicitly added to a table.
Available To |
|
|
|
|
|---|
PreJob:
GetDefaultSummationFieldTypeT(PreJobInfoT* JobInfo)
PrepareJob, PerformJob or CleanUpJob:
GetDefaultSummationFieldTypeT(JobInfoT *JobInfo)
Arguments |
| |||
|---|---|---|---|---|
Returns | The default summation field type or NULL on failure. |
GetDefaultSummationTableIdentifierT()
Retrieve the table ID of the table the default summation belongs to.
Available To |
|
|
|
|---|
GetDefaultSummationTableIdentifierT(JobInfoT *JobInfo)
Arguments |
| |||
|---|---|---|---|---|
Returns | The table ID or NULL on failure. |
GetDefaultSummationLabelT()
Retrieve the label of the default summation that is used when no summation is explicitly added to a table.
Available To |
|
|
|
|
|---|
PreJob:
GetDefaultSummationLabelT(PreJobInfoT *JobInfo)
PrepareJob, PerformJob or CleanUpJob:
GetDefaultSummationLabelT(JobInfoT *JobInfo)
Arguments |
| |||
|---|---|---|---|---|
Returns | The default summation label or NULL on failure. |
GetDefaultSummationTableLabelT()
Retrieve the label of the table the default summation belongs to.
Available To |
|
|
|
|---|
GetDefaultSummationTableLabelT(JobInfoT *JobInfo)
Arguments |
| |||
|---|---|---|---|---|
Returns | The table label or NULL on failure. |
GetDimensionFieldFactTableIdentifierT()
Retrieve the ID of the table a field belongs to.
Available To |
|
|
|
|
|---|
PreJob:
GetDimensionFieldFactTableIdentifierT(PreJobInfoT *JobInfo, int Dimension, int FieldOffset)
PrepareJob, PerformJob or CleanUpJob:
GetDimensionFieldFactTableIdentifierT(JobInfoT *JobInfo, int Dimension, int FieldOffset)
Arguments |
| |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Returns | The table ID or NULL on failure. |
GetDefaultSummationTableLabelT()
Retrieve the label of the table a field belongs to.
Available To |
|
|
|
|---|
GetDimensionFieldFactTableLabelT(JobInfoT *JobInfo, int Dimension, int FieldOffset)
Arguments |
| |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Returns | The table label or NULL on failure. |
Summation Functions
AreSummationTotalsAdditiveT()
Determine whether all the totals for a given summation are additive with respect to the related cells. Additivity is the property that a given total can be determined by adding up all the contributing cells.
If all the totals are additive, then the totals can be recalculated with help from GetDimensionFieldTotalItemsT to determine the contributors.
If the query involves multiple fact tables with a many-to-many relationship between them, this will return false for all summations.
Available To |
|
|
|
|---|
AreSummationTotalsAdditiveT(JobInfoT *JobInfo, int SummationOffset)
Arguments |
| ||||||
|---|---|---|---|---|---|---|---|
Returns |
|
Database Functions
GetNumberRecordsInTableT()
Retrieve the number of records in the specified table.
Available To |
|
|
|
|---|
GetNumberRecordsInTableT(JobInfoT *JobInfo, const char * tableName, double * result)
Arguments |
| |||||||||
|---|---|---|---|---|---|---|---|---|---|---|
Returns |
|
GetDatabaseCodePageT()
Retrieve the system codepage ID for the SXV4 database.
Available To |
|
|
|
|---|
GetDatabaseCodePageT(JobInfoT *JobInfo)
Arguments |
| |||
|---|---|---|---|---|
Returns | The system codepage, or 0 if there is no codepage set for the database. |