Creating and Managing Cubes

Objective

After completing this lesson, you will be able to combine multiple cubes using joins or append operations to build integrated datasets for analysis in a Web Intelligence document.

Create a Child Cube

When you create a child of a cube, you can make transformations without affecting the original data.

To create a child cube, select a cube in the Graph panel, then choose one of the following options:

  • Select Create Child from the cube's context menu.
  • Drag and drop the cube to an empty area on the canvas.
  • Click the Create Child button in the toolbar.

The newly created child cube appears in the Graph panel and in the Main panelObjects tab. It is marked with the Child icon.

A new child cube named Transformations: Objectives appears in both the Graph panel and the Main panel after creation.

Combine Cubes

In Data mode, you can combine cubes to synchronize your data.

You can combine more than two cubes at once:

  • The first cube you select is the primary cube. It is combined with the first secondary cube.
  • Each additional secondary cube is combined in turn with the result of the previous combination.
  • After all cubes are combined, the resulting cube defines the objects and data set of the final combined cube.

Select the cubes you want to combine in the Graph panel.

In the Graph panel toolbar, select the Create Cube button.

Create a cube from the Graph panel by selecting multiple cubes to combine them.

The Create Cube dialog box opens. The first cube you selected appears as the primary cube. The second cube is used as the secondary cube for the first combination.

In the Operators drop-down menu, select the operator you want to apply. Left join is selected by default.

A drop-down menu lists join operator options including left join, right join, full join, inner join, and append cube for combining data cubes.

List of operators:

  • Left join: Returns all rows from the primary cube plus additional data in columns of the secondary cube for which a common key exists
  • Right join: Returns all rows from the secondary cube plus additional data in columns of the primary cube for which a common key exists.
  • Full join: Returns all rows from both the primary and secondary cubes, even if no common key exists. If a common key exists, then additional data in columns of the other cube is added.
  • Inner join: Returns only rows and columns from the primary and secondary cubes for which a common key exists.
  • Left join without intersection: Returns the rows from the primary cube for which no common key has been found in the secondary cube.
  • Right join without intersection: Returns the rows from the secondary cube for which no common key has been found in the primary cube.
  • Full join without intersection: Returns the rows from each cube for which no mapping has been found in the other cube.
  • Append cube: Returns the rows of the primary cube followed by the rows of the secondary cube.
Visual comparison of SQL join types with example tables and resulting outputs, including left, right, inner, full, and variations without intersection.

Select the Add Keys button to open the Edit Keys dialog box. The dialog box shows the objects from both cubes in two columns.

Note

By default, objects with the same name are associated.

Select an object in each column to map them and create a key. The mapped objects move to the Selected Keys section. Repeat this step to create as many keys as you need.

Click OK to confirm the selected keys.

Add Keys button prompts selection of matching columns to join the primary and secondary cubes using State and Store name as keys.

Click Create to finish creating the combined cube.

The new combined cube appears in the Graph panel and in the Main panelObjects tab. It is linked to its parent cubes. If it has only two parents, it is identified with the operator icon. If it has more than two parents, it is identified with the Combined Cube icon.

Sales and objectives data from multiple sources are combined into a single cube with columns for state, store name, objective, and sales revenue.

Add Combinations to a Cube

When you edit a child or combined cube, the Edit Cube dialog box opens. You can rename the cube, change its description, modify its combinations, or add a new combination. When you edit a virtual cube, you can also click the Add Cube button to add a new combination. A new line appears where you select the operator, the cube to combine, and the keys.

To add a combination to an existing virtual cube, you can also do one of the following:

  • Select a cube in the Graph panel. Then, drag and drop it onto a virtual cube while pressing the [Ctrl] key. This adds the first cube as a combination to the second one.
  • Select two cubes in the Graph panel. Click the Add Combination button in the toolbar. The second selected cube is added as a combination to the first selected cube, which must be a virtual cube.

This opens the Edit Cube dialog box for the virtual cube. A new combination with the other cube is added. You can change its operator and the default keys.

Select the cubes, then configure left joins between Sales and Managers using State and Store name fields in the Edit Cube panel.

If you have applied transformations to the virtual cube, and you add a new combination, these transformations apply after the new combination.

If this is not the behavior you want, you can create a new combined cube that uses this cube as a parent. In this case, the new cube has new objects with new identifiers. To use its new data set, you need to replace the previous objects with the new objects in the report in Design mode.

Hide Cubes and Objects

You usually combine cubes to focus on their resulting dataset. Parent cubes act as temporary cubes. You do not need to keep them in Design mode to create your document. In Data mode, you can hide cubes. Hidden cubes do not appear in Design mode.

In the Graph panel or the Main panelObjects tab, use the Hide or Show option in the context menu of a cube to hide or show it. A Hidden icon appears next to each hidden cube.

Let's Summarize What You've Learned

  • Create a child cube to perform data transformations without affecting the original data.
  • Combine multiple cubes using various join operators to synchronize and enrich datasets.
  • Add new combinations to virtual cubes and customize operators and key mappings as needed.
  • Hide cubes and objects in Data mode to simplify the workspace and focus on relevant datasets.

Use the Data Mode

Business Example

Your manager asks you to prepare the data for a new sales versus objectives analysis. Before you can build a report, you need to explore the datasets and clean up a formatting issue in the objectives data. Finally, you will combine the cleaned objectives data with the sales data into a single, unified source for the analysis