Jump to content

Section A.2 FoodMart Sales OLAP Schema:bad schema?


bobbyo

Recommended Posts

I recently purchased the ultimate guides from jaspersoft in hopes of learning how to create schema that work with XML under jaspersoft, but I've hit a snag:

 

The example 'foodmart Sales OLAP Schema', section A.2/p.95 in JA-Ultimate-Guide.3.5.pdf, does not work with the Schema Workbench.

 

In particular, I cut-n-pasted the FoodMart Sales Olap Schema xml document (below, code) into a text file, then tried to open it with

JasperAnalysis Schema Workbench Version: 3.5.4

 

but whe I tried File->Open on the file, I got a popup window with the error:

Error opening shcmea -- Parsing Error: Could not open file C:\Documents....\Foodmart_sales_olap_schema.xml In Schema: In Cube: element <Dimension> is not of expected type mondrian.gui.MondrianGuiDef$Relation

I don't see a <Table /> element for the Cube...is the example schema incorrect? Can you give a correct version of the schema?

Thanks,

  Bobby O

 

 

Code:
A.2 FoodMart Sales OLAP Schema<?xml version="1.0" encoding="UTF-8"?><Schema name="FOODMART"><Cube name="SALES BY PRODUCT BY STORE"><Dimension name="PRODUCT"><Hierarchy hasAll="true" name="PRODUCT CLASS" primaryKey="product_id"primaryKeyTable="product"><Level column="product_family" name="PRODUCT FAMILY" table="product_class"uniqueMembers="true"/><Level column="product_department" name="PRODUCT DEPARTMENT" table="product_class"uniqueMembers="false"/><Level column="product_category" name="PRODUCT CATEGORY" table="product_class"uniqueMembers="false"/><Level column="product_subcategory" name="PRODUCT SUBCATEGORY" table="product_class"uniqueMembers="false"/><Level column="brand_name" name="BRAND NAME" table="product" uniqueMembers="false"/><Level column="product_name" name="PRODUCT NAME" table="product" uniqueMembers="true"/></Hierarchy></Dimension><Dimension name="STORE"><Hierarchy hasAll="true" name="STORE LOCATION" primaryKey="store_id"><Table name="store"/><Level column="store_country" name="STORE COUNTRY" uniqueMembers="true"/><Level column="store_state" name="STORE STATE" uniqueMembers="true"/><Level column="store_city" name="STORE CITY" uniqueMembers="false"/><Level column="store_name" name="STORE NAME" uniqueMembers="true"><Property column="store_type" name="STORE TYPE"/><Property column="store_manager" name="STORE MANAGER"/><Property column="store_sqft" name="STORE SQFT" type="Numeric"/><Property column="grocery_sqft" name="GROCERY SQFT" type="Numeric"/><Property column="frozen_sqft" name="FROZEN SQFT" type="Numeric"/><Property column="meat_sqft" name="MEAT SQFT" type="Numeric"/><Property column="coffee_bar" name="HAS COFFEE BAR" type="Boolean"/><Property column="store_street_address" name="STREET ADDRESS" type="String"/></Level></Hierarchy></Dimension><Measure aggregator="sum" column="store_sales" formatString="$#,###.00" name="STORESALES"/><Measure aggregator="count" column="product_id" formatString="#,###" name="SALES COUNT"/></Cube></Schema>
Link to comment
Share on other sites

  • 9 months later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

It's odd. I'm able to load the schema into JasperServer and create views against it with no problem, but I'm getting an error from the workbench (v3.5.4) when I try to load the schema there. I'm not sure if it's a bad schema or a problem with the workbench's validation mechanism. I fiddled with the schema a bit, but I wasn't able to find a quick fix to the schema. 

I've logged a defect for this in our internal system. Note that you can use the full foodmart schema, which is available in your JS install under samples/schemas.

Thanks for pointing this out, and sorry for the long delay in replying,

Kristen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...