64
BO Lab 2 – Universe Design.doc ____________________________________________________________ ____________ BUSINESS OBJECTS – LAB SESSIONS UNIVERSE DESIGN Page 1 of 64 6/6/2022

BO Lab 2 - Universe Design

Embed Size (px)

Citation preview

Page 1: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

BUSINESS OBJECTS – LAB SESSIONSUNIVERSE DESIGN

Page 1 of 56 4/7/2023

Page 2: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

TABLE OF CONTENTS1. Purpose of the Lab.......................................................................................................32. Pre- Requisite...............................................................................................................33. Lab Sessions................................................................................................................4

3.1. Question 1.............................................................................................................43.2. Question 2...........................................................................................................143.3. Question 3...........................................................................................................233.4. Question 4...........................................................................................................283.5. Question 5...........................................................................................................343.6. Question 6...........................................................................................................383.7. Question 7...........................................................................................................413.8. Question 8...........................................................................................................463.9. Question 9...........................................................................................................51

Page 2 of 56 4/7/2023

Page 3: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

1. Purpose of the Lab

The purpose of this Lab is to give any BO beginner a good hands-on on the Universe concepts. At the end of the session, one should be able to do the following:

1. Creating a Universe using the Wizard.2. Add tables and create joins directly without using the wizard.3. Perform Integrity checks and understand what each of them is about.4. Try and create various types of joins. 5. Create a loop and resolve the same.6. Create contexts.7. Create Condition objects.8. Add hierarchy to Date dimensions.9. Export and Import a universe.

2. Pre- Requisite

To carry out this session,

1. One should be familiar with Universe concepts2. Business Objects – Designer should be installed.3. Access to any DB.4. A user ID created to logon into Designer.

Page 3 of 56 4/7/2023

Page 4: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3. Lab Sessions

3.1. Question 1

Create a universe using the Quick Wizard. Choose necessary tables create classes and Objects from them.

Solution:

1. Open Business Objects XI R3 -> Designer

Page 4 of 56 4/7/2023

Page 5: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

2. Goto Option à File à New

3. Alternatively we can choose the wizard from toolbar

Page 5 of 56 4/7/2023

Page 6: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

Page 6 of 56 4/7/2023

Page 7: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3. The wizard helps to design Universe in four quick and easy steps:

4. First step is to give Universe name and Universe connection. We can give sample name as eFashion-Test. Universe connection will either be existing connection or we can create a new connection for the same. New connection will walk through another wizard with which we can select appropriate data source for connection.

Page 7 of 56 4/7/2023

Page 8: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

It is always a good idea to ‘Test’ the connection to check if it is working properly before proceeding.

Page 8 of 56 4/7/2023

Page 9: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

5. Next step is to create initial classes and objects for the Universe. Based upon our selection list of available database tables and columns is displayed. We can make use of ‘Add’ and ‘Remove’ buttons to finalize our selection.

Page 9 of 56 4/7/2023

Page 10: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

5. Next step is to create ‘Measure’ objects for the Universe. Measure objects are the calculations based on aggregate function. We can select the column and apply any of the four functions – count, sum, minimum, maximum for the column based on our requirement.

Page 10 of 56 4/7/2023

Page 11: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

6. Last step is the summary of design we have selected in previous steps. We click on ‘Finish’ if we are through or we can go back to any of the steps in case we want to change any of our selections.

Page 11 of 56 4/7/2023

Page 12: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

Once we finish with these steps our Universe is ready for use.

Page 12 of 56 4/7/2023

Page 13: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3.2. Question 2

Add tables and create joins directly without using the wizard

Solution1. Open Business Objects Designer and import the Universe in which joins are to be added.

Page 13 of 56 4/7/2023

Page 14: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

Select the Universe to be imported

Page 14 of 56 4/7/2023

Page 15: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

2. Once the Universe is open go to Toolbar option ‘Insert’ and select ‘table’

Page 15 of 56 4/7/2023

Page 16: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

4. A list of tables is displayed. Those tables which are already present in Universe will have green check mark against them. The tables which are to be inserted will not have any check mark against them.

Page 16 of 56 4/7/2023

Page 17: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

5. Select the tables which we want to insert in Universe by selecting the table name and click on ‘Insert’. In case we try to insert a table already present in the Universe it will prompt for an alias to be created. For exercise purpose we can select promotion lookup and product_promotion_facts table.

Page 17 of 56 4/7/2023

Page 18: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

6. Select ‘Join’ option from ‘Insert’ menu.

Page 18 of 56 4/7/2023

Page 19: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

7. Edit join dialogue box will appear. Select the two new tables we added as Table1 and Table2.

Page 19 of 56 4/7/2023

Page 20: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

8. Create a join in the selected table by selecting promotion_id from each of the tables.

The join will be created like:

product_promotion_facts.Promotion_id=promotion_lookup.Promotion_id

9. Click on ‘Detect’ to set up the cardinality for the join.

Page 20 of 56 4/7/2023

