Pentaho MetaData Editor Walkthrough...

18
Last Modified on November 14, 2006 Pentaho MetaData Editor Walkthrough Guide Copyright © 2005 Pentaho Corporation. Redistribution permitted. All trademarks are the property of their respective owners. For the latest information, please visit our web site at www.pentaho.org

Transcript of Pentaho MetaData Editor Walkthrough...

Last Modified on November 14, 2006

Pentaho MetaData Editor

Walkthrough Guide

Copyright © 2005 Pentaho Corporation. Redistribution permitted. All trademarks are the property of their

respective owners.

For the latest information, please visit our web site at www.pentaho.org

ContentsIntroduction.............................................................................................................................................................................3

Installation...............................................................................................................................................................................3

Running the Medata Editor.....................................................................................................................................................3

Creating a sample Pentaho Metadata Model..........................................................................................................................3

Connect to your data...............................................................................................................................................................3

Choose the tables to be used in your Business Models..........................................................................................................4

Add Calculated Column to Physical Tables............................................................................................................................5

Localize the Business Model and Business Views..................................................................................................................7

Build Business View...............................................................................................................................................................8

Create Categories...................................................................................................................................................................11

Creating a Query using the Metadata Model...........................................................................................................................13

Publishing a Metadata Model..................................................................................................................................................17

PentahoTM Metadata Editor Walthrough

2

IntroductionPentaho Metadata Editor is a tool that maps the physical structure of your database into a logical business model. These mappings are stored in a centralized metadata repository and allow administrators to:

● create business-language definitions for complex or cryptic database tables and columns ● set security parameters limiting user's report access to data● drive formatting on text, date and numeric data improving report maintenance● localize the information depending on the user's regional settings.

InstallationTo install, unzip the contents in a folder.

Running the Medata EditorFor Windows Operating systems, run the file, metaeditor.batFor MacOSX, run the file, metaeditor.shFor Linux, run the file, metaeditor.sh

Creating a sample Pentaho Metadata ModelThe following steps walkthrough how to create a Metadata model using the Pentaho sample data included

with the Pentaho BI platform 1.2 RC1 or higher.

Connect to your data.Right click on “Connections” and select New.

PentahoTM Metadata Editor Walthrough

3

Enter your connection information and test connection.

Choose the tables to be used in your Business Models.Right click on the connection and select “Import multiple tables”

PentahoTM Metadata Editor Walthrough

4

Select Tables and Select OK.

Add Calculated Column to Physical TablesRight-click on “Order Details” table and select “Edit”.

Select the “Column details” tab.

PentahoTM Metadata Editor Walthrough

5

Select “Add New Column” button.

Enter the name of the new physical column, “PC_TOTAL”. Select OK.

Set the following, the select OK.● Aggretation Rule = “Sum”.● Formula = “SUM(QUANTITYORDERED*PRICEEACH)”● Field Type=”Fact”

PentahoTM Metadata Editor Walthrough

6

Localize the Business Model and Business ViewsSelect the “Locales” tab. On “En_US” item, right click and select “Insert after this row”.

Add “fr_FR” for French (France) and “de_DE” for German (Germany).

PentahoTM Metadata Editor Walthrough

7

Build Business ViewSelect the “Graphical view” tab. Drag and Drop “Customer” into the right pane. Do the same for

Orderdetails, Orders, and Products.

When the first table is dropped, the application will prompt to name the Business View. Change the “Name”

in Business View properties area to “Orders”.

Note: Here you can also enter the localized names too.

PentahoTM Metadata Editor Walthrough

8

Set Relationships

Set Relationship between Customers and Orders.

Set Relationship between Orders and Orderdetails.

PentahoTM Metadata Editor Walthrough

9

Set Relationship beteween Orderdetails and Products.

It will finally look like this.

PentahoTM Metadata Editor Walthrough

10

Create CategoriesSelect the Categories editor.

Select “Add All” button.

PentahoTM Metadata Editor Walthrough

11

Select Close.

Note: Categories allow any column fields from any Business Table to be grouped together and in any order.

To add a new category, select the “New” button and name your category. Then, add the specific columns

from the Business Tables into the category.

Save Model.

PentahoTM Metadata Editor Walthrough

12

Creating a Query using the Metadata ModelSelect the Query Button on the main toolbar.

Select the business view, Orders.

PentahoTM Metadata Editor Walthrough

13

Move items from the Category column into “Selected Columns”.

Add the columns to “The selected columns” and “The order by clause”. Then select “SQL”button.

This is the SQL that will be generated. Select OK.

PentahoTM Metadata Editor Walthrough

14

Select OK.

Preview Data. Select “Close”.

PentahoTM Metadata Editor Walthrough

15

To display the Metadata query, save the query to the file system.

Name the file and pick a location.

Open the file. It will display the metadata of the query.

PentahoTM Metadata Editor Walthrough

16

Publishing a Metadata ModelNote: Requires Pentaho Reporting - Web based Adhoc Query and Reporting 1.5.1 milestone release

Export the model as an XMI file (''Export to an XMI file” from the “File” menu)

Name the model's filename, metadata.xmi.

Copy the metadata.xmi file on the root of a solution in the file-based Solution Repository (e.g. pentahodemo/

pentaho-solutions/samples/metadata.xmi

PentahoTM Metadata Editor Walthrough

17

Navigate to the Admin page of the PCI. Click on 'Reporting Metadata' in the 'Refresh' section. The Pentaho

platform checks in the top-level folders of each solution for files called metadata.xmi. It does not look in any

other folder or for XMI files with any other name.

PentahoTM Metadata Editor Walthrough

18