Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

IDSSDatamartColumn Interface Reference

List of all members.

Detailed Description

The IDSSDatamartColumn interface is used to expose information about a column that could appear in a datamart table.

A DSS Datamart object appears is used to describe a datamart table that could be created in an RDBMS to hold the result of a report. Among other things a datamart object could specify the columns that would appear in the table. This interface is used to expose this information.
Typically a column is described by using the usual DSS Column object, optionally specifying a pattern to use to generate the name of the column. However we also support 'virtual' columns that correspond to several adjacent physical columns. When a datamart is created the engine will determine which physical columns should replace a virtual column. The columns it uses will depend on what data is written into the virtual columns.


Public Member Functions

HRESULT Column ([in] IDSSColumn *pColumn)
 A physical column that could replace this virtual column.
HRESULT Column ([out, retval] IDSSColumn ppColumn)
 A physical column that could replace this virtual column.
HRESULT Index ([in] Int32 Index)
 The position of the column in the datamart.
HRESULT Index ([out, retval] Int32 *pIndex)
 The position of the column in the datamart.
HRESULT IsPattern ([in] VARIANT_BOOL IsPattern)
 Whether the Name property contains a pattern.
HRESULT IsPattern ([out, retval] VARIANT_BOOL *pIsPattern)
 Whether the Name property contains a pattern.
HRESULT Name ([in] BSTR Name)
 The name of the virtual column.
HRESULT Name ([out, retval] BSTR *pName)
 The name of the virtual column.
HRESULT Type ([in] EnumDSSDatamartColumnType Type)
 The type of this datamart column.
HRESULT Type ([out, retval] EnumDSSDatamartColumnType *pType)
 The type of this datamart column.


Member Function Documentation

HRESULT IDSSDatamartColumn::Column [in] IDSSColumn pColumn  ) 
 

A physical column that could replace this virtual column.

Column is an object property. If this datamart column should be written as a single physical column then this object should be used to determine the data type of the physical column.

This property defaults to NULL.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSDatamartColumn::Column [out, retval] IDSSColumn   ppColumn  ) 
 

A physical column that could replace this virtual column.

Column is an object property. If this datamart column should be written as a single physical column then this object should be used to determine the data type of the physical column.

This property defaults to NULL.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSDatamartColumn::Index [in] Int32  Index  ) 
 

The position of the column in the datamart.

Index is a numeric property. It records the position of this column within the collection of columns maintained by the DSS Datamart object that it comes from. The columns are numbered from one, so this number is always larger than or equal to one.

Setting this property has the effect of reordering the columns in the datamart object. As always the relative order of the other columns is left unchanged when this column is moved. Setting this property to zero moves this column to the end of the collection.
Parameters:
Index New value of index Should be zero, or a number in range one to number of columns
Returns:
Usual COM result code:
  • S_OK
  • DSSCOM_E_INDEX_OUT_OF_RANGE Attempt to set Index to an out of range number

HRESULT IDSSDatamartColumn::Index [out, retval] Int32 *  pIndex  ) 
 

The position of the column in the datamart.

Index is a numeric property. It records the position of this column within the collection of columns maintained by the DSS Datamart object that it comes from. The columns are numbered from one, so this number is always larger than or equal to one.

Setting this property has the effect of reordering the columns in the datamart object. As always the relative order of the other columns is left unchanged when this column is moved. Setting this property to zero moves this column to the end of the collection.
Parameters:
pIndex Current value of index It is a number in the range one to number of columns
Returns:
Usual COM result code:
  • S_OK
  • DSSCOM_E_INDEX_OUT_OF_RANGE Attempt to set Index to an out of range number

HRESULT IDSSDatamartColumn::IsPattern [in] VARIANT_BOOL  IsPattern  ) 
 

Whether the Name property contains a pattern.

IsPattern is a Boolean property. It records whether or not the NameString property should be interpreted as a simple string or if it contains patterns that should be substituted at the time that the datamart is generated.
IsPattern defaults to False on a new datamart column object.
Any string can be used as a pattern string. Inside the string '!' is a special character. Its meaning depends on the character that follows it.
Pattern Meaning
!! A single '!'. This is just in case there is an RDBMS that permits '!' as a character in a legal table name.
!D Date on which the table was created. The date is written using the 'yyyymmdd' format. So '20000324' would be 23rd March 2000.
!I Index number. This is used for virtual columns to give them different names.
!O Name of an object. So for a datamart column this is the name of the object used to populate the column.
!U Login name of the DSS User executing the report. As is usual for SQL, the name is presented in upper case.
!other Ignored. Neither the '!' nor the character that follows it is written into the name. This is to allow for future expansion.
Parameters:
IsPattern 
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSDatamartColumn::IsPattern [out, retval] VARIANT_BOOL *  pIsPattern  ) 
 

Whether the Name property contains a pattern.

