With the editor graph

Pentaho Metadata Editor

Part Number
In the editor graph, creating a new relationship is somewhat simplified because you select the two business tables on the canvas, and the Relationship Properties dialog box is pre-populated with your selections. Before you start, make sure that the model you want to add a relationship to is selected, and that the business tables are displayed in the editor graph.
  1. Select the two business tables you want to include in the new relationship, either by clicking and dragging a marquee around the tables or by holding the SHIFT CTRL keys, then clicking on the tables.
  2. Once your business tables are selected, right-click on the selection. Click Add Relationship in the popup menu.

    Editor graph menu
  3. When the Relationship Properties dialog box appears, select a business table from the From Table/Field list.
    This is the first relationship.
  4. Select a business table from the To Table/Field list.
    This steps sets up a relationship between two tables.
  5. Specify the business columns (from the adjacent lists) from each business table that identify this relationship. If the business column names are similar, click Guess Matching Fields and let Pentaho Metadata Editor attempt to determine the columns for you.
  6. Define the relationship from the Relationship drop-down list.
  7. Click OK when you are done.
    You should see a new relationship line drawn between the two tables on the editor graph, and the relationship represented in the navigation pane.

    Note: Complex joins appear in the WHERE clause of the SQL statement, so currently any joining that takes place in the FROM clause of the SQL statement is not supported. An example of a complex join might be TABLE_A.COL_A=TABLE_B.COL_A AND TABLE_A.COL_B=TABLE_B.COL_B. This represents a join of two tables based on two key columns versus a single join column. Also note, the complex join expression provided must use the names of the physical tables and physical columns, not business tables and business column names.