[Mondrian] Datatype in MDSCHEMA_MEASURES

Julian Hyde julianhyde at speakeasy.net
Fri Mar 23 21:06:15 EDT 2007


Here's the code, from RowsetDefinition.java:
 
            // DATA_TYPE DBType best guess is string
            int dbType = DBType.WSTR.userOrdinal;
            String datatype = (String)
                member.getPropertyValue(Property.DATATYPE.getName());
            if (datatype != null) {
                if (datatype.equals("Integer")) {
                    dbType = DBType.I4.userOrdinal;
                } else if (datatype.equals("Numeric")) {
                    dbType = DBType.R8.userOrdinal;
                } else {
                    dbType = DBType.WSTR.userOrdinal;
                }
            }
            row.set(DataType.name, dbType);

It suggests that you can override by setting the DATATYPE property of
the calculated member to "Integer" or "Numeric".
 
Julian


  _____  

From: mondrian-bounces at pentaho.org [mailto:mondrian-bounces at pentaho.org]
On Behalf Of Matt Campbell
Sent: Friday, March 23, 2007 11:56 AM
To: mondrian at pentaho.org
Subject: [Mondrian] Datatype in MDSCHEMA_MEASURES



Calculated members appear to always have a datatype of WSTR (130)
specified in the XMLA response.  This looks like a bug.  Anyone have
additional information?

<row>
        <CATALOG_NAME>FoodMart</CATALOG_NAME> 
        <CUBE_NAME>Sales</CUBE_NAME>
        <MEASURE_NAME>Profit Growth</MEASURE_NAME>
        <MEASURE_UNIQUE_NAME>[Measures].[Profit
Growth]</MEASURE_UNIQUE_NAME>
        <MEASURE_CAPTION>Gewinn-Wachstum</MEASURE_CAPTION> 
        <MEASURE_AGGREGATOR>127</MEASURE_AGGREGATOR>
        <DATA_TYPE>130</DATA_TYPE>
        <MEASURE_IS_VISIBLE>true</MEASURE_IS_VISIBLE> 
        <DESCRIPTION>Sales Cube - Profit Growth Member</DESCRIPTION>
</row>


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20070323/d4e8c14a/attachment.html 


More information about the Mondrian mailing list