Before you Begin

Learn how to create logical parent-child hierarchies and presentation layer objects in your semantic model.

Background

This tutorial describes the Semantic Modeler which is currently available for preview. Ask your administrator to enable the Semantic Modeler preview feature in Console.

This is the next tutorial in the Create a Semantic Model series. Do the tutorials in the order listed:

What Do You Need?

  • Access to Oracle Analytics Cloud
  • Access to the Sample Sales Semantic Model

Add Physical Tables and Create Alias Tables

In this section, you add tables from the BISAMPLE data source to the physical layer of your semantic model, create alias tables, and define joins between the alias tables.

  1. If you closed your semantic model, sign in to Oracle Analytics Cloud with your BI Data Model Author application role or service administrator credentials. On the Home page, click the Navigator, and then click Semantic Models.
  2. In the Semantic Models page, select Sample Sales, click Actions menu, and then select Open.
  3. Click the Physical Layer Physical Layer icon. Double-click MySampleSalesDatabase. Under Tables, expand the BISAMPLE schema.
  4. In the Connections Connections pane icon pane, expand the BISAMPLE schema. Hold down the Ctrl key and select SAMP_EMPL_D_VH, SAMP_EMPL_PARENT_CHILD_MAP, and SAMP_EMPL_POSTN_D.
  5. Drag the selected tables to BISAMPLE in the Physical Layer Physical Layer icon. Drop the tables when Add Add Table icon appears. Click Save Save icon.
  6. Under Tables in the BISAMPLE schema, right-click SAMP_EMPL_D_VH and select Create Physical Table Alias.
  7. In Create Physical Table Alias, enter D50 Sales Rep in Name, and then click Add.
  8. Right-click SAMP_EMPL_PARENT_CHILD_MAP and click Create Physical Table Alias.
  9. In Create Physical Table Alias, enter D51 Sales Rep Parent Child, and then click Add.
  10. Right-click SAMP_EMPL_POSTN_D, click Create Physical Table Alias.
  11. In Create Physical Table Alias, enter D52 Sales Rep Position, and then click Add. Click Save Save icon.


    Description of sales_rep_alias_tables.png follows
    Description of the illustration sales_rep_alias_tables.png

Create Joins

In this section, you define the joins between the added table and the existing F1 Revenue table.

  1. In MySampleSalesDatabase, click Add Join Add Joins. In Add Physical Join, click List List icon in Left table, expand MySampleSalesDatabase, and select D50 Sales Rep. Under Right Table, click List List icon, expand MySampleSalesDatabase, and select D52 Sales Rep Position.
  2. In Join Conditions, click List List icon under the Left Table, and select POSTN_KEY. Click List List icon under the Right Table, select POSTN_KEY, and then click Add.
  3. Click Add Join Add Joins. In Add Physical Join, click List in Left table, expand MySampleSalesDatabase, and select D51 Sales Rep Parent Child. Under Right Table, click List List icon, expand MySampleSalesDatabase, and select D50 Sales Rep.
  4. In Join Conditions, click List List icon under the Left Table, and select ANCESTOR_KEY. Click List List icon under the Right Table, select EMPLOYEE_KEY, and then click Add.
  5. Click Add Join Add Joins. In Add Physical Join, click List List icon in Left table, expand MySampleSalesDatabase, and select F1 Revenue. Under Right Table, click List List icon, expand MySampleSalesDatabase, and select D51 Sales Rep Parent Child.
  6. In Join Conditions, click List List icon under the Left Table, and select EMPL_KEY. Click List List icon under the Right Table, select MEMBER_KEY, and then click Add. Save icon


    Description of pl_tables_joins.png follows
    Description of the illustration pl_tables_joins.png
  7. In the Physical Layer, right-click D51 Sales Rep Parent Child, select Show Physical Diagram, and then click Selected Tables and Direct Joins.


    Description of physical_diagram.png follows
    Description of the illustration physical_diagram.png

Add Logical Table

In this section you add a logical table and select columns from a physical layer table.

  1. Click Logical Layer Logical Layer icon, and double-click Sample Sales BM.
  2. In Dimensions, click Add Table Add Table icon, and then click Create New Table.
  3. In Create Logical Table, enter D5 Sales Rep in Name and click Add.


    The D5 Sales Rep Columns tab opens in the Semantic Modeler.

  4. Click the Physical Layer Physical Layer icon, expand MySampleSalesDatabase, and then expand BISAMPLE.
  5. Expand D50 Sales Rep, hold down the Ctrl key, select all the columns in D50 Sales Rep, and drag them to the D5 Sales Rep columns tab. Click Save Save icon.


    Description of d5_sales_rep_columns.png follows
    Description of the illustration d5_sales_rep_columns.png
  6. Click the General tab, click Primary Key, and then select EMPLOYEE_KEY. Click Save Save icon.

Add Source Tables and Columns