IsPattern is a Boolean property. It records whether or not the NameString property should be interpreted as a simple string or if it contains patterns that should be substituted at the time that the datamart is generated.

IsPattern defaults to False on a new datamart column object.
Any string can be used as a pattern string. Inside the string '!' is a special character. Its meaning depends on the character that follows it.
Pattern Meaning
!! A single '!'. This is just in case there is an RDBMS that permits '!' as a character in a legal table name.
!D Date on which the table was created. The date is written using the 'yyyymmdd' format. So '20000324' would be 23rd March 2000.
!I Index number. This is used for virtual columns to give them different names.
!O Name of an object. So for a datamart column this is the name of the object used to populate the column.
!U Login name of the DSS User executing the report. As is usual for SQL, the name is presented in upper case.
!other Ignored. Neither the '!' nor the character that follows it is written into the name. This is to allow for future expansion.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSDatamartColumn::Name [in] BSTR  Name  ) 
 

The name of the virtual column.

Name is a text property. It returns the name of the datamart column. If the datamart column corresponds to one physical column then this property is the name of the physical column. If the datamart column refers to several physical columns then this property records a pattern used to name the columns.

Even if this is a single column, the designer may still specify that the Name should be generated at the same time as the datamart is written. This is done by including special strings within the Name property. The IsPattern records whether or not the Name string includes special patterns.
By default this property returns the empty string. However if the Column property has been assigned, and the Name property has not been assigned then this property returns the name of the column (that is "Column.ColumnName"). Setting the Name property to empty string reverts it to its initial state.
If neither Column nor Name is assigned, then the engine will select its own name for a physical column created from this datamart column.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSDatamartColumn::Name [out, retval] BSTR *  pName  ) 
 

The name of the virtual column.

Name is a text property. It returns the name of the datamart column. If the datamart column corresponds to one physical column then this property is the name of the physical column. If the datamart column refers to several physical columns then this property records a pattern used to name the columns.

Even if this is a single column, the designer may still specify that the Name should be generated at the same time as the datamart is written. This is done by including special strings within the Name property. The IsPattern records whether or not the Name string includes special patterns.
By default this property returns the empty string. However if the Column property has been assigned, and the Name property has not been assigned then this property returns the name of the column (that is "Column.ColumnName"). Setting the Name property to empty string reverts it to its initial state.
If neither Column nor Name is assigned, then the engine will select its own name for a physical column created from this datamart column.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSDatamartColumn::Type [in] EnumDSSDatamartColumnType  Type  ) 
 

The type of this datamart column.

Type is an enumeration property. It specifies the type of the column.

The most common value for this property is DssDatamartColumnConcrete. This means that the datamart column corresponds to a single physical column that is described by the Column property (and the Name property if we want to override the column's usual name).
Here are the possible values for EnumDSSDatamartColumnType. We may add other values as we extend the datamart concept.
Name Value Meaning
DssDatamartColumnReserved 0 Not used.
DssDatamartColumnConcrete 1 Column maps to a single column in the physical table.
DssDatamartColumnAttribute 2 Column maps to several columns, corresponding to different forms of a single attribute.
DssDatamartColumnDimension 3 Column maps to several columns, corresponding to different forms of attributes replacing a dimension.
DssDatamartColumnCustomGroup 4 Column maps to custom group, written out using a column for each level
DssDatamartColumnCustomGroupP 5 Column maps to custom group written out with a parent column.
DssDatamartColumnConsolidation 6 Column maps to consolidation, written out using a column for each level
DssDatamartColumnConsolidationP 7 Column maps to consolidation written out with a parent column.
Returns:
Usual COM result code:
  • S_OK

HRESULT IDSSDatamartColumn::Type [out, retval] EnumDSSDatamartColumnType pType  ) 
 

The type of this datamart column.

Type is an enumeration property. It specifies the type of the column.

The most common value for this property is DssDatamartColumnConcrete. This means that the datamart column corresponds to a single physical column that is described by the Column property (and the Name property if we want to override the column's usual name).
Here are the possible values for EnumDSSDatamartColumnType. We may add other values as we extend the datamart concept.
Name Value Meaning
DssDatamartColumnReserved 0 Not used.
DssDatamartColumnConcrete 1 Column maps to a single column in the physical table.
DssDatamartColumnAttribute 2 Column maps to several columns, corresponding to different forms of a single attribute.
DssDatamartColumnDimension 3 Column maps to several columns, corresponding to different forms of attributes replacing a dimension.
DssDatamartColumnCustomGroup 4 Column maps to custom group, written out using a column for each level
DssDatamartColumnCustomGroupP 5 Column maps to custom group written out with a parent column.
DssDatamartColumnConsolidation 6 Column maps to consolidation, written out using a column for each level
DssDatamartColumnConsolidationP 7 Column maps to consolidation written out with a parent column.
Returns:
Usual COM result code:
  • S_OK


Copyright © 1996-2018 MicroStrategy Inc. All Rights Reserved.