Page 21: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

10. Click on ‘Parse’ join to ensure that there is no syntax error.

Page 21 of 56 4/7/2023

Page 22: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

11. Join is created successfully between the two new tables.

Page 22 of 56 4/7/2023

Page 23: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3.3. Question 3

Perform Integrity checks and understand what each of them is about.

Solution

Purpose of Check Integrity is to test to verify if the design of your active universe is accurate and up-to-date.

Check Integrity can detect the following types of errors:

Invalid syntax in the SQL definition of an object, condition, or join Loops

Isolated tables

Isolated joins

Loops within contexts

Missing or incorrect cardinalities

Note: 1) The option Check Cardinalities can be slow to run with large amounts of data. If there is ambiguous or missing data, results can also be inaccurate. If your database is large, and may have incomplete data entries, then you should not select the option Check Cardinalities.

2) Before selecting the Check for Loops check box, ensure that the cardinalities of joins have already been detected. Otherwise, the function erroneously identifies loops in the joins

Page 23 of 56 4/7/2023

Page 24: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

1. Open BO Universe Designer .Open the Universe on which the Integrity check has to be performed.

Page 24 of 56 4/7/2023

Page 25: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

2. Go to Tools -> Check Integrity

Page 25 of 56 4/7/2023

Page 26: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3. Check Integrity dialogue box will appear with below options:

4. Check All will select all the options and integrity check will be performed for all.

5. The results are displayed like

6. It is always a good practice to perform Integrity Check before exporting active Universe to repository after making any changes to the active Universe.

Page 26 of 56 4/7/2023

Page 27: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3.4. Question 4

Try and create various types of joins

Page 27 of 56 4/7/2023

Page 28: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

Solution

1. Open BO Universe Designer and Open the Universe in which joins are to be created. For test purpose we open eFashion Universe.

2. Go to Insert -> Join option

Page 28 of 56 4/7/2023

Page 29: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3. Following Dialog Box for creating joins will appear:

Page 29 of 56 4/7/2023

Page 30: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

4. Different options to be selected for creating joins are:

Page 30 of 56 4/7/2023

Page 31: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

Table 1 - Table present at the left end of the join. Columns are listed for the table selected in the drop-down list box.

Table2 - Table at the right side of the join. Columns are listed for the table selected in the drop-down list box.

Operator - You can select an operator for a join from the drop-down list box between the Table1 and Table2 boxes. The operator allows you to define the restriction that the join uses to match data between the joined columns.

Below table describes the available operators for joins:

Operator Description

= is equal to

!= is not equal to

> is greater than

< is less than

>= is greater than or equal to

<= is less than or equal to

Between is between (theta joins)

Complex complex relationship

Outer Join - When selected, determines which table contains unmatched data in an outer join relationship.

Shortcut Join : A common use of shortcut joins is to link a shared lookup table to another table further along a join path. The join path comprises several different tables in the same context. ( This can be understood better after contexts session is done.)

Page 31 of 56 4/7/2023

Page 32: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

5. Try to create each type of join as described above and check the results.(i) Create and Edit equi-joins using ‘=’ operator and check the results

(ii) Create and Edit non-equi joins using all other operators.

(iii) Identify and note down the results in each case.

6. The Edit Join dialog box also has two features available that allow you to edit and verify the join syntax:

Edit

When clicked, opens an SQL editor. You can use this graphic editor to modify the syntax for tables, columns, operators, and functions used in the join.

Parse

When clicked a parsing function is started that verifies the SQL syntax of the join expression. If the parse is successful, you receive a result is OK message. If Designer encounters an error, you receive an error message indicating the source of the problem.

Page 32 of 56 4/7/2023

Page 33: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

Sql editor

Page 33 of 56 4/7/2023

Page 34: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3.5. Question 5 Create a loop and resolve the same.

Solution:

A loop is a join path issue that arises from the way that tables are related in a relational database. Loops can produce instances where a query returns too few rows of data.A loop exists when the joins between tables form a closed path.

1. Create table structure as shown in MS database and create ODBC connection for the same.

Page 34 of 56 4/7/2023

Page 35: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

2. Create a new Universe Loop Test with using this ODBC connection as data source and create joins as shown above.

3. As we can see one set of joins links the car sale details, the client, the client’s region and the client’s country of residence and other set of joins links the car sale details, the showroom, and the country where the showroom is located.

Together these joins form a loop. Loops can produce instances where a query returns too few rows of data.

4. Resolving loops:

There are automatic methods built into Designer that can be used to identify and resolve almost all loop problems. The main methods of resolving loops are:

Aliases

Contexts

Loops can be resolved by creating aliases and contexts manually. However, depending on the complexity of a universe, this can be a cumbersome task.

The automatic detection tools in Designer help resolve loops. This functionality can only be reliable if cardinality has been defined correctly for each join in the universe.

5. Resolving a loop with Alias

Page 35 of 56 4/7/2023

Page 36: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

Detect Loop

Click on detect loop icon

