- SAP IDT Tutorial
- SAP IDT – Home
- SAP IDT – Overview & User Interface
- SAP IDT – Resources
- SAP IDT – Creating Universe
- SAP IDT – .unv Universe Introduction
- Dealing With Published Universes
- SAP IDT – Projects
- SAP IDT – Managing Connections
- Managing Resources In Repository
- SAP IDT – Data Foundation Layer
- SAP IDT – Building Data Foundation
- SAP IDT – Qualifiers & Owners
- SAP IDT – Joins In Data Foundation
- SAP IDT – Business Layer
- SAP IDT – Business Layer Properties
- SAP IDT – Folders In Business Layer
- SAP IDT – Business Layer View
- Building Query In Query Panel
- Dependency Among Resources
- SAP IDT – Publishing
- SAP IDT – Security
- Running Query Published Universe
- SAP IDT – Format Editor Overview
- SAP IDT Useful Resources
- SAP IDT - Questions Answers
- SAP IDT - Quick Guide
- SAP IDT - Useful Resources
- SAP IDT - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
SAP IDT - Joins In Data Foundation
Joins are used to combine tables in Data Foundation. It defines how data is queried in the tables. Joins are defined when you link one column of a table to other column. It is possible to insert Joins manually or to insert automatically by clicking on Detect Join option.
To insert a new Join, go to Insert → Insert Join.
Select Table 1 from the dropdown, Table 2 from the dropdown from all the tables in Data Foundation. Select columns from Table 1 and Table 2 to join. Select the type of Join you want to insert → OK.
Editing an Existing Join
To edit an existing Join, double-click on Join and it will open Edit Join editor as above.
A derived table is a virtual table in the data foundation that combines other tables using calculations and functions.
You can use derived tables for the following purposes −
To create a table with columns from other tables. The column definitions can include complex calculations and functions.
To create a single table that combines two or more tables.
To create a table that contains a selection of columns from different tables.
To Insert Derived table, select table header → right click → insert → derived table.
Enter the Unique name and click OK.
An Alias table is known as reference to a standard table in Data Foundation. The data in Alias table is completely same as the original table.
Alias tables are used to break loops in Join path in Data Foundation layer. An Alias table can also be used to rename a table.
Insert an Alias
To create an Alias table, select the table on which Alias has to be created. Right-click the table header → Insert → Alias table. To create an Alias table on more than one table, use CTRL key to select multiple tables.
Alias is used to break any loop and to handle Fan trap and Chasm trap issues.
Detect an Alias
To detect an Alias, go to Detect under Data Foundation layer.
To detect a table alias, the following condition should be met.
Contexts are also used to break the loops in Data Foundation when you are not able to break the loop using an Alias table.
When you have multiple fact tables that are connected to a single dimension table, you create a Context for each fact table in this case.
In a context, there are three states defined for a Join −
Included Joins − In a part of the schema that is ambiguous, the context solves the loop by defining a path with the included joins.
Excluded Joins − In a part of the schema that is ambiguous, the excluded joins define the path that context will never take.
Neutral Joins − They are in a part of the schema that is not ambiguous, and are always included in the query path of the context. Any join that is not explicitly included or excluded is neutral.
A Context can be defined manually or by clicking detect Context option.
To detect Context → Open the data foundation editor by double-clicking the data foundation name in the Local Projects View.
From the Aliases and Contexts pane, select the Detect Contexts icon.
The command analyzes the join paths and proposes contexts to resolve any loops that cannot be resolved by alias tables.
Next, open Detect Contexts dialog box, select the contexts you want to insert.
To see the context highlighted in the data foundation view, click the proposed context name. A join that is included in the context is shown by an included icon
A join that is excluded is shown by the excluded icon . Click OK to insert the selected contexts into the data foundation.