In this section, you update the logical layer table's sources.

  1. In D5 Sales Rep, click the Sources tab. Double-click D50 Sales Rep. Click Save Save icon.
  2. Click Detail View Detail View icon. In Table Mapping, click Add Table Add Table icon.
  3. In Select Physical Table, expand BISAMPLE, click D52 Sales Rep Position, and then click Select. Click Save.
  4. Click the Sources tab. In Table Mapping, click Add Table Add Table icon, and add D51 Sales Rep Parent Child. Click Save.
  5. Click the Columns tab. Hold down the Ctrl key, select MEMBER_KEY, ANCESTOR_KEY, IS_LEAF, and then click Delete Delete icon. Click Save Save icon.

Rename Columns

In this section, you rename columns to use names that are easy to understand.

  1. In the D5 Sales Rep Columns tab, double-click POSTN_KEY. Enter Position Key.
  2. Double-click TYPE. Enter Sales Rep Type.
  3. Double-click EMPL_NAME. Enter Sales Rep Name.
  4. Double-click EMPLOYEE_KEY. Enter Sales Rep Number.
  5. Double-click HIRE_DT. Enter Hire Date.
  6. Double-click MGR_ID. Enter Manager Number.
  7. Double-click POSTN_DESC. Enter Position.
  8. Double-click POSTN_LEVEL. Enter Position Level
  9. Double-click DISTANCE. Enter Closure Distance. Click Save Save icon.


    Description of column_rename.png follows
    Description of the illustration column_rename.png
  10. Close D5 Sales Rep.

Create a Logical Join

In this section, you create joins between the sales rep alias tables and the F1 Revenue table.

In this section, you define the join between D5 Sales Rep and the F1 Revenue tables.

  1. Click the Logical Layer Logical Layer icon. Expand Sample Sales BM, right-click D5 Sales Rep, select Show Logical Diagram, and then click Selected Table and Direct Joins.
  2. Drag F1 Revenue to the Logical Diagram. Select F1 Revenue and draw the join to D5 Sales Rep.
  3. In the Add Join dialog, click Add. Click Save Save icon.


    Description of logical_join_d5_sales.png follows
    Description of the illustration logical_join_d5_sales.png

Create a Parent-Child Hierarchy

In this section, you create a parent-child hierarchy, set the member key, and set the parent key.

  1. In the Logical Layer Logical Layer icon, double-click D5 Sales Rep.
  2. In D5 Sales Rep, click the Hierarchy tab. From Hierarchy Type, select Parent-Child.
  3. Under Parent-Child, click Detail.
  4. In Detail, select Sales Rep Number from Member Key, select Sales Rep Name from Display Key, and then select Manager Number from Parent Key.


    Description of pc_hier_detail.png follows
    Description of the illustration pc_hier_detail.png
  5. Click Select to define the parent-child relationship table.
  6. In Select Physical Table, click D51 Sales Rep Parent Child and click Select.
  7. Under the Relationship Table, select MEMBER_KEY from Member Key, select ANCESTOR_KEY from Parent Key, select DISTANCE from Relationship Distance, and then select IS_LEAF from Leaf Node Identifier. Click Save Save icon.


    Description of relationship_table.png follows
    Description of the illustration relationship_table.png

Specify Content Level of Detail

In this section, you specify the level of content detail in the parent child hierarchy.

  1. In D5 Sales Rep, click the Columns tab. Double-click Sales Rep Name. Under Level, select Detail.
  2. Double-click Sales Rep Number. Under Level, select Detail. Click Save Save icon.
  3. Click the Hierarchy tab. In Level Name, enter Sales Rep Total to replace Total.
  4. Click the Detail level. In Level Name, enter Sales Rep Detail to replace Detail. Click Save Save icon.
  5. Click the Columns tab. Double-click Sales Rep Name. Under Level, select Sales Rep Detail. Double-click Sales Rep Number. Under Level, select Sales Rep Detail. Click Save Save icon.


    Description of sales_rep_level_detail.png follows
    Description of the illustration sales_rep_level_detail.png

Create Presentation Layer Objects

In this section, you create the Sales Rep presentation table and presentation hierarchies.

  1. Click the Presentation Layer Presentation Layer icon. Double-click the Sample Sales subject area.
  2. In the Tables tab, click Add Tables Add Table icon, and then click Add Table.
  3. In Select Logical Table, click D5 Sales Rep and click Select.
  4. Double-click D5 Sales Rep in the Tables tab.
  5. In D5 Sales Rep, click the General tab. In Name, enter Sales Rep to replace D5 Sales Rep, and then click Save Save icon.
  6. In Sales Rep, click the Hierarchies tab.
  7. In the Hierarchies tab, click Sales Rep Detail. Next to Display Columns, click Replace. In Select Presentation Column, click Sales Rep Name and click Select.


    Description of sales_rep_hierarchy.png follows
    Description of the illustration sales_rep_hierarchy.png
  8. Click Save Save icon.

Next Steps

Create Aggregate Tables

Learn More