The system highlights the loop in the Structure window, and displays the Loop Detection dialog box.The Loop 1/1 indicates how many loops have been detected (you can use arrow buttons to check each loop). The message beneath the buttons indicates that the loop can be resolved with an alias.

Note: the Detect Loop tool will also indicate if a loop can be solved by using a context instead.The advantage of the tool is that you can view loops before applying your chosen solution to them

Detect Alias

Click on detect Alias

Page 36 of 56 4/7/2023

Page 37: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

The Candidate Alias dialog box displays. All the tables that could be aliased to resolve a loop are listed in the left panel. The suggested alias names are shown in the right panel. You can change these, if required.

Note: If not all cardinalities are set, including as 1-1 cardinality for any self restricting join, the tool will show a warning message that not all cardinalities are set.

Insert Alias

Instead of using the Loop Detection or Alias Detection tools, you can create the alias manually.

1. Select the table for which you want an alias by clicking the table header.2. Insert an alias using one of the following methods:

Click the Insert Alias button Right-click the table and select Alias from the right-click menu.

This opens the Creating an Alias for dialog box.

Enter the new name for the alias table and click OK.      This creates an alias table for the selected table.

3.6. Question 6

Create contexts.

Page 37 of 56 4/7/2023

Page 38: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

A context is simply a list of joins that define a path for a query.

A context resolves a loop by defining a set of joins that define one specific path through tables in a loop. It ensures that it creates one separate SQL Statement for each context (path).  

1. Take the same scenario as above shown to resolve using context.

2. Click on Insert->Context

Page 38 of 56 4/7/2023

Page 39: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3. New Context Dialogue box will appear. Give the name as Country – Region context.

Select the joins displayed like

Page 39 of 56 4/7/2023

Page 40: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

4. A new context is created as given name. While generating query for the objects involved the BO application will prompt now which context should be used to generate query so as to include only those joins.

3.7. Question 7

Create Condition objects.

Page 40 of 56 4/7/2023

Page 41: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

A condition object, or predefined condition, is a preset restriction created in Designer that a user can choose whether or not to apply to a query.

When users create queries they can create their own conditions to limit the data returned by the query. They can also use the predefined condition objects that the universe designer may have built into the universe as query filters to make it easier for them to restrict the data.

1.Open the eFashion.mdb Universe. Click on condition object at bottom of classes.

3. Click the class in which you want to place the condition object.

Page 41 of 56 4/7/2023

Page 42: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

4. There are two ways you can insert a condition:-Select the Insert Condition on the Editing toolbar.-Right-click the class and choose Insert Condition from the dropdown menu.

Page 42 of 56 4/7/2023

Page 43: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

This opens the Edit Properties dialog box for condition objects.

5. In the Name field, enter a name for the condition object.

6. In the Description field, enter a help message for end users describing the condition and any effect it will have on queries they make.

Page 43 of 56 4/7/2023

Page 44: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

7. Enter the condition directly in the Where field or via the Edit Where Clause box by selecting the << button.

8. Save and export the Universe. The new condition object will be available in BusinessObjects end user querying tools

3.8. Question 8

Add heirchy to date dimension.

1. Open BO Designer and eFashion.unv

Page 44 of 56 4/7/2023

Page 45: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

2. Create a new object Time Period 2 as type ‘Date’

Page 45 of 56 4/7/2023

Page 46: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3. Go to object properties -> Automatic Time heirchy

Page 46 of 56 4/7/2023

Page 47: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

4. Select the name and dimensions that you want to display and click on OK.

Page 47 of 56 4/7/2023

Page 48: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

5. Time heirchy for the new object is displayed.

Page 48 of 56 4/7/2023

Page 49: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3.9. Question 9

Importing and exporting a Universe

Page 49 of 56 4/7/2023

Page 50: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

1. Open BO Universe Designer. Go to File -> Import option.

2. After clicking on ‘Import’ option list of available Universes in the repository is shown. Select the required Universe in this case ‘eFashion’ and click on ‘OK’.

Page 50 of 56 4/7/2023

Page 51: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

3. ‘Universe successfully imported’ dialogue box is shown. Click on ‘Ok’ and the Universe opens.

Page 51 of 56 4/7/2023

Page 52: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

4. After opening the Universe make required changes to it. Please click on ‘save’ in order to save the changes.

Page 52 of 56 4/7/2023

Page 53: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

5. Click on File -> Export when Universe is ready to be exported.

Page 53 of 56 4/7/2023

Page 54: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

6. The ‘Export Universe’ Dialog box Universe. List of Universe available for exporting is displayed. Select the required Universe in our case ‘eFashion’ to be exported and click on ‘OK’

Page 54 of 56 4/7/2023

Page 55: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

7. Universe successfully exported dialog box is displayed.

Page 55 of 56 4/7/2023

Page 56: BO Lab 2 - Universe Design

BO Lab 2 – Universe Design.doc ________________________________________________________________________

Page 56 of 56 4/7/2023