Setting up and editing joins

A business cube is based on tables (including views). By default, there is no relationship between the tables. In order to make them correlated, you need to define joins between them. To do this:

  1. In the Catalog Browser resource tree, select the business cube, right-click it and select Edit Business Cube from the shortcut menu.
  2. In the Business Cube Editor window, click Tools > Join Editor on the menu bar or the Join Editor button on the toolbar. The Business Cube - Join Editor window will then be displayed. See the window.
  3. Add more tables to the business cube if needed and set up the joins between the tables, then click OK to save the settings.

See also Business Cube - Join Editor window for detailed explanation about options in the window.

Note: Because a report cube is based on a query, stored procedure, SQL file, or user defined data source, which may already contain some relationship among tables, you cannot set joins for it.

Adding tables

When you open the Business Cube - Join Editor, you will see all the tables (including views) that have been added to the business cube when you create it. If you find that you require some extra tables to create joins, you can add them as follows:

  1. In the Business Cube - Join Editor window, click Table > Add Table to display the Add Table dialog.
  2. Select a schema from the Schemas box if the database supports schema. The tables that are contained in the selected schema and are not included in the business cube will then be displayed in the Tables box. Choose the required tables, and then click the Add button.
  3. Click the Done button to close the dialog. Then, all the selected tables/views will be shown in the right panel of the Join Editor window.

  4. Click the Arrange button to organize the tables.

Now, you can define joins among the selected tables as required.

Tips:

Creating joins between tables

Joins between tables in a business cube can be created in the following methods:

Creating joins manually

To create joins manually, tables must be retrieved from a database and a relationship, called a join condition, must be specified between at least one column from each table. To do this:

  1. In the Business Cube - Join Editor window, position the mouse pointer over the field that will be the source of the join.
  2. Click and hold the left mouse button while moving to the destination field.
  3. The join relationship is then established between the tables. When more than one relationship is required between two tables, you can create multiple joins between them.
Creating joins automatically

Joins can also be made automatically by selecting the corresponding item from the Auto Join command of the Table menu in the Business Cube - Join Editor window. You can choose to automatically join tables either By Name or By Primary Key.

Creating joins by inheriting data source pre-joins

If the Pre-join feature is enabled for a data source connection, when you create joins for business cubes in this data source, the joins can be inherited from pre-joins of the data source.

To make business cube joins inherit from data source pre-joins:

  1. Make sure the Prejoin property of the data source connection is set to true (see details).
  2. In the Business Cube - Join Editor window, click Table > Add Table.
  3. In the Add Table dialog, add the required tables to the business cube and click Done.

    Tables that have been defined some pre-join relationships in the data source will be automatically joined together.

When you use pre-joins for creating business cube joins, you may meet the following cases:

Notes:

Editing a join

After a join has been set up, you can edit it at any time as required. To do this:

  1. In the Business Cube - Join Editor window, right-click the join in the All Joins box and choose Edit Join (or double-click its join button in the right panel). The Join Options dialog appears. See the dialog.
  2. Check the Outer Join option to set the join an outer join, then specify the format of the join as required: SQL92 or Use'+'.
  3. Edit the join conditions in the Condition panel according to your requirements.
  4. When done, click OK to accept the changes.

See also Join Options dialog for details about options in the dialog.

Besides, if you find that some joins are unnecessary or their names are not intuitive, you can delete or rename them.