Introduction and use of schema-workbench, a schema file generation tool in mondrian,
I. Installation
1. Prepare jdk1.5 +
2. Download tool: psw-ce-3.4.1.1 and decompress (address as follows)
Schema-workbench
Click Open Link
3. Copy the corresponding JDBC driver package to schema-workbench \ lib.
4. Modify the workbench. bat file
Find the line "rem you shoshould also put mondrian. properties on the calsspath for it to be picked up"
Add set CP = % CP %;./mondrian. properties below
Find the line "rem add all needed JDBC drivers to the classpath"
Add set CP = % CP %; lib/jdbc. jar below (if there are multiple driver JAR files, add multiple lines)
5. Restart workbench. bat.
6. Create ***. mondrian. xml (cube)
Ii. Use
1. Select options-Connection and enter the host name, database, port number, user name, and password to test whether the Connection is successful.
2. Return to the main interface and create a schema (which is equivalent to a data warehouse)
3. Add a cube to the schema. (online analysis is performed on the cube. I simply understand it as a fact table)
4. Add a fact table and measurement (measure) to the cube)
5. Return to the schema Data Warehouse node again and create dimension under it. You can double-click to set the dimension alias.
6. add a table under a dimension to set its dimension table, and add a level to set its layers. If there are multiple layers, you can add multiple layers. For example, there are still months under the date year, more detailed levels such as day
7. In the same way, you can add more dimensions in step 2 of installation.
8. After adding a dimension, add dimension usage to its reference on the cube node, add references to the following dimension table, and add source
9. Return to each dimension node again and modify the primaryKey of hierarchy.
10. Generate the corresponding xml file
Example:
If you want to learn more deeply, MDX official documents are indispensable.