Anda di halaman 1dari 9

Evaluating Pentaho Analysis Using Your Own

Data
Pentaho Analysis is built on the popular Mondrian OLAP engine. The Pentaho BI Platform embeds the

Mondrian engine as part of its architecture. Along with the Pentaho BI Platform, the Mondrian engine

processes MDX requests with the ROLAP (Relational OLAP) schemas. These schema files are XML

metadata models that are created in a specific structure used by the Mondrian engine. These XML models

can be considered cube-like structures which utilize existing FACT and DIMENSION tables found in your

RDBMS. It does not require that an actual physical cube is built or maintained; only that the metadata model

is created.

This XML-based metadata structure can be created using a text editor or the Schema Workbench. After the

schema is created and published to the Pentaho BI Server there are some additional steps necessary to

create the Pentaho Analysis View.

Creating a Pentaho Analysis View Using the Schema


Workbench

Follow the five basic steps below when creating a Pentaho Analysis View using the Schema Workbench to

create the ROLAP model:

1. Configure your Pentaho BI Server data source using the Pentaho Admin Console

2. Create your Pentaho Analysis Schema Model using Schema Workbench

3. Publish your Pentaho Analysis Schema Model to the Pentaho BI Server

4. Use the Pentaho User Console to Create a New Analyzer Report (Enterprise Edition) or Analysis

View (Community)

5. Execute the Pentaho Analysis view

Creating your Pentaho Analysis Schema Using the Schema


Workbench

Follow the instructions below to create your schema:


1. Download and unzip the Schema Workbench

2. Ensure your JDBC driver is in <drive>:\workbench-<version>\drivers directory

3. Copy your JDBC driver to that folder if necessary. For example for Oracle 10g, the latest

ojdbc14.jar file (found from Oracle's Web site) to that location were copied.

Creating a Simple Schema

Follow the instructions below to create a simple schema:

1. Go to Tools > Connection to enter your JDBC parameters for your RDBMS

2. Make sure the database is running, click Test Connection, if successful click Accept

3. If an error occurs, start the database, and repeat step 2

4. Go to File > New > Schema to name the schema in name attribute value.

5. Right-click Schema > Add Cube to name the cube in name attribute value.

6. Select Right Click, Add Table, enter schema ID, if applicable, and the fact table name.

7. Make sure that Table: displays Table :< your_fact_table_here>.

8. Right-click the cube name and select Add Measure.

9. Name the measure; select an aggregator such as sum; select the column and data type.
10. Right-click the cube name and select Add Dimension.
11. Select the appropriate foreign key and dimension type such as a Standard Dimension or Time

Dimension.

12. Expand the newly created dimension and select Hierarchy.


13. Remove the name the hierarchy, the word "default" will appear

14. Right click "default", select Add Table, select the schema and the Table name
15. Right-click Hierarchy and add level.

16. At minimum, select the Name level, and the column. Sometimes it is necessary to specify

the levelType for certain date dimension data types to work correctly.
17. Repeat step 15 and 16 for different dimensional levels.
Publishing and Testing Your Analysis Schema on the Pentaho BI
Platform

Test
1. File, New, MDX Query

2.

3. Enter query in query window on top following this usage example:

MDX Usage: select [<Dimension name>].[<Hierarchy name] on columns from [<Cube name>]

MDX Example:

select NON EMPTY

Unknown macro: {[Measures].[At Bats]}

ON COLUMNS,

NON EMPTY

Unknown macro: {([Time.Season].[All Seasons], [Team.Teams].[All Teams], [Players].[All Players])}

ON ROWS

from [ADP Cube]


1. (make sure the correct Schema is selected from the drop down or the Schema window is selected

if you move the windows around)

2. You should get something similar to this back:

\\\\

Axis #0:

{}

Axis #1:

Axis #2:

Unknown macro: {[Time.Season].[All Seasons], [Team.Teams].[All Teams], [Players].[All Players]}

Row #0: 20,440,000

Note: If query fails to return data then there may be an issue. Adjust the schema design accordingly and

retest. Most common problems are the data types being used.
Publish
1. File -> Publish

2. Log in to the Pentaho Solution Repository using your user ID and publish password credentials

3. Navigate to the Pentaho Solution folder location

4. Provide the name of the Pentaho Database connection that you set up in the Pentaho Admin

Console under the Pentaho or JNDI Data Source input box, leave register XMLA Data Source

Checked

5. Click Publish

Creating the Pentaho Analysis using the Pentaho User Console


1. Log in to the Pentaho User Console using a web browser: http://localhost:8080/pentaho

2. Select File, New, Analysis View

3. Select the appropriate schema and cube that you published

4. Click OK

Your view will display in a tab to the right


Once you sort, pivot, filter, etc. the view to your desire, you can then Save the view to the Pentaho Solution

Repository using the blue floppy disk icons in the tool bar. (Your view may vary depending on the build you

have)

This view is now available to be access and manged in the Pentaho Solution Repository List

Anda mungkin juga menyukai