PDA

View Full Version : Cube definition



lmflores
08-09-2005, 04:12 AM
Hi I have the next problem:
I have two tables : vtascont (master of sales) and vtacontd (details of sales). They are in a postgresql databse in one schema called yucatan.
I need to extract information from them. vtacontd has fields referencing to the product saled, the amount of the money among other things.
Both tables are in one schema called yucatan (ie). So i acces them as yucatan.vtascont or yucatanvtacontd.
I put here my cube definition file :
<?xml version="1.0" encoding="UTF-8"?>
<Schema >
<Cube name="Ventas">
<Table alias="" name="vtacontd" schema="yucatan"/>
<Dimension foreignKey="foliovta" name="Datos Ventas">
<Hierarchy allMemberName="Todos los folios" defaultMember="" primaryKey="foliovta">
<Table name="vtascont" schema="yucatan"/>
<Level column="id" name="Dependencia" nameColumn="" nullParentValue="" ordinalColumn="" parentColumn="" type="Numeric"/>
<Level column=" rfc_clie" name="Cliente" nameColumn="" ordinalColumn="" table=""/>
</Hierarchy>
</Dimension>
<Measure column="prec_vta" formatString="#,###.00" name="Importe"/>
</Cube>
</Schema>
And this is my query :
<mondrian:query id="pruebaQuery" jdbcDriver="org.postgresql.Driver" jdbcUrl="jdbc:postgresql://zeus.org:5432/SUE_PG" jdbcUser="admin" jdbcPassword="s739admin" catalogUri="/WEB-INF/querys/SUE.xml">
SELECT
{[Measures].[Importe]} on columns,
{([Datos Ventas].descendants)} ON rows
FROM [Ventas]
</mondrian:query>
I get the following error:
MDX cube 'Ventas' not found or not processed
Do you know why???
Thanks in advanced

jhyde
08-09-2005, 08:56 AM
Mondrian is saying that it has found a catalog file, but it doesn't include a cube called Ventas. It's NOT a problem with connecting to the RDBMS -- Mondrian hasn't gotten that far. Maybe you have an outofdate SUE.xml on your path (or in your WAR file)

lmflores
08-10-2005, 12:04 PM
Sorry.. but i am new in this whole thing....
My cube is named Ventas.. And i have maden test changing the name of the catalog to another name for example catalogUri="/WEB-INF/querys/SUEsd.xml" and the error changes telling me it doesn't find the catalog....
I think it can be an issue weith my MDX query or my cube is not proper defined...
What do you mean with outofdate SUE.xml on your path???
Thanks

jhyde
08-10-2005, 12:43 PM
The schema file that you posted seemed to have a cube correctly defined. So I wondered that maybe you have inadvertently created more than one SUE.xml file, and Mondrian is looking at a different one.