BusinessObjects XI 3.0/3.

1: Advanced Universe Design

Learner’s Guide BOU320

Copyright
©

2009 SAP® BusinessObjects™. All rights reserved. SAP BusinessObjects owns the following United States patents, which may cover products that are offered and licensed by SAP BusinessObjects and/or affliated companies: 5,295,243; 5,339,390; 5,555,403; 5,590,250; 5,619,632; 5,632,009; 5,857,205; 5,880,742; 5,883,635; 6,085,202; 6,108,698; 6,247,008; 6,289,352; 6,300,957; 6,377,259; 6,490,593; 6,578,027; 6,581,068; 6,628,312; 6,654,761; 6,768,986; 6,772,409; 6,831,668; 6,882,998; 6,892,189; 6,901,555; 7,089,238; 7,107,266; 7,139,766; 7,178,099; 7,181,435; 7,181,440; 7,194,465; 7,222,130; 7,299,419; 7,320,122 and 7,356,779. SAP BusinessObjects and its logos, BusinessObjects, Crystal Reports®, Rapid Mart™, Data Insight™, Desktop Intelligence™, Rapid Marts®, Watchlist Security™, Web Intelligence®, and Xcelsius® are trademarks or registered trademarks of Business Objects, an SAP company and/or affiliated companies in the United States and/or other countries. SAP® is a registered trademark of SAP AG in Germany and/or other countries. All other names mentioned herein may be trademarks of their respective owners.

C O N T E N T S
About this Course
Course introduction.....................................................................................................xi Course description......................................................................................................xii Course audience..........................................................................................................xii Prerequisites.................................................................................................................xii Level, delivery, and duration....................................................................................xii Applicable certifications and designations..............................................................xii Course success factors...............................................................................................xiii Course setup...............................................................................................................xiii Course materials.........................................................................................................xiii Learning process.........................................................................................................xiii

Lesson 1

Reviewing Universe Design Concepts
Lesson introduction.......................................................................................................1 Using your BusinessObjects Universe Designer knowledge..................................2 Review: Using universe design concepts............................................................2 Activity: Implementing a universe......................................................................3 Reviewing the course database and universe............................................................6 The course database...............................................................................................6 An overview of the Motors universe...................................................................6 Activity: To deploy the Motors universe (Optional).........................................7 Lesson summary............................................................................................................9

Lesson 2

Working with Aggregate Awareness
Lesson introduction.....................................................................................................11 Defining aggregate awareness...................................................................................12 What is aggregate awareness?............................................................................12 Summary tables....................................................................................................12 Summary tables and SQL ...................................................................................13 Applying aggregate awareness.................................................................................15 Setting up aggregate awareness.........................................................................15 Redefine the objects .............................................................................................16 Applying aggregate awareness to objects........................................................16 Define incompatible objects................................................................................17

Table of Contents—Learner’s Guide

iii

Activity: Setting up aggregate awareness - part 1...........................................20 Activity: Setting up aggregate awareness - part 2...........................................22 Using aggregate awareness to resolve fan traps..............................................23 Outer joins and aggregate awareness...............................................................25 Quiz: Working with aggregate awareness...............................................................28 Lesson summary..........................................................................................................29

Lesson 3

Designing Advanced Objects
Lesson introduction.....................................................................................................31 Combining database functions in objects.................................................................32 Using database functions in objects...................................................................32 Activity: Combining database functions in objects ........................................36 Working with analytic functions.......................................................................38 What are analytic functions?..............................................................................38 Constructing relative date-time objects....................................................................41 Date functions in objects.....................................................................................41 Relative date-time objects ..................................................................................43 CASE statements in measure objects ................................................................44 Activity: Constructing relative date-time objects ...........................................46 Moving averages..................................................................................................50 Activity: Creating a moving average.................................................................53 Quiz: Designing advanced objects............................................................................57 Lesson summary..........................................................................................................58

Lesson 4

Creating Complex Predefined Conditions, LOVs, and Joins
Lesson introduction.....................................................................................................59 Creating complex predefined conditions.................................................................60 Subqueries in predefined conditions.................................................................60 Activity: Creating subqueries in predefined conditions................................62 @Prompt scenarios in predefined conditions...................................................64 Activity: Using @prompt in predefined conditions........................................66 Working with advanced LOVs..................................................................................68 Customizing LOVs...............................................................................................68 Activity: Modifying LOVs..................................................................................69 Arranging LOV data as an A-Z index...............................................................71 Activity: Arranging LOVs...................................................................................73 Working with advanced join syntaxes......................................................................74 Defining @prompt functions in a join...............................................................74 Defining conditional join paths..........................................................................75 Using joins to construct relative date-time objects..........................................76

iv

Advanced Universe Design—Learner’s Guide

...........103 Universes and universe connections.............120 The Connection Server...........................................................................................88 Working with Central Management Server (CMS) universe security..............................................................................................................124 Table of Contents—Learner’s Guide v ...................................................................................................................................................................................................................................................................................................................92 About restriction sets...............................................................................85 Lesson 5 Securing Universes Lesson introduction..............................................................108 Using test folders.....78 Activity: Using complex joins.......117 Lesson 7 Maintaining and Optimizing Universes Lesson introduction..........................122 Custom connection parameters............................90 Working with table mapping in restriction sets...........96 Quiz: Securing universes.............88 About security and universes ................................................................................................................................................................................................................................................................................90 Organizing universes in secured folder structures ...................................114 Quiz: Implementing universe life cycle management.......................................................................120 Setting up a trace file...........................................116 Lesson summary........................................................................................................................Conditional joins and running calculations...............................................100 Lesson 6 Implementing Universe Life Cycle Management Lesson introduction........................................................................................93 Activity: Working with table mapping in a restriction set....87 Defining connection and user credential parameters.........................99 Lesson summary........................................................101 Moving content from development to production...................................................................................................................................................112 Life cycle management recommendations...............................................................................80 Quiz: Creating complex predefined conditions and LOVs.121 Connection configuration parameters.................................................113 Activity: Moving content from development to production...................................................................................................................107 Working with Business Intelligence Archive Resource (BIAR) files ...........102 Using the Import Wizard.......................................84 Lesson summary...................................................88 User credentials for the connection ......102 Life cycle management.............................................................................................................119 Optimizing universes..................92 Working with table mapping..........................................................................................................................

...............................157 JavaBeans and universes................144 Best practices for designing and optimizing your universe....................................155 Creating a universe based on stored procedures..........................136 Applying index awareness .......135 Activity: Using dynamic SQL parameters..................................158 Activity: Creating stored procedure universes .............................147 Lesson summary.....................165 Activity: Creating an OLAP universe...................................................................................................................140 Multiple foreign key entries.............................................................................................................................................................141 SQL Editor dialog box .............................................................................................................................130 Applying the FILTER_IN_FROM functionality to individual classes and objects........139 Avoiding joins in tables..............................143 Applying best practices for universe design.............................................................................................169 Lesson summary..........................................127 ANSI92 and FILTER_IN_FROM ...................................................Dynamic SQL parameters................................................................................162 Understanding the OLAP cube..............................................................................................155 Stored procedure parameters in the universe..............................................................................150 Working with the Metadata Exchange panel.....................................................168 Quiz: Creating universes from other data sources..................................................................128 About ANSI92 SQL syntax .............................................................162 Generating universes from OLAP cube sources..............................127 BEGIN_SQL.........131 The JOIN_BY_SQL parameter......160 Working with OLAP universes.................................................................................................................................127 END_SQL.............................................155 Stored procedure universes............................................................................................................................143 Using an index awareness WHERE clause.....................................................................129 The ANSI92 dynamic SQL parameter...164 Modifying and updating an OLAP universe..............................144 Quiz: Maintaining and optimizing universes..............................................................................................................................................156 Advantages and disadvantages of stored procedure universes................................................................................................................................................................................................150 Which data sources are supported in the Metadata Exchange panel?..............................................................................................................150 Creating stored procedure and JavaBeans universes............................................148 Lesson 8 Creating Universes from Other Data Sources Lesson introduction...............................................................170 vi Advanced Universe Design—Learner’s Guide ................................................................................................................................................139 What is index awareness? ........126 Adapting dynamic SQL parameters............................................149 Creating a universe from an XML data source.............................................................................................

....................181 Appendix C External Strategies Using external strategies in Universe Designer................................................194 DB2.187 Appendix D SQL syntaxes for other RDBMS Alternative SQL syntaxes for other RDBMS....................................190 MySQL..............208 Quiz: Creating complex predefined conditions and LOVs.................................................................................................................................................................................................209 Quiz: Securing universes...185 Types of strategies...............................................................213 Table of Contents—Learner’s Guide vii ...........................................................................................................................................................................................................................................................................................................................................................................................................................................................171 Appendix B Data Access Files BusinessObjects data access files..197 Answer Key Review: Using universe design concepts......................210 Quiz: Implementing universe life cycle management...Appendix A End of Course Challenge Activity: Completing the end of course challenge..........................207 Quiz: Designing advanced objects.....................................................................................................................212 Quiz: Creating universes from other data sources...............................................................................189 ORACLE....................................................................................175 The PRM file................................................211 Quiz: Maintaining and optimizing universes.............................................................203 Quiz: Working with aggregate awareness.................

viii Advanced Universe Design—Learner’s Guide .

..............................................................................................45 minutes ❒ Defining connection and user credential parameters ❒ Working with Central Management Server (CMS) universe security Lesson 6 Implementing Universe Life Cycle Management..........................................2 hours ❒ Defining aggregate awareness ❒ Applying aggregate awareness Lesson 3 Designing Advanced Objects..30 minutes Lesson 1 Reviewing Universe Design Concepts...45 minutes ❒ Moving content from development to production Agenda—Learner’s Guide ix .........................................................................2................. Course Overview................. LOVs...1 hour ❒ Using your BusinessObjects Universe Designer knowledge Lesson 2 Working with Aggregate Awareness................................25 hours ❒ Combining database functions in objects ❒ Constructing relative date-time objects Lesson 4 Creating Complex Predefined Conditions.........................................2 hours ❒ Creating complex predefined conditions ❒ Working with advanced LOVs ❒ Working with advanced join syntaxes Lesson 5 Securing Universes............ and Joins..A G E N D A Advanced Universe Design Introductions......................

Lesson 7

Maintaining and Optimizing Universes.....................................2 hours
❒ Optimizing universes ❒ Applying best practices for universe design Lesson 8

Creating Universes from Other Data Sources..................1.75 hours
❒ Creating a universe from an XML data source ❒ Creating stored procedure and JavaBeans universes ❒ Working with OLAP universes

x

Advanced Universe Design—Learner’s Guide

About this Course
Course introduction
This section explains the conventions used in the course and in this training guide.

About this Course—Learner’s Guide

xi

Course description
This two-day instructor-led advanced course is designed to give you the comprehensive skills and in-depth knowledge needed to design universes in BusinessObjects™ Universe Designer. The business benefit of this course is that you will learn best-practice methodology for creating universes that respond to your reporting requirements. Through well-designed universes, report designers and business users will be able to create reports without having to know anything about the underlying data source or structure.

Course audience
The target audience for this course is anyone responsible for creating and designing universes using Universe Designer, using BusinessObjects XI 3.0/3.1. The learners who attend the course will be most successful if they have experience in working with Business Objects Universe Designer. New features covered in the XI 3.0/3.1 course that are not applicable to BusinessObjects XI R1/R2 learners include: • Creating universes from stored procedures and JavaBeans • Creating, modifying, and updating universes from OLAP data sources using the enhanced OLAP functionality in Universe Designer

Prerequisites
To be successful, learners who attend this course should have attended the following offerings: • BusinessObjects XI R2: Universe Design, and/or BusinessObjects XI 3.0/3.1: Universe Design • BusinessObjects™ Web Intelligence XI R2: Report Design, and/or BusinessObjects™ Web Intelligence XI 3.0/3.1: Report Design To be successful, you must be familiar with: • • • • The metadata and logical structure of the databases in your organization BusinessObjects Web Intelligence report building Using BusinessObjects Universe Designer Using and working with SQL and relational database management systems concepts and structures • The BusinessObjects Central Management Console

Level, delivery, and duration
This advanced instructor-led offering is a two-day course.

Applicable certifications and designations
This course is not applicable to any Business Objects Certified Professional programs.

xii

Advanced Universe Design—Learner’s Guide

Course success factors
Your learning experience will be enhanced by: • • • • Activities that build on the life experiences of the learner Discussion that connects the training to real working environments Learners and instructor working as a team Active participation by all learners

Course setup
Refer to the setup guide for details on hardware, software, and course-specific requirements.

Course materials
The materials included with the course materials are: • Name card • Learner’s Guide The Learner’s Guide contains an agenda, learner materials, and practice activities. The Learner’s Guide is designed to assist students who attend the classroom-based course and outlines what learners can expect to achieve by participating in this course. • Evaluation form At the conclusion of this course, you will receive an electronic feedback form as part of our evaluation process. Provide feedback on the course content, instructor, and facility. Your comments will assist us to improve future courses. Additional resources include: • Sample files The sample files can include required files for the course activities and/or supplemental content to the training guide. • Online Help Retrieve information and find answers to questions using the online Help and/or user’s guide that are included with the product.

Learning process
Learning is an interactive process between the learners and the instructor. By facilitating a cooperative environment, the instructor guides the learners through the learning framework.

Introduction
Why am I here? What’s in it for me? The learners will be clear about what they are getting out of each lesson.

About this Course—Learner’s Guide

xiii

Practice How do I do it? The learners will demonstrate their knowledge as well as their hands-on skills through the activities.Objectives How do I achieve the outcome? The learners will assimilate new concepts and how to apply the ideas presented in the lesson. This step sets the groundwork for practice. Summary Where have I been and where am I going? The summary acts as a recap of the learning objectives and as a transition to the next section. Review How did I do? The learners will have an opportunity to review what they have learned during the lesson. xiv Advanced Universe Design—Learner’s Guide . Review reinforces why it is important to learn particular concepts or skills.

0/3. and structure Reviewing Universe Design Concepts—Learner’s Guide 1 . After completing this lesson. you will be able to: • Use your universe design and BusinessObjects Universe Designer knowledge to solve business problems • Describe the course universe. database data. and review key concepts from the BusinessObjects XI 3.1: Universe Design course.Lesson 1 Reviewing Universe Design Concepts Lesson introduction During this lesson you review your existing universe design and BusinessObjects Universe Designer knowledge.

What are the different types of SQL traps that can be found in a schema? How can each of these types be identified? How can each type be resolved in the universe schema? 8. Provide a short description of each type.What is a hierarchy? 13. What is a universe? 2. 5.Describe what index awareness is. 10. What are the types of objects that can be created in a universe? Provide a brief description of each type. Does a universe store data? 3. 14. Describe how you would test a measure to make sure the aggregation levels are projected correctly. you will be able to: • Use current BusinessObjects Universe Designer skills to solve reporting business problems Review: Using universe design concepts Objective • Review your knowledge of Universe Designer Instructions 1.Explain two drawbacks of using restrictions at the object level. What are the main advantages of a universe? 4. What are the different join types allowed in the universe structure. 12. 7.What are the pros and cons of delegated functionality in a universe-based reporting structure? 2 Advanced Universe Design—Learner’s Guide . 11. and how it is used in a universe schema.Using your BusinessObjects Universe Designer knowledge The interactive review in this lesson asks you to use your BusinessObjects Universe Designer knowledge and features you should be proficient in to complete this course. 15. After completing this unit. What are loops and how can they be resolved? 9. Describe the connection types and their purposes.Describe the use of the @select function. 6.Describe what a derived table is and how it is generally used in a universe schema.

type ClubOLEDB_xx. quarter. which is the target database for the connection. Use the SQL Server database server credentials. In the Connection Name field. week. • Database design specifics The database has six years of data: 2004 . and guests from the US. and then click New below the Connection field. Create a new blank universe called TravelClub _xx. analysis. and planning phases. 1. where "xx" stands for your initials. In the User name and Password fields enter the database login credentials.Activity: Implementing a universe Objective • Implement a universe using Universe Designer Instructions The project team is asked to design a universe solution for the Island Resorts Company. ○ Customer information for reporting is hierarchical. where "xx" stands for your initials. and should include the customer's age group. The Island Resorts Company requires an ad-hoc reporting system for their resort locations. i. where "xx" stands for your initials. Royal Caribbean. ○ Some personal details of customers are also required for reporting. • Objects and filters ○ Condition objects are required for the three years of guests. and also for revenue. ○ Measures are for future guests.2009 for reservations. ○ Dates are to be reported on as year. the three years for reservations. Select Secured from the Connection Type drop-down list. French Riviera. Bahamas Beach. and are now preparing for the implementation stage. Select Use specified username and password as the authentication mode. There are five holiday destinations. the location. h. current guests. 2007 . e. Click Next. c. Hawaiian Club. d. Create a new OLE DB connection called ClubOLEDB_xx. • Standards Customers and clients are referred to as guests. and Australian Reef. Select File ➤ Parameters ➤ Definition. as provided to you by the instructor. Expand the Microsoft node. guests under the age of 30. 3. and invoice or reservation date. Reviewing Universe Design Concepts—Learner’s Guide 3 . month. The project team made the following findings during the preparation. b. f.2006 for current bookings. 2. Select the OLE DB Providers driver name and click Next. Start a Universe Designer session and log on using the credentials provided by the instructor. g. Expand the MS SQL Server 2005 node. which is the target middleware for the connection. a.

l. customers. indicating that the connection is correct. Select the create a new document based on a data source icon. In the Wizard Connection dialog box. Click Next twice. and resorts. Click Finish to exit the wizard. In the Server field. the name of the database you are connecting to. enter Club. check that you entered all the parameters correctly. and click Next. m. If the connection is valid. Check for chasm traps. n. Go to Start ➤ Programs ➤ BusinessObjects XI 3. a message dialog box appears.j. and click Finish. If you receive an error message. as provided to you by the instructor. Select Browse for more data sources. d. and resolve them accordingly. 4. select or enter the appropriate SQL Server name to connect to. k. reservations. In the Database field. except for those in the measures class. b. 8. Most objects are dimensions. f. Log on using the credentials provided by the instructor. c. Launch Web Intelligence Rich Client. Select Universe. Insert the tables outlined in the diagram: 5. and click OK. fan traps. The use of details is for personal information on the client only. 4 Advanced Universe Design—Learner’s Guide . 6. click Test to test the connection. 7. Save your universe locally. Select your TravelClub universe. sales.0/3.1 ➤ BusinessObjects Enterprise ➤ Web Intelligence Rich Client. Create classes to hold objects for measures. and loops. e. Test your universe by building queries in Web Intelligence Rich Client. a.

A requirement exists to identify Americans who are under the age of 30 separately from other guests. Run appropriate reports in Web Intelligence Rich Client to: • Identify number of guests who have stayed by time period as well as by country of origin. Reviewing Universe Design Concepts—Learner’s Guide 5 . Click Run Query to view the final results displayed in the report. Drag and drop the objects into the Result Objects pane. • Identify number of guests by each location. The services could be accommodation.g. amenities. • Identify the different services available at each location. or activities. • Report on the number of guests by age group for the time period 2007 to 2009. • Report on the number of guests by age group for the time period 2004 to 2006. listing the services. Build a new query using the objects you have created. • Identify whether customers are from the US or whether they are under the age of 30. h. • Determine the revenue generated by time period. 9.

Assumptions • There has been no inflation over the different years for which data is held. two in the US and one in the UK. • Users in all countries use the same currency (the US dollar). and is further extended during this advanced course. is further extended during this advanced course.1: Universe Design course. • There is no stock data. • There are summary tables for quarterly and annual revenue and numbers to speed up queries.0/3. available in a range of colors. who all manufacture a number of different models. An overview of the Motors universe The Motors universe was created during the BusinessObjects XI 3.Reviewing the course database and universe In order to create a BusinessObjects universe. Each year begins on April 6 and ends on April 5 in the subsequent year. that report on a database for a fictional car sales and rentals organization called Prestige Motors. you must first be familiar with the data and structure of the database to which the universe is connected. All manufacturers are able to supply on demand. • Customers usually rent or buy from the showroom in their own country but this is not always the case. 6 Advanced Universe Design—Learner’s Guide . • Customers may either rent or buy cars. • The data is stored in a SQL Server 2005 database. The database has the following characteristics: • There are three showrooms. and the final version of the Motors universe from the core course. • Information about employees who work within the organization is also available in the database. The universe used for this course has been created in the BusinessObjects XI 3. After completing this unit.1: Universe Design course. • The database contains data for two financial years 2003/2004 and 2004/2005. • Connections to the database are to be made using OLE DB.0/3. • Each showroom has the franchise for a number of different car makers.1: Universe Design course. • No new models have been brought out during the period. Motors and Staff. you will be able to: • Understand the database and universe used during this course The course database Two universes have been created during the BusinessObjects XI 3.0/3.

the MotorsOLEDB connection was created to connect to the Motors SQL Server 2005 database. To merge the staff and motors data into one universe schema.0/3. Primary key indexes were applied and some derived tables were introduced into the universe structure.1: Universe Design course. Dimension and measure objects were created for sales and rental reporting needs. The rental data was brought in based on a sale alias table. Condition objects and restrictions sets were defined to restrict data returned in reports. Hierarchies were established to allow end user to drill in reports. @functions were used to reuse existing objects. the Motors and Staff universes were linked. The dynamic link was broken to embed the Staff data into the Motors universe structure. Adding the rental data created loops in the schema that were resolved using contexts and aliases. A Staff universe was developed to comply with reporting needs to report on employee and manager data. and further extended to rental data later on in the course. The Motors universe file was initially populated only with sales data. To cross reference objects.In the BusinessObjects XI 3. and to add security to the universe. Activity: To deploy the Motors universe (Optional) Objective • Deploy the Motors universe Reviewing Universe Design Concepts—Learner’s Guide 7 . and avoid creating the same object requirements in the universe.

1: Universe Design course. h. the final version of the BusinessObjects XI 3. check that you entered all the parameters correctly. In Universe Designer. where "xx" stands for your initials. In the Connection Name field. In the Database field. If the connection is valid. where "xx" stands for your initials. i. enter Motors. If this course is taught separate from the core Universe Design course. n. Select the OLE DB Providers driver name and click Next. Select Use specified username and password as the authentication mode. Select File ➤ Parameters ➤ Definition. Use the SQL Server database server credentials. m. 1. In the User name and Password fields enter the database login credentials. Select File ➤ Save As to save your Motors universe version locally. Create a new OLE DB connection called MotorsOLEDB_xx. f. k. open the Motors universe file provided in the Activity_Resources ➤ Motors_start folder in the course resources. In the Wizard Connection dialog box. c. Expand the Microsoft node. l. d. click Test to test the connection. Select Secured from the Connection Type drop-down list. j. Rename the universe to Motors_xx. In the Server field. a. a message dialog box appears indicating that the connection is correct. Click Next. as provided to you by the instructor. select or enter the appropriate SQL Server name to connect to. as provided to you by the instructor. e. type MotorsOLEDB_xx. 2. Click Next twice. Click Finish to exit the wizard.0/3. and click Finish.0/3.1: Universe Design course. Expand the MS SQL Server 2005 node. 3. which is the target middleware for the connection. which is the name of the database you are connecting to.1: Universe Design course needs to be deployed using the steps outlined in this activity. If you receive an error message. 4.0/3. where "xx" stands for your initials.Instructions The Motors universe is built throughout the BusinessObjects XI 3. 8 Advanced Universe Design—Learner’s Guide . b. which is the target database for the connection. and then click New below the Connection field. This course builds on the final universe file from the BusinessObjects XI 3. g.

Lesson summary After completing this lesson. and structure Reviewing Universe Design Concepts—Learner’s Guide 9 . database data. you are now able to: • Use your universe design and BusinessObjects Universe Designer knowledge to solve business problems • Describe the course universe.

10 Advanced Universe Design—Learner’s Guide .

the query runs against the base tables. After completing this lesson. This ability of an object to use aggregate tables to optimize a query is called aggregate awareness.Lesson 2 Working with Aggregate Awareness Lesson introduction This lesson describes how you can use features in Universe Designer to define an object’s SELECT statement so that you can run a query against aggregate tables in the database instead of against the base tables. If this is not the case. You can set conditions so that a query runs against aggregate tables if doing so optimizes the query. you will be able to: • Define aggregate awareness • Apply aggregate awareness to objects Working with Aggregate Awareness—Learner’s Guide 11 .

Where possible. an object called Profit can be aggregated by month. For example. improving the performance of SQL transactions. Annual_Sale_Number. by quarter. 12 Advanced Universe Design—Learner’s Guide . Summary tables Each row in a summary table is made up of columns containing: • Aggregated data: Numeric event data aggregated to a higher level. you can use a function called @aggregate_aware in the SELECT statement for an object. Annual_Rent_Value. Using aggregate tables speeds up the execution of queries. Annual_Sale_Cost. If the data in the aggregate table is not calculated at the level of granularity required to run the query. A universe that has one or more objects with alternative definitions based on aggregate tables is said to be aggregate aware. These tables are created by the Database Administrator (DBA) and contain figures such as revenue aggregated to a high level (year. or by year. the object directs the query to run against the tables containing the non-aggregated data.Defining aggregate awareness Aggregate awareness is a term that describes the ability of a universe to make use of aggregate tables in a database. you will be able to: • Understand what is meant by the term aggregate aware • Understand why universes that are aggregate aware allow queries to process more efficiently What is aggregate awareness? Some databases contain summary tables. In Universe Designer. After completing this unit. it is best to choose the latter method as the statement processes quicker. for example) rather than to the fact/event level. This function directs a query to run against aggregate tables whenever possible. These definitions correspond to levels of aggregation. columns containing aggregated data are Annual_Sale_Value. The summary tables are usually populated and updated regularly by an automated program that runs SQL against the fact or event data at transaction level. They must be refreshed at the same time as all fact tables. so that both methods are referenced. The reliability and usefulness of aggregate awareness in a universe depends on the accuracy of the aggregate tables. They must be refreshed at the same time as all fact tables. The reliability and usefulness of aggregate awareness in a universe depends on the accuracy of the aggregate tables. and Annual_Rent_Number. In the example table image. This means that there are two methods that you can use to return aggregated data: • Run a SELECT statement for the fact or event data. • Run a SELECT statement for the summary data. • Dimension data: Attributes defining the level of the aggregated data.

columns containing aggregated and dimension data are incorporated into objects using the @function called @aggregate_aware. there is only one column containing dimension data: FP_Year.In this example. • Aggregates of a normalized database are based on event/fact level data: Working with Aggregate Awareness—Learner’s Guide 13 . If these exist. Summary tables and SQL Where possible. not just numbers and measures. It can also be applied to all object types with all data types. it is prudent to use summary table data because the processing required to return the aggregated data is far quicker. not just fact tables. You can see in the example diagram that making a query based on event data at a transaction level requires a more complex SELECT statement and the processing of more database rows than one based on summary data. • Foreign keys (optional): Joins to other tables. Foreign keys are used to set joins in the structure of the universe. Note: Aggregate awareness works on all tables. as opposed to just those contained within the summary table itself. queries can be made using summary table aggregated data on the basis of dimension objects held in other tables of the database. Within Business Objects end-user querying tools.

joins are required. • Fewer. 14 Advanced Universe Design—Learner’s Guide .• Summary tables can be added to a database that hold data at a higher level of aggregate: Making use of summary table data speeds up response times because: • There are fewer rows to process. if any.

After completing this unit. You need to examine the foreign keys in the summary table to see where the summary table can be joined to the universe. you will be able to: • • • • Set up aggregate aware objects Use aggregate awareness to resolve fan traps Use aggregate awareness to resolve outer join errors Test aggregate awareness in the universe Setting up aggregate awareness Applying aggregate awareness to objects in a BusinessObjects universe involves a four-step procedure: Step 1: Insert one or more summary tables in the universe structure. Position the table where it is convenient for the joins you need to make. Add joins from the summary table to the existing structure. Set joins and cardinality. 4. Set cardinality for the new joins. Insert the required summary table(s) in the structure using the Table Browser.Applying aggregate awareness The first step in setting up aggregate awareness in a universe is to determine which objects are to be aggregate aware. 3. You can use either measure objects or dimension objects. Step 4: Define incompatible objects using Aggregate Navigation. Working with Aggregate Awareness—Learner’s Guide 15 . Step 2: Set the contexts. The procedure for inserting a summary table in the structure of the universe is the same as for any other table or view. To insert a summary table Step 1 of the aggregate awareness process is to insert one or more summary tables to the universe structure. Note: Part of step 1 (setting joins and cardinality) and step 2 are not required if the summary table does not contain foreign keys. Step 3: Redefine the objects using @aggregate_aware. 2. To detect contexts Step 2 of the aggregate awareness process is to detect contexts. 1.

Click Detect Contexts on the toolbar. Annual Figures. and basic aggregation calculation. <SELECT statement for second highest agg level>. If you also have summary tables for quarterly figures and monthly figures. we have the basic aggregation calculation and the precalculated annual data from the summary table. You need to resolve these using contexts. This represents step 3 in the aggregate awareness process. Redefine the objects The columns in the summary table containing aggregated and dimension data can be used to define object SELECT properties. Specify which of these methods to use when a query is run using these objects. Accept the new contexts and rename them if required. be aware of the available levels. 2. The syntax of the @aggregate_aware function @aggregate_aware(<SELECT statement for highest agg level>. In our example. the summary table columns can be used in the SELECT properties of the following objects: • Sales Revenue • Rental Revenue • Number of Cars Sold • Cost of Cars Sold • Financial Year When you have added the summary table. Quarterly Figures. remember to parse the objects. confirm exactly what levels of aggregation are available. <original SELECT statement for basic agg calculation>) 16 Advanced Universe Design—Learner’s Guide . <SELECT statement for second lowest agg level>. You do this by modifying the SELECT properties for the affected objects using the @aggregate_aware function. 1.After you add the summary table. Monthly Figures. In our example. .. for example. Applying aggregate awareness to objects Before editing any objects. • The original SELECT statement in the existing object. When you apply the @aggregate_aware function. Note: After redefining.Column_Name from the summary table. several new loops may exist. you would have four possible levels altogether. and be clear about the descending order of aggregation. each of these objects has two possible sources for returning data: • A SELECT statement consisting of Table_Name.

The @aggregate_aware function is directing the query engine to use the sum of the measure value taken from the summary table where possible and. Double-click the @aggregate_aware function in the @functions list dialog box. FINANCE_PERIOD.SALE_QTY*MODEL. 8. if necessary. the final step in the process is to define object compatibility with each table in the universe structure. and the entire expression is enclosed in brackets.FP_YEAR. Separate each action with a comma. Insert the aggregate actions within the brackets of the @aggregate_aware function in order of highest to lowest level of aggregation data. Define incompatible objects When all objects requiring @aggregate_aware are correctly set. 3. sum(SALE_MODEL. The current SELECT properties for the object. Double-click the object whose properties you want to edit. 4. 6. or are not compatible with the summary tables. for dimension objects in the summary tables. 5. and then from the normal source. Click >> of the Select field to open the Edit Select dialog box.FP_YEAR) When you have redefined all the objects.Each aggregation level SELECT statement is separated by a comma. where not possible. The final SELECT statement must be valid for all queries. 2. Click OK to accept the SELECT statement. Click OK to close the Edit Properties dialog box. displays in the top panel of the dialog box. if any. The last segment in the @aggregate_aware function is always the original SELECT that does not use the summary tables. For example: @aggregate_aware(sum(ANNUAL_FIGURES. 7. or click Insert Object on the toolbar to create a new object. by defining which dimension and measure objects are. Parse the redefined objects. To apply the @aggregate_aware function 1. Working with Aggregate Awareness—Learner’s Guide 17 . 9. the @aggregate_aware function simply selects the column from the summary tables first (in descending order of aggregation). the next step is to set when Web Intelligence or Web Intelligence Rich Client can use the summary tables. to use the next segment in the SELECT statement. Click at the beginning of the existing statement.MODEL_COST)) Similarly. Note: It can make the structure of the SELECT statement clearer if you keep each level of the @aggregate_aware function on a separate line. For example: @aggregate_aware(ANNUAL_FIGURES. Repeat the process for all the appropriate objects.ANNUAL_SALE_COST).

Identify all objects that reference the summary table(s) and associated tables included in the new context(s). 2. It is therefore recommended that you check each of the incompatible settings manually using the Aggregate Navigation tool. While the Detect Incompatibility tool checks for incompatible objects. The automatic detection tool detects incompatibilities on every table in the universe. because Universe Designer detection tools cannot look inside the parenthesis of an @function. 4. The Aggregate Navigation automatic detection tool To set incompatibilities. Right-click each table and choose View Associated Objects. Identify any object that references a table not in the summary table context as incompatible.All objects that infer columns from tables in the same context as the summary table can automatically be deemed compatible with the summary table. any query that contains objects from the summary table and from other tables produces a Cartesian product. Do the same for condition objects. However. Note: Any objects that have an @function in their SELECT or WHERE are not picked up by the View Associated Objects option. You must use your knowledge of the universe or refer to universe documentation to identify if any of these objects need to be made incompatible/compatible. a summary table that does not contain any foreign keys cannot be joined to other tables and cannot be part of a context. Therefore. Check the SQL for each associated object. The Detect Incompatibility tool sets objects to be incompatible throughout the whole table structure. there are some objects that are incompatible with objects in other tables. and therefore may stop some legitimate queries from working. This could result in queries that would normally return valid results returning instead an Incompatible combination of objects error message or returning a Cartesian product. Select Tools ➤ Aggregate Navigation. 18 Advanced Universe Design—Learner’s Guide . You set incompatible objects using the Aggregate Navigation tool. all objects based on columns from any other table are deemed incompatible. and check the tables selected in the List of Tables by clicking the Tables button. Check the SELECT. It is better to leave an object incompatible if you are not sure. you can use an automatic detection tool available in the Aggregate Navigation dialog box. WHERE clauses. it isn’t restricted to the table that is selected. Therefore. In that case. To use the Aggregate Navigation tool 1. 3.

The Aggregate Navigation dialog box displays. Working with Aggregate Awareness—Learner’s Guide 19 . The right pane shows the list of classes and objects that need to be checked for compatibility for the summary table you selected. 6. Select the summary table in the Universe Tables pane. In the Aggregate Navigation dialog box you can set the objects and conditions identified in step 2 and 3 as incompatible or compatible. Open each class in turn and select the check box adjacent to each object that is incompatible with the summary table and its context. 5.

c. If an object is set incorrectly. They have requested that these reports be produced without any noticeable processing delay. the new joins and tables do not affect existing contexts. 1. Insert the ANNUAL_FIGURES table in the structure of the universe and insert the following joins and set cardinality. click OK to close the Aggregate Navigation dialog box. clear the object by clicking it.SHOWROOM_ID (1:N) b. 7.MAKER_ID = ANNUAL_FIGURES. Note: In this instance.RENTAL. 2. SHOWROOM. Note: The steps in the activity represent some of the steps demonstrated by the instructor in the classroom.ANNUAL_RENT_VALUE). Do not delete or overwrite the existing contexts. Activity: Setting up aggregate awareness . 8. When you are satisfied with all incompatibility settings. sum(RENTAL.part 1 Objectives • Insert summary tables into your Motors universe • Apply aggregate awareness Instructions Prestige Motors management is finding that the annual and quarterly reports take a long time to run. In Universe Designer. not checked) operate correctly and not produce Cartesian products or an incompatible combination of objects. Detect contexts. Redefine the SELECT properties of the objects as indicated below: • Rental Revenue @aggregate_aware(sum(ANNUAL_FIGURES.Use your familiarity with the universe to check that objects shown as compatible (that is.SALE_QTY * MODEL. Incorporate the ANNUAL_FIGURES summary table in your Motors universe and apply aggregate awareness as follows: a.SHOWROOM_ID = ANNUAL_FIGURES.DAYS_RENTED * RENTAL_MODEL.SHOWROOM_ID (1:N) MAKER. open your Motors universe file.MODEL_DAYRENT *((100 . Insert the ANNUAL_FIGURES and QUARTER_FIGURES summary tables into your Motors universe and make the universe aggregate aware.SALE_DISCOUNT) / 100))) 20 Advanced Universe Design—Learner’s Guide .

• Sales Revenue
@aggregate_aware(sum(ANNUAL_FIGURES.ANNUAL_SALE_VALUE), sum(SALE_MODEL.SALE_QTY * MODEL.MODEL_PRICE * ((100 - SALE.SALE_DISCOUNT) / 100)))

• Number of Cars Sold
@aggregate_aware(sum(ANNUAL_FIGURES.ANNUAL_SALE_NUMBER), sum(SALE_MODEL.SALE_QTY))

• Cost of Car Sales
@aggregate_aware(sum(ANNUAL_FIGURES.ANNUAL_SALE_COST), sum(SALE_MODEL.SALE_QTY * MODEL.MODEL_COST))

• Financial Year
@aggregate_aware(ANNUAL_FIGURES.FP_YEAR,FINANCE_PERIOD.FP_YEAR)

d. Set incompatible objects manually by using Aggregate Navigation and check the results. Note: Define the Franchises object as incompatible. 3. Save the changes and test the annual level of aggregate awareness by making these queries in Web Intelligence Rich Client. Use the following objects in your query: • Showroom, Financial Year, Sales Revenue, and Rental Revenue. • Model, Financial Year, Sales Revenue, and Rental Revenue. • Financial Year, Sales Revenue, and Financial Month. Ensure you view the inferred SQL in each instance. 4. Incorporate the QUARTER_FIGURES summary table in the Motors universe and apply aggregate awareness. Tip: You need to edit the @aggregate_aware syntax in the objects listed in step 2 to include the quarter level. In addition you need to apply the @aggregate_aware function to the Financial Quarter object. 5. Set incompatible objects manually by using Aggregate Navigation and check the results. Note: Define the Franchises object as incompatible. 6. Save the changes and test the quarter level of aggregate awareness by making three more queries in Web Intelligence Rich Client. Use the following objects in your query: • Financial Year and Rental Revenue. • Financial Year, Financial Quarter, and Rental Revenue. • Financial Year, Financial Month, and Rental Revenue. 7. Test that the objects that are incompatible with both the ANNUAL_FIGURES and QUARTER_FIGURES summary tables infer SQL at the fact table level.

Working with Aggregate Awareness—Learner’s Guide

21

Activity: Setting up aggregate awareness - part 2
Objectives
• Insert standalone summary tables into the Motors universe • Apply aggregate awareness

Instructions
The DBA has created some aggregate tables in SQL Server Management Studio in the form of Views. The Views are to demonstrate the concept of Data Warehouse aggregate tables. Apply an aggregate awareness solution in your Motors universe, using the Views provided. These tables are incorporated into the schema as standalone tables. 1. In Universe Designer, open your Motors universe. 2. Incorporate the three summary tables (Views) in your Motors universe as standalone tables. View table values to verify that data is returned.

3. In the Sales Details class, add a new object called Order Count. Use the select statement:
count(SALE.SALE_ID)

4. Implement aggregate awareness to the objects in the Sales Dates class. Open the Sales Year Object. Modify the SELECT statement, applying the @aggregate_aware function:
@aggregate_aware(YEAR_ORDERCOUNT.Year, YEAR_QUARTER_ORDERCOUNT.Year, YEAR_QUARTER_MONTH_ORDERCOUNT.Year, {fn year( SALE.SALE_DATE )})

5. Parse the Sales Year object to verify the modified SQL syntax.

22

Advanced Universe Design—Learner’s Guide

6. Apply aggregate awareness to the Sales Quarter and Sales Month objects. The SQL used reflects similar syntax as applied in the Sales Year object. Parse the modified objects to verify that there are no errors in the SQL syntax. 7. Implement aggregate awareness to the Order Count object created in the Sales Details class. Parse the modified object syntax to ensure that there are no errors. 8. Set incompatibilities. 9. From the Tools menu launch the Query Panel. Run a query with Sales Year and Order Count. 10.Click the SQL icon. What is the result? Is this as expected, and why? 11.Edit the query and add the Sales Quarter object. Check the generated SQL. What is the result? Is this as expected, and why? 12.Edit the query and add the Sales Month object. Check the generated SQL. What is the result? Is this as expected, and why? 13.Run a new query in the Universe Designer Query Panel, using the Sale Date and Order Count objects. Check the generated SQL. What is the result? Is this as expected, and why?

Using aggregate awareness to resolve fan traps
The aggregate awareness functionality within BusinessObjects universe design can be viewed simply as a method for specifying preferential coding based on the other objects contained within a query. When viewed from this perspective, it becomes apparent that aggregate awareness can be used to resolve issues other than those for which it was originally intended. For instance, there is a particular fan trap scenario that, while it can be resolved using the classic fan trap solution, results in certain inefficiencies.

The fan trap scenario
Unlike the classic fan trap, the structure shown here involves two tables instead of three:

Working with Aggregate Awareness—Learner’s Guide

23

The standard fan trap resolution
Using the standard method for resolving a fan trap, you would: • Create an alias of table A. • Create a join from the alias An to table A and set cardinalities. • Set contexts B and An. • Edit object Y so that it refers to columns in the alias An rather than table A.

The efficiency problem
This standard fan trap solution resolves the fan trap solution if objects Y and Z are used in the same query. However, if a query involves only objects X and Y, then no fan trap exists, and yet table 1 is still processed twice (once as the alias An). You can overcome this inefficiency by applying aggregate awareness to the problem. The solution makes use of aggregate awareness functionality despite the fact that it does not involve a summary or aggregate table.

24

Advanced Universe Design—Learner’s Guide

Outer joins and aggregate awareness A universe is a way to empower the users to create ad hoc queries to answer their business questions. as with any universe element. Working with Aggregate Awareness—Learner’s Guide 25 . Create an alias of table A. To test the universe. 4. Set contexts An and B. Make the Z object incompatible with table A. To resolve a two-table fan trap using @aggregate_aware 1. 3. 6.After you have modified the universe by making one or more objects aggregate aware. Use both compatible objects and incompatible objects in different queries to make sure all levels of aggregate awareness are operating correctly. Apply the @aggregate_aware function to the Y object (the first choice referring to table A and then the alias An). The problem with this is you do not know what questions the user has. so the universe needs to be set up to take into account almost limitless possibilities. 2. 5. In this scenario. Set cardinality. you must always test the results by building queries. Create a join between the alias An and table A. build a query that uses the aggregated measures from table A. we have four tables joined with two equi joins and one outer join.

26 Advanced Universe Design—Learner’s Guide . Effectively. Do not use outer joins in your universe. The Region table has an equi-join to the original Client table. In SQL Server the correct results are returned. an ambiguous join error is produced at query level. however in Oracle no null values are retrieved. MS Access for example. even if there are no clients. This would not be practical if the users require blank rows to be returned. but depending on the RDBMS. the user asks the query to generate SQL joining an equi-join (from Sale) to a potentially blank row (no Client for an existing Region). The outer join is now at the end of the path. they get back a list of Regions and Clients. the Client table is aliased. and the outer join is placed between the Region and the Client alias table. Create an alias of the table where the outer join is required. 2. and use aggregate aware in the relevant object(s) to identify which route to take when the user creates the query. The problem arises if the Sale table is included in the query. Note: Depending on the RDBMS. The SQL may look correct. this appears to be perfectly in order.Initially. The outer join specifies that the query returns all regions. and in some databases. the BusinessObjects querying tool may generate an error or produce incorrect results. If this issue occurs with the RDBMS used. if the user creates a query using the Region and Client tables. the outer join placement may be different. In this example. then there are two ways of solving this: 1.

Working with Aggregate Awareness—Learner’s Guide 27 .This is only half of the solution. the final step is to tell Universe Designer when to use which table .CLIENT_NAME) Having told the object that it has two tables to get the same information from. However. Using the Aggregate Navigation tool.CLIENT.CLIENT_NAME. whenever a query is created using the Sale Type or Sale Total objects. Universe Designer knows it has a choice of tables to get the information from . @aggregate_aware(CLIENT2. then the Client2 table (and the outer join) is used. if these objects are not included.Client or Client2. the Client name object in the query. the object needs to be changed. so that when the user creates the query and places. the Client2 table needs to be made incompatible with any objects from the Sale table.the Client or the Client2 alias. By setting this. for example. Universe Designer cannot use the Client2 table (and therefore the outer join).

Quiz: Working with aggregate awareness 1. How does the @aggregate_aware function improve query performance? 2. The tool you use in Universe Designer to set incompatibilities between objects and tables in the structure of the universe is called the ___________________ tool. 28 Advanced Universe Design—Learner’s Guide . Why does using summary table data speed up response times? 3.

you are now able to: • Define aggregate awareness • Apply aggregate awareness to objects Working with Aggregate Awareness—Learner’s Guide 29 .Lesson summary After completing this lesson.

30 Advanced Universe Design—Learner’s Guide .

This lesson also looks at how database functions can be combined to create complex objects. or MySQL. Note: The database functions mentioned and used in this lesson are for SQL Server. DB2. After completing this lesson. how you can create relative date-time objects and how you can utilize analytic SQL functions.Lesson 3 Designing Advanced Objects Lesson introduction You can create advanced objects that aid users in answering more specific questions in their reports. known as Transact_SQL functions in SQL Server. Refer to the SQL syntaxes for other RDBMS appendix for the equivalent functions and syntaxes in Oracle. you will be able to: • Combine database functions in objects • Construct relative date-time objects Designing Advanced Objects—Learner’s Guide 31 .

The list of default functions made available in the PRM file for the used RDBMS is shown in Universe Designer. the <driver>. it is important to identify what type of additional object functionality is needed to allow end users to generate the data in their report.Combining database functions in objects Initially. The list of numeric functions consists of a number of aggregate functions that can be used in measure objects. 32 Advanced Universe Design—Learner’s Guide . This unit describes a number of frequently used methods for creating complex objects. date and other operators. When working in Universe Designer. Character.PRM file makes a list of database functions available in the universe. After completing this unit. these reporting needs can be added in the universe in the form of more advanced objects. universes may only contain the basic dimension and detail objects that reflect the tables and column names in the universe structure. This section looks at some of the most commonly used numeric and character functions that can be used for complex dimension and detail objects. This often results in having end users define variables and complex formulas in their reports to get the required information shown. and Date types. besides from selecting functions from the list. together with some more advanced measure objects that combine columns for aggregation of revenue or cost. you will be able to: • Use and combine database functions in objects • Create static and dynamic data ranges Using database functions in objects When connecting your universe to a specific RDBMS. provided that the underlying data source supports the SQL function used. The PRM file. As a designer. and functions. and several mathematical and statistical functions. The function list shown in the PRM file never includes a complete list of available functions for the designated RDBMS. and some conversion functions. The list of character functions consists of several functions that allow you to extract data-parts. In many cases instead of using report variables and functions. contains default SQL parameters used for query generation. When end users start building reports based on this universe. you can add SQL functions directly into the Select field of an object. it may turn out that several business questions cannot be answered using the available objects. divided into Number. a connection parameter file.

or Postal Code. CharIndex. Returns the length of a character string. Length. if for a Zoning Improvement Plan (ZIP) code. or Postal Code. Left. MySQL. from the second.1. the group of values can be either two or three characters long ("W1". The substring. left and right functions can allow extracting values of a specified length from either the start or end part of a character string.On their own each function may give limited functionality. Function Description Fn_Left (or Left) Returns a number of character values from the left-hand side of a string. Alternative SQL syntaxes for Oracle. then this can be the deciding factor of how many values to extract from the left-hand side. Charindex can establish the position of a character value in a string. Charindex can be used to establish the position of the space in this string: charindex(' '. Combining these functions can allow designers to extract string values from any part of a table column. For example. but when combining two or more functions in a SELECT statement. only the first group of values. up to the dividing space: rtrim(substring(CLIENT. or Postal Code. "W1" or "NW6".CLIENT_AREA_CODE) You can now define data up to the space from either left or right. If the position of the space is known. This can pose a problem with using the left or substring function as it is unknown how many character values need to be extracted. they allow designers to construct complex objects that may benefit the end users in their report creation.CLIENT_AREA_CODE. Fn_Right (or Right) Charindex Fn_Length Substring These functions can be used to establish a character string length by using the length function. The following syntax provides the first digits of the ZIP code. and Substring functions Note: The SQL statements in this table are for SQL Server 2005. Returns part of a character string. "SL6". or "NW6").CLIENT_AREA_CODE))) Designing Advanced Objects—Learner’s Guide 33 . Returns the position of an expression in a character string. For example. Right. However.CLIENT. representing the local Area Code are required.charindex(' '. and DB2 are available in the SQL syntaxes for other RDBMS appendix. Returns a number of character values from the right-hand side of a string. The substring starts at a specified character position and has a specified length. The common delimiter is the space or hyphen that separates the first part of the ZIP code. CLIENT.

and for certain measure calculations. In the Client table there is a value for Client_Age. 20-29.987) returns a value of 6. This can be useful for object formatting. For example.Note: The rtrim function is used to remove the space (on the right) from the substring. and CAST functions These functions can be used to round down or round up to a last digit or integer of a number value. You can use the CAST function to convert and combine the two strings. For example. 10-19. in their reports. and so forth. Function Description Ceiling Returns the smallest integer greater than or equal to n. Floor Round CAST Rounding up and rounding down of values can be useful to make sure that number formats do not have unnecessary decimal places. 34 Advanced Universe Design—Learner’s Guide . Ceiling(2. Ceiling. The formula becomes: CAST((floor(CLIENT.CLIENT_AGE/10)*10) as varchar)+'-'+ CAST((((floor(CLIENT. 30-39. These functions can also be used in creating data range objects. and the end user likes to be able to run a query showing the customer age and the age range the customer falls into. Returns the largest integer less than or equal to n. Floor(6. It returns the decimal value rounded up to the next integer value. Returns a number rounded to n decimal places. It returns the decimal value rounded down to the next integer value. For example. Converts data from one data type to another. Round. The CAST function is a conversion function that can be used to convert number values to strings.3) returns a value of 3.CLIENT_AGE/10)+1)*10)-1) as varchar) This allows end users to run an age range object with a range increment of 10. Floor.

or Boolean_expression evaluates to TRUE. If this argument is omitted and no comparison operation evaluates to TRUE. For example: CASE CLIENT.CLIENT_LASTNAME WHEN 'Brent' THEN 1 ELSE 0 Designing Advanced Objects—Learner’s Guide 35 .CLIENT_LASTNAME WHEN 'Brent' THEN 1 ELSE else_result_expression The else_result_expression is the expression returned if no comparison operation evaluate to TRUE.CLIENT_LASTNAME WHEN 'Brent' THEN result_expression The result_expression is the expression returned when the input_expression equals when_expression evaluates TRUE. For example: CASE CLIENT. The else_result_expression is any valid expression. however the data types of the else_result_expression and any result_expression must be the same or must be an implicit conversion.1: Universe Design course. For example: CASE CLIENT.CLIENT_LASTNAME WHEN when_expression The when_expression is a simple expression to which the input_expression is compared. This is a powerful SQL syntax function that can aid in complex conditional syntaxes.0/3. CASE input expression For example: CASE CLIENT. In the BusinessObjects XI 3. CASE returns NULL. The data types of input_expression and each when_expression must be the same.CASE WHEN THEN ELSE END The CASE statement allows designers to locate a value and replace it by something else. the CASE statement was used to allow creating sales revenue by year if the year is a certain value. Function element Description The input_expression is any valid expression. The result_expression is any valid expression.

It is only a value assignment. create an Age Range object based on the CLIENT.CLIENT_LASTNAME WHEN 'Cooley' THEN 1 ELSE 0 END) END The CASE statement can be used in objects. Using the floor and CAST functions. Activity: Combining database functions in objects Objectives • Create a data range object • Extract data from a string Instructions: Create a data range object The end user would like to be able to run a query showing the customer age and the age range the customer falls into. Create a new age range object. conditions.CLIENT_AGE column. 20-29. 1. 30-39. 2. joins and derived tables allowing for great flexibility in universe design. This means that it allows you to combine as many CASE statements (nested within each other) as you want.CLIENT_LASTNAME WHEN 'Brent' THEN 1 ELSE 0 (CASE CLIENT. 10-19. 36 Advanced Universe Design—Learner’s Guide . and so forth. For example: CASE CLIENT. On the other hand you need to add extra conditions to ensure the restriction actually works and no empty rows are created. using a range band of 10.Function element Description The END component ends the CASE statement syntax. An example syntax for the CASE statement is: Note: The CASE statement is not a condition in itself. Add a new Client Age object in the Client class.CLIENT_LASTNAME WHEN 'Brent' THEN 1 ELSE 0 END END Any additional CASE statements can be placed before the END syntax to evaluate a further list of conditions. An END syntax for each additional CASE statement is required. For example. For example: CASE CLIENT.

9. In Universe Designer create a copy of the Age Range object. Save the change to your universe. In this instance. 7.. Note: Ensure that the brackets are in the right location to get the correct calculation order. left. Test the new object in Web Intelligence Rich Client. As the universe has Aggregate Awareness assigned. year order count. Edit the Dynamic Age Range SELECT syntax. the range object needs to show the lower range value of 40.. 15. 20.'N'. 8..))) as varchar) +' . and the upper range value of 49..For example.'N'.. Instructions: Extract data from a string This activity can be completed using a combination of functions like: CASE. Rename the object Dynamic Age Range. it is good practice to set any new objects to be either compatible or incompatible with these tables. 6.)))-1) as varchar) Note: Remember that it is useful to add a help text for this type of object to let the end user know what type of value they are expected to fill into the prompt..'N'.CLIENT_AGE/(@prompt('Enter Range Increment' .. substring.)))+1)*((@prompt('Enter Range Increment'. and year quarter month order count tables. Save the change to your universe. 1. or charindex.'N'. If there is no area code value ensure the entire Phone NO is displayed. Replace the value 10 by the following @prompt function syntax: (@prompt('Enter Range Increment'. length.'N'. 10. Designing Advanced Objects—Learner’s Guide 37 . when the CLIENT. right.CLIENT_AGE value is 44. Test the results in Web Intelligence Rich Client. For example.. Age Range is a new object in the client class.. it is good practice to set any new objects to be either compatible or incompatible with the summary tables used in your schema. Click Apply and OK to save the object changes. and so forth. Ensure that the client class is incompatible with the annual figures.'+CAST((((floor(CLIENT.)) The formula used in the object now becomes: CAST((floor(CLIENT.)))*(@prompt('Enter Range Increment'. 4. 5.. Click Apply and OK to save the object changes. in this case it can be noted that the end user can enter into the prompt values like 5. year quarter order count. 2. As the universe has Aggregate Awareness assigned. quarter figures. create a new Phone Area Code object that extracts the area code value from the Phone NO. Using any combination of the functions mentioned above in combination with the CASE statement. 3.CLIENT_AGE/(@prompt('Enter Range Increment'.

Function element Description analytic_clause Use OVER analytic_clause to indicate that the function operates on a query result set. What are analytic functions? An analytic function is a function that performs an analytical task on a result set that can be divided into ordered groups of rows or partitions. and are known as Transact_SQL functions in SQL Server. WHERE. End users can use analytic functions to perform data analysis that is not normally possible within the reporting capabilities of the BusinessObjects reporting tools. They differ from aggregate functions in that they return multiple rows for each group.Working with analytic functions Universe Designer supports the use of analytic functions for specific RDBMS. For each row. Analytic functions are called RISQL functions in RedBrick. a sliding window of rows is defined. You can specify analytic functions with this clause in the select list or ORDER BY clause. 38 Advanced Universe Design—Learner’s Guide . The window determines the range of rows used to perform the calculations for the current row. Note: You cannot specify any analytic function in any part of the analytic_clause. The group of rows is called a window and is defined by the analytic_clause. GROUP BY. OLAP functions in Teradata. That is. You can use Universe Designer to define analytic functions for objects in a universe. you cannot nest analytic functions. Window sizes can be based on either a physical number of rows or a logical interval such as time. Analytic functions compute an aggregate value based on a group of rows. That is. it is computed after the FROM. and HAVING clauses.

and ratios within one or more partitions. cumulative aggregates. Depending on your RDBMS. you can also define the range of rows on which you want to apply the analysis within the partition. An example ROW_NUMBER SQL Statement is as follows: SELECT ROW_NUMBER() OVER (PARTITION BY 1 ORDER BY CLIENT_ID) AS SURROGATE. * FROM CLIENT Designing Advanced Objects—Learner’s Guide 39 . order_by_clause Analytic functions are the last set of operations performed in a query except for the final ORDER BY clause. the ROW_NUMBER value changes. This may differ with other RDBMS that support these type of functions. Note: Aggregate analytic (Transact_SQL) functions for SQL Server do not allow the use of the ORDER BY. non-analytic functions. function expressions. In Universe Designer you can define objects with analytic functions to calculate rankings. columns. If you omit this clause. This is only a number used in the context of the result set.Function element Description query_partition_clause Use the PARTITION BY clause to partition the query result set into groups based on one or more value_expr. The window function is applied to each partition separately and computation restarts for each partition. Note: If you choose the ROW_NUMBER function to run against a non-unique column. GROUP BY. • PARTITION BY: Divides the result set into partitions. Therefore. All joins and all WHERE. and HAVING clauses are completed before the analytic functions are processed. you can order the values in a partition on multiple keys. analytic functions can appear only in the select list or ORDER BY clause. • ORDER BY: Specifies the sort order used on columns returned in a SELECT statement. if the result changes. ROW_NUMBER The most basic ranking function is ROW_NUMBER. ROW_NUMBER returns a column as an expression that contains the row’s number within the result set. Note: For a full description of analytic functions refer to your RDBMS documentation. each defined by a value_expr and each qualified by an ordering sequence. Valid values of value_expr are constants. it breaks the tie and still produces a running count so no rows have the same number. The ROW_NUMBER expression is used with the following additional clauses: • OVER: Determines the partitioning and ordering of the rowset before the associated window function is applied. Use the order_by_clause to specify how data is ordered within a partition. then the function treats all rows of the query result set as a single group.

However. you do not get a unique value for ties. Min. MIN.DENSE_RANK. The PRM file is a system file and a backup of the file needs to be made prior to making changes. Sum. For most RDBMS this has been set as standard. 40 Advanced Universe Design—Learner’s Guide . and this list is different for each RDBMS. and Average.SUM. you can use the OVER and PARTITION BY elements in combination with aggregate functions like Count.0/3.AVG.ROW_NUMBER</Parameter> <Parameter Name="OVER_CLAUSE">Y</Parameter> The RISQL functions parameter lists the supported by the database. Consult the BusinessObjects XI 3. to ensure correct use of the aggregate analytic functions. Depending on the database used. but this is not the case for SQL Server. For aggregate analytic functions. and Over Clause parameter need to be enabled in the PRM file. Max. the RISQL functions parameter.1: Designer's Guide for more information on analytic functions and the PRM file. the following two parameters need to be added to the PRM file configuration section: <Parameter Name="RISQL_FUNCTIONS">RANK.RANK RANK works a lot like ROW_NUMBER and uses the same expression clauses as described in the ROW_NUMBER section.NTILE. The Over Clause parameter allows BusinessObjects products to include aggregate analytic functions (for example. The main difference is that the RANK function does not break ties. The RANK function assigns the same key if the value is the same.MAX. SUM() OVER (PARTITION BY))when generating SQL. Aggregate analytic functions In addition to the ranking options. Note: Analytic functions can be added directly to the Select field if the RDBMS allows their use.COUNT. in the PRM file you may also need to apply parameter rules for the GROUP BY clause.

you need to take the current date and calculate some other date. you will be able to: • Create relative date-time objects based on a prompted period • Create current date-time objects • Create YTD objects Date functions in objects Every now and then. and may differ for other Relational Database Management Systems (RDBMS): • fn_year: This function returns the year values of a date object. For example: {fn month(FINANCE_PERIOD. Designing Advanced Objects—Learner’s Guide 41 . and 2005 in numeric format. Note: If there is no date value in the database Fp_Start column for a particular month. After completing this unit.FP_START)} This returns the values 1-52 in numeric format. this month value is not included in the LOV. For example: {fn week(FINANCE_PERIOD. • fn_week: This function returns the week values of a date object. Every universe has a need for relative time objects that end users can use to make calculations based on current dates or based on a prompted dynamic period. For example: Datepart(qq.Constructing relative date-time objects Discuss the unit objectives. ): This function returns the quarter values of a date object. FINANCE _PERIOD. or need to know the last day of the month. this week value is not included in the LOV.FP_START) This example returns the values 1-4 in numeric format. There are a number of functions listed in the Number list that can apply to these needs. For example: {fn year(FINANCE_PERIOD.FP_START)} This example returns the values 1-12 in numeric format. This unit looks at how you can create different types of relative date-time objects.FP_START)} This example returns the values 2003. For example. Note: If there is no date value in the database Fp_Start column for a particular week. • fn_month: This function returns the month values of a date object. 2004. The examples listed below are for SQL Server. • datepart(qq. end users might need to determine what date is the first day of the month.

days.getdate()).datediff(wk.0.0) By using this simple dateadd and datediff calculation you can come up with many different dates that might be valuable. such as hours.datediff(qq. The datediff function calculates the amount of time between two dates.000". This is why you can specify the first date-time expression of the datediff function as "0. can aid retrieving first and last day of the month or year information.Note: The datepart function can also be used to extract year. for example: • First Day of Month: dateadd(mm. Note: If database functions are typed in directly. do ensure that the object parses and run test queries to ensure the object does not cause any errors. the time portion of the calculated date becomes "00:00:00.datediff(yy.-3.0)) 42 Advanced Universe Design—Learner’s Guide .dateadd(mm. Here are some examples that add an additional dateadd function to calculate the last day dates for both the current and prior intervals. You can also use the dateadd and datediff functions to calculate a number of different dates you might need to use in your applications. month. And for a current date value the function getdate can be used. • Last Day of Prior Month dateadd(ms. In addition. where the interval of time is the same as those used by the datediff function.0) Note: This example assumes Sunday is the first day of the week.getdate()).0.getdate()) section of the syntax above calculates the number of months between the current date and the date "1900-01-01 00:00:00.0." • Monday of the Current Week: dateadd(wk." The dateadd function adds the number of months between the current date and '1900-01-01". where the time part is based on an interval of time.0. Combining these two functions and getdate.datediff(mm. months.000". and day numeric values.getdate()). week. weeks.0) • First Day of the Quarter Dateadd(qq. The dateadd function calculates a date by taking an interval of time. • First Day of the Year dateadd(yy.getdate()).000. In SQL Server date and time variables are stored as the number of milliseconds since "1900-01-01 00:00:00.0. a SQL Server function that returns the current date and time. or years. By adding the number of months between our predetermined date '1900-01-01' and the current date it is possible to arrive at the first day of the current month.0. 0) The datediff(mm.getdate()).datediff(mm. and adding it to a date.

0)) • First Monday of the Month dateadd(wk.dateadd(yy.datediff(wk.12. Number Next Year dateadd(mm.getdate()).-3. Relative date-time objects In many instances universes are designed that only directly reflect the contents and structure of the underlying database. Designing Advanced Objects—Learner’s Guide 43 . and by adding. instead of having each individual user apply them you can extend the universe with additional complex objects and predefined conditions.getdate()) Returns the current year. it turns out that many questions cannot be answered using the simple objects that are available.0) Using the sixth day of the month instead of the current date in the formula allows this calculation to return the first Monday of the current month.getdate()) Returns the current month.dateadd(dd.getdate()).0. Number datepart(mm.datediff(yy. When building a report based on this universe.getdate()) Returns today's date a year ahead. current month. current year.6-datepart(day. Examples of these questions are: • What is the sales revenue from January 1st up to today? • How does this quarter's sales revenue compare to the same quarter last year? Web Intelligence Rich Client enables a user to answer these questions by using advanced formulas and calculations. If these report-based formulas are required by many users. Date datepart(yyyy.• Last Day of Prior Year dateadd(ms. or subtracting numbers you can create previous and future date syntaxes.0. Date Adding date objects based on database date functions to the universe gives end users more flexibility in their reporting requirements. Each database has a number of date functions that give you the base syntaxes for a current date. For example in SQL Server you can use the following SQL syntaxes: Date Object SELECT syntax Description Type Current Date Current Year Current Month getdate() Returns the current date and time. getdate())).

'N'. If your universe already contains a financial year and a financial month object.mono. The @select function is an internal function that allows you.'N'.free) THEN 1 ELSE 0 END 44 Advanced Universe Design—Learner’s Guide ..mono. For example: CASE WHEN (datepart(yyyy. you can use the CASE statement to construct "If Then Else" logic. as the designer. to reuse universe objects without forcing you to repeat the entire SQL syntax.FP_START)}= @prompt('Select year'.. The CASE statement can be used to combine the database functions and the @prompt functionality. To accomplish this..mono.Note: Date function syntaxes can be used in predefined conditions as well as in objects.'N'.getdate())-1) = {fn_year(FINANCE_PERIOD.FP_START)}= @prompt('Select month'.mono.FP_START)} THEN 1 ELSE 0 END CASE statements can be further extended by using @functions: • @prompt • @select The @prompt function in CASE statements In addition to the date function syntaxes.'N'.free) THEN 1 ELSE 0 END The @select function in CASE statements The example CASE statement shows the use of the fn_year and fn_month functions to format a date column to a year or month.free) AND {fn_month(FINANCE_PERIOD. For example: CASE WHEN {fn_year(FINANCE_PERIOD. you may need to have specific date-time prompts that allow users to input a date of their choice. these objects can be referenced in the CASE statement using the @select functionality.free) AND @select(Financial Period\Financial Month)= @prompt('Select month'.. For our previous CASE statement example you can use @select to substitute the database column Fp_Start if this already exists as an object in the universe: CASE WHEN @select(Financial Period\Financial Year) = @prompt('Select year'. The prompt can be referenced in objects to compare a user input date with an existing date in the database. The @select function comes in very handy when building complex objects. CASE statements in measure objects Creating universe objects that compare date function syntaxes with existing database columns. extends further reporting functionality.

mono.'Financial Period\Financial Month'.free) Date Prompt Year Prompt Month Prompt @prompt('Select year'.mono.'Financial Period\Financial Year'. the asterisk ensures that both CASE statements return a 1 value: CASE @select(Financial Period\Financial Year) WHEN @select(Prompt Objects\Year Prompt) THEN 1 ELSE 0 END * CASE @select(Financial Period\Financial Month) WHEN @select(Prompt Objects\Month Prompt) THEN 1 ELSE 0 END Designing Advanced Objects—Learner’s Guide 45 . Note: You can also construct the CASE statement . Tip: When using @select. a CASE statement can be used to combine the functions and build boolean "reference" objects. When all base syntax components have been constructed.mono. Universe Designer automatically updates the SQL for all other objects that use the base column. or "flags" that can be used to build relative-time measures objects.'N'. that can be hidden to end users if needed.'N'.Re-use of prompt syntaxes can be handled in the same way.'D'. If you change a database column in the RDBMS you only need to modify the SQL of the base object. You can create base date prompt objects. separating statements using an asterisk. you can still see the full SQL statement by enabling the check box Show Object SQL in the SQL Editor. using boolean logic.'Financial Period\FP Start'. and use these as reference in other objects.free) @prompt('Select month'.free) For our previous CASE statement example you can use @select to substitute the database column and the prompt syntax if both already exist as objects in the universe: CASE WHEN @select(Financial Period\Financial Year) = @select(Prompt Objects\Year Prompt) AND @select(Financial Period\Financial Month)= @select(Prompt Objects\Month Prompt) THEN 1 ELSE 0 END The advantage of the @select function is that it allows you to specify SQL code only once. For example: Prompt Object SELECT syntax @prompt('Select date'.

It is viewed as constant. Create a new YTD Date Objects subclass in the Sales class.mono. month. Description: Prompts the user to choose a sales date from the list of values or manually type in a date value (YYYYMM). Normally an @prompt is handled in the WHERE clause and the SELECT contains the table. the CASE statement returns a 1 value.Activity: Constructing relative date-time objects Objectives • Create relative date-time reference objects • Use the reference objects as a base to build relative date-time measures Instructions Prompt objects are constructed using database date functions.SALE_DATE.column reference. as the designer. The @select function is an internal function that allows you. Setting the object to Character type does not affect the outcome of the activity. These prompted values are compared to the actual database date column (or datepart). Create the following sale date prompt objects in the YTD Date Objects subclass. After creating the boolean flags. 2. to return an input base for end users to enter a year. to reuse universe objects without forcing you to repeat the entire SQL syntax.'D'. For each 1 value of the boolean flag. The @select syntax used in this activity can be generated by selecting the objects and functions in the Edit Select menu. • Sales Date Prompt: @prompt('Select Date or Type Date (dd/mm/yyyy)'. For the purpose of feeding through the prompted value into other object SELECT clauses using the @select function. 1. the final stage is to build the relative date-time measure objects. In Universe Designer.'Sales Dates\Sale Date'. 46 Advanced Universe Design—Learner’s Guide . the relative date-time measure value is returned. or a full date value. A CASE statement can be used to compare the prompted period with the actual database column period. Note: This activity uses the @select function to reference already created objects. The table reference is set via the Tables button. as there is no date column referenced. open your Motors universe file. 3. The @prompt syntax only parses when it is set to a Character type. and build boolean "reference" objects. for example SALE. the @prompt requires to be placed in the Sales Date Prompt object SELECT clause. If the prompted period input value matches the actual database column period.free) SELECT syntax: Note: The Sales Date Prompt object contains an @prompt syntax in the SELECT clause. or "flags" that can be used to build relative date-time measures objects.

Number • Sales Month Prompt: SELECT datepart(mm. Select SALE as the reference table. • Sales Year Prompt: SELECT datepart(yyyy.Type: Tables button: Character (see Note above for details).@select(YTD Date Objects\Sales Date Prompt)) syntax: Description: Type: Subtracts the month from the entered sales date prompt value. Sales Date in Prompt flag SELECT syntax CASE WHEN @select(Sales Dates\Sales Year) = @select(YTD Date Objects\Sales Year Prompt) AND @select(Sales Dates\Sales Month) = @select(YTD Date Objects\Sales Month Prompt) Description Indicator that returns 1 if both the year and the month of the sales date are equal to the year and month in the entered Designing Advanced Objects—Learner’s Guide 47 . Note: The boolean flag objects need to be hidden. They should not be used by end users as objects on their own. In the YTD Date Objects subclass.@select(YTD Date Objects\Sales Date Prompt)) syntax: Description: Type: Subtracts the year from the entered sales date prompt value. Number 4. create the following indicator or boolean flag objects that are used to create relative date-time measure objects in the remaining activity steps. Tip: The @select statements shown in the table can be generated by selecting the objects and functions in the Edit Select menu.

Otherwise it returns 0. 5. the datepart(mm) changes this to a value of 4. Create a new YTD Measure Objects subclass in the Sales class. if the subtraction value ends up in a positive value. When the prompted period value (3) is subtracted from the month value (4) a positive value is returned and ends in 1. The sign function does the following: if the subtraction value is a minus value it returns -1.SELECT syntax THEN 1 ELSE 0 END Description prompt date. Otherwise it returns 0. 6. Sales Month in Prompt flag SELECT syntax CASE WHEN sign(@select(Sales Dates\Sales Year)+1 @select(YTD Date Objects\Sales Year Prompt)) = 0 AND sign(@select(Sales Dates\Sales Month) @select(YTD Date Objects\Sales Month Prompt)) = 0 THEN 1 ELSE 0 END Description Indicator that returns 1 if the year of the sales date equals the year in the entered prompt date minus one year. 7. Create the following relative date-time measure objects in the YTD Measure Objects subclass: 48 Advanced Universe Design—Learner’s Guide . If a sale date of 4/3/2004 is selected in the prompt. If the year selected in the prompt matches the year value in the date this returns the sale date values for those rows. The -1 part of the formula changes this value to 3 as the prompt input value. Note: The first part of the Sales Year in Prompt flag statement compares the year values. and the month of the sales date equals the month of the reference period. Hide the entire YTD Date Objects subclass. if the subtraction value ends in 0 it returns 0. and the year of the sales date is equal to the sales year prompt. Otherwise it returns 0. The second part of the statements subtracts the month value selected in the prompt(-1) from each value in the sale date rows returned. it returns 1. Sales Year in Prompt flag SELECT syntax CASE WHEN @select(Sales Dates\Sales Year) = @select(YTD Date Objects\Sales Year Prompt) AND sign(@select(Sales Dates\Sales Month) (@select(YTD Date Objects\Sales Month Prompt)-1) = 1 THEN 1 ELSE 0 END Description Indicator that returns 1 if the month of the sales date <= sales month prompt. With the CASE statement this ensures that month 4 is included in the values returned.

year order count. Ensure that the YTD Measure Objects and YTD Date Objects are incompatible with the annual figures. The Total Sales in prompted yyyy-mm period object returns only sales data for the month and year values that equal the month and year values entered in the prompt.Create a new query using Sale Date. all other rows return 0.Select a date from the LOV. All other rows return 0. 12. Save the changes and test your universe using Web Intelligence Rich Client. Save the change to your universe. and Total Sales in prompted year period objects. 9. and Total Sales in prompted yyyy-mm period. This way end users can compare the total sales revenue for all dates to the sales revenue returned for the selected yyyy-mm period. Designing Advanced Objects—Learner’s Guide 49 . The Total Sales in prompted year period object returns only sales data for the month and year values that equal the month and year values entered in the prompt.SALE_TOTAL)* @select(YTD Date Objects\Sales Year in Prompt flag)) sum((SALE. Measure Object SELECT Syntax sum(SALE.SALE_TOTAL)* @select(YTD Date Objects\Sales Month in Prompt flag)) 8. quarter figures. it is good practice to set any new objects to be either compatible or incompatible with the summary tables used in your schema. Note: There is no data for 2002.Tip: The @select statements shown in the table can be generated by selecting the objects and functions in the Edit Select menu.SALE_TOTAL) Sales Total Total Sales in prompted yyyy-mm period Total Sales in prompted year period Total Sales in prompted year period .1yr sum((SALE. 10. Sales Total. As the universe has aggregate awareness assigned. Sales Total. 13. 11. so ensure to select a date from 2004 or 2005 to see the last year values.Run a second query using the Sale Date. and year quarter month order count tables. year quarter order count.Select a date from the LOV.SALE_TOTAL)* @select(YTD Date Objects\Sales Date in Prompt flag)) sum((SALE.

pN − 9 then the formula is: This type of average is also referred to as a moving average through time.pN − 1. so ensure to select a date from 2004 or 2005 to see the last year values. a 10-day simple moving average of closing price is the mean of the previous 10 days' closing prices. Sales Total. or MAT. A moving average through time is the unweighted mean of the previous N data points..1yr objects. A moving average series can be calculated for any time series. If those prices are pN.. returns.Select a date from the LOV. thus highlighting longer-term trends or cycles. a derived table and an alias have been added to the structure. All other rows return 0. but can calculate the moving average using the time periods from the Financial Period table. In the Motors universe you do not have a day level of granularity. using month as the granularity level. In finance it is most often applied to stock prices. Note: There is no data for 2002. a moving average or rolling average is one of a family of similar techniques used to analyze time series data.1yr object returns only sales data for the month and year values that equal the month and year values entered in the prompt minus 1 year. or trading volumes. 50 Advanced Universe Design—Learner’s Guide .14.Run a new query using the Sale Date. The threshold between short-term and long-term depends on the application. and Total Sale . In the example shown. The Total Sales in prompted year period . For example. and the parameters of the moving average are set accordingly. Moving averages are used to smooth out short-term fluctuations. Moving averages In statistics. 15.

To create a moving average in a universe you require the following: • A derived table with @prompt or @variable. • A Sale_MAT context: • A Sale context: Designing Advanced Objects—Learner’s Guide 51 . Contexts are required to separate the Sale and Sale_MAT fact tables. This is done using the @prompt function in the table SQL syntax.).. dateadd(month.FP_MONTH. The Sale table alias is the source for the MAT measure data. FINANCE_PERIOD.. The derived table acts as the N time period input via the Start_N_Periods column.FP_YEAR. • An alias of the fact table.. For more information on the use of @variable consult the BusinessObjects Designer's Guide.-@prompt('how many periods?'. based on the prompted N time period value that is fed through the join between the alias and the derived table. FINANCE_PERIOD.FP_END FROM FINANCE_PERIOD Note: For some RDBMS the @prompt function needs to be substituted by @variable. For example: SELECT Distinct FINANCE_PERIOD. • A fact table.FP_START. • Contexts. FINANCE_PERIOD.FINANCE_PERIOD.'N'. otherwise you would have a potential SQL Trap in your schema.FP_END) as START_N_PERIODS. • A time period (dimension) table.

In this example the Sale Total MAT object consists of the Sale_Total column from the Sale_MAT table and the @prompt syntax used to get the number of periods: sum(SALE_MAT.. and Sales Total MAT. the Sales Total from the original Sale table. Financial Month.. the Sales Total N Period (Sale_Total from the alias table). the user is prompted for the number of periods required for the moving average. The Sales Total N Periods column shows the accumulated values based on the number of periods (in our example 2). 52 Advanced Universe Design—Learner’s Guide .) When a user runs a query with Financial Year.. and the Sales Total MAT column shows the accumulated values divided by the number of periods. The report displays the sales total values.SALE_TOTAL)/@prompt('how many periods?'.The final stage is to create the actual objects that the user can run to display the Sale Total MAT values.'N'.

'N'..-@prompt('How many periods?'. FP_END. using the following syntax: SELECT Distinct FINANCE_PERIOD.FP_END) as START_N_PERIODS. FINANCE_PERIOD. Note: The self-restricting join for the SALE. Create a new Derived Table. 2. FINANCE_PERIOD.. In your Motors universe create a SALE_MAT alias table.FP_END FROM FINANCE_PERIOD 3. Join the DT_Date_N_Periods table to the SALE_MAT table using a theta-join. using the START_N_PERIODS. and SALE_DATE columns.SALE_DATE between DT_Date_N_Periods. called DT_Date_N_Periods.).Activity: Creating a moving average Objectives • Create moving average objects • Test the moving average objects in Web Intelligence Rich Client Instructions 1.FP_END (N:1) Designing Advanced Objects—Learner’s Guide 53 .START_N_PERIODS and DT_Date_N_Periods.FINANCE_PERIOD.SALE_TYPE column needs to be manually created for the SALE_MAT alias table.FP_MONTH. dateadd(month.FP_YEAR.. FINANCE_PERIOD.FP_START. SALE_MAT.

DT_Date_N_Periods.FP_START and FINANCE. you can create a new object in the Sales MAT subclass that references the existing Sales Total object using the @select function. with all joins from the original SALES context selected. and select the SALES context. SHOWROOM..FP_YEAR = FINANCE_PERIOD.FP_YEAR 54 Advanced Universe Design—Learner’s Guide .CLIENT_ID = SALE. 4. Join the DT_Date_N_Periods table to the FINANCE_PERIOD table using a complex join. Insert the following objects: • Sales Total sum(SALE. Open List Mode. with the same SELECT syntax.SALE_TOTAL)/@prompt('How many periods?'. 3.SHOWROOM_ID = SALE.SALE_ID SALE. In the Sales class.FP_MONTH (1:1) 5.SALE_TYPE = 'S' SALE.4. already exists in the YTD Measure Objects subclass.) • Financial Year (MAT) FINANCE_PERIOD. You can make a copy of the SALES context as follows: 1.SALE_TOTAL) • Sales Total (MAT) sum(SALE_MAT.SALE_TOTAL) Note: A Sales Total object. 2. 7..SALE_ID = SALE_MODEL. and instead of creating a new object with the same syntax. Tip: This context mirrors the existing SALES context and should consist of 19 joins. Replace the removed joins with the SALE_MAT alias table joins. Right-click the SALES context in the Context zone in List Mode. joining month and year columns in both tables.'N'. Set the appropriate cardinalities. create a new Sales MAT subclass. Name the context SALES_MAT and remove all joins referring to the original SALE table: CLIENT.FP_YEAR and DT_Date_N_Periods.SALE_DATE between FINANCE.CLIENT_ID SHOWROOM. Create a SALE_MAT context.FP_MONTH = FINANCE_PERIOD.SHOWROOM_ID SALE. Select Insert Context. ) 6.. (These are the same as the joins from the SALE table.FP_END 5. Join the SALE_MAT table to the CLIENT. The New Context window appears. Ensure all newly created joins are included in the SALE_MAT context. @select(YTD Measure Objects\Sales Total) • Sales Total N Periods (MAT) sum(SALE_MAT. and SALE_MODEL tables.

The Sales Total N Periods column shows the accumulated sales total values based on the number of periods (for example Sales Total from Month 01 and Month 02). for example Showroom Country. and year quarter month order count tables. As the universe has Aggregate Awareness assigned. Create a query with all objects in the Sales MAT class. Your report should look similar to this: The report displays the Sales Total column. year order count. 10. quarter figures. or use the @select function to reference the existing Financial Month object in the Finance Period class. Save the change to your universe. to get a better overview of the results. or use the @select function to reference the existing Financial Year object in the Finance Period class. the Sales Total MAT column shows the accumulated values divided by the number of periods (for example Sales Total from Month 01 and Month 02. Ensure that the Sale MAT objects are incompatible with the annual figures. Your report should look similar to this: Designing Advanced Objects—Learner’s Guide 55 . Apply a section or break. which references the original SALE table.Note: Either use the syntax shown above. Save your changes and launch Web Intelligence Rich Client.Test the report by adding dimension objects. Test the report using different number of periods. 9. it is good practice to set any new objects to be either compatible or incompatible with the summary tables used in your schema. year quarter order count.FP_MONTH Note: Either use the syntax shown above. @select(Finance Period\Financial Month) 8. divided by 2). @select(Finance Period\Financial Year) • Financial Month (MAT) FINANCE_PERIOD.

56 Advanced Universe Design—Learner’s Guide .

2. 3. as the designer. List three different analytic(Transact-SQL) functions.Quiz: Designing advanced objects 1. Designing Advanced Objects—Learner’s Guide 57 . to reuse universe objects without forcing you to repeat the entire SQL syntax. True or False. The @select function is an internal function that allows you. True or False: You can use all database functionality over and above what is listed in the functions list in the Select and Where fields.

Lesson summary After completing this lesson. you are now able to: • Combine database functions in objects • Construct relative date-time objects 58 Advanced Universe Design—Learner’s Guide .

Note: The database functions mentioned and used in this lesson are for SQL Server.Lesson 4 Creating Complex Predefined Conditions. or MySQL. DB2. and Joins Lesson introduction This lesson looks at how you can create complex predefined conditions. Refer to the SQL syntaxes for other RDBMS appendix for the equivalent functions and syntaxes in Oracle. This lesson also looks at how LOVs can be customized to have an "ALL values" entry. you will be able to: • Create complex predefined conditions • Work with advanced LOVs • Work with advanced join syntaxes Creating Complex Predefined Conditions. LOVs. that can aid users to answer more specific questions in their reports. LOVs. and at prompts and conditional uses in joins. and Joins—Learner’s Guide 59 . After completing this lesson.

The maximum Sale Date is the 31st of March 2005.SALE_DATE = ALL ( SELECT max(SALE. When adding a new table with =Max([Sale Date]) and another column with Sales Revenue.SALE_DATE) FROM SALE WHERE 60 Advanced Universe Design—Learner’s Guide . the Sales Revenue that gets returned for the maximum date in the summary table is not the correct value.Creating complex predefined conditions This unit looks at how you can make use of a subquery within a condition and build subqueries via a manual and/or wizard method. For example: SALE. as shown in the example below (containing a sample set of sale dates). and the Sales Revenue for that date is 17. After completing this unit. you will be able to: • Define subqueries in predefined conditions • Define @prompt syntaxes in predefined conditions Subqueries in predefined conditions End users may wish to see the most recent sale details. In Web Intelligence Rich Client the end user can run a report with Sale Date and Sales Revenue. The correct results can be obtained by using a subquery at report level. instead of having the end user struggle with the appropriate subquery syntax. this can also be done at universe level as a predefined condition. for example the most recent sale date and the revenue that was made on that date as a summary table in the document. However. and apply a maximum for the Sale Date. notice that the Sales Revenue showing for the maximum Sale Date is actually the total revenue for all sale dates. However. 505.

CLIENT_LASTNAME + '. ' + SubAlias__1.CLIENT_LASTNAME + '.505.SALE_TYPE='S') AND SubAlias__1. CLIENT SubAlias__1 WHERE (SubAlias__1.CLIENT_ID=SALE. and Joins—Learner’s Guide 61 . and the new condition in the Query Filter pane.(SALE. the end result shows the maximum Sale Date and the correct Sales Revenue value of 17. The benefit of using this method is that it allows the end user to combine several objects in a report and get the correct maximum Sale Date and Sales Revenue values.CLIENT_ID) AND (SALE.SALE_DATE = ALL ( SELECT max( SALE.CLIENT_ID ) AND ( SALE. LOVs. For example: ( CLIENT.SALE_DATE ) FROM SALE.CLIENT_ID=SALE. When the end user creates a new Web Intelligence Rich Client document using Sale Date and Sales Revenue in the Result Objects pane. ' + CLIENT.CLIENT_FIRSTNAME ) ) Creating Complex Predefined Conditions.CLIENT_FIRSTNAME = CLIENT. It is also possible to extend this syntax and generate a condition that allows end users to retrieve the maximum Sale Date for each Client together with the corresponding Sales Revenue. Using subqueries this way allows designers to use aggregate functions in the WHERE clause. In the Motors database there are a number of clients that have more than one sale date record.SALE_TYPE='S') ) The example predefined condition syntax ensures that the result in Web Intelligence Rich Client appears correct. Using a predefined condition with a subquery allows end users to return the maximum sale date per client.

Click in the Filter icon at the bottom of the Universe pane.Note: Universe Designer. uses SubAlias_1. When the end user creates a new Web Intelligence Rich Client document using Client Name.CLIENT_ID ) AND ( SALE. 3. and add an appropriate description. 4. Click the Filter icon at the bottom of the Universe pane. Activity: Creating subqueries in predefined conditions Objective • Create new predefined conditions using subqueries Instructions 1. Open your Motors universe file in Universe Designer. and add an appropriate description. Sale Date and Sales Revenue in the Result Objects pane.SALE_DATE = ALL ( SELECT max( SALE.SALE_DATE) FROM SALE WHERE (SALE. The subquery to insert into the Where field is as follows: SALE. In the Sales Dates subclass. The subquery to insert into the Where field is as follows: ( CLIENT. to replace the table names.SALE_DATE = ALL ( SELECT max(SALE. 5. the end result shows the maximum Sale Date and the corresponding Sales Revenue value for each Client Name. 2. and the new condition in the Query Filter pane. In the Sales Dates subclass. create a new Max Sales Date for each Client Name condition.SALE_TYPE='S') ) Note: The syntax for this subquery can be found on the course resources.CLIENT_ID=SALE. and subsequent numbering. create a new Max Sales Date condition.SALE_DATE ) FROM 62 Advanced Universe Design—Learner’s Guide .

Run a query with Sale Date and Sales Revenue in the Result Objects pane. ' + SubAlias__1. The result now shows the maximum Sale Date and the correct Sales Revenue value of 17.CLIENT_LASTNAME + '. 7. and Joins—Learner’s Guide 63 . 9. The benefit of using a subquery in a condition is that it allows the end user to combine several objects in a report and get the correct maximum Sale Date and Sales Revenue values. Launch Web Intelligence Rich Client. and the new Max Sales Date in the Query Filter pane.CLIENT_FIRSTNAME ) ) Note: The syntax for this subquery can be found on the course resources. Howard Hugheston. Save the changes in the universe. Model and Showroom. Creating Complex Predefined Conditions. LOVs. CLIENT SubAlias__1 WHERE (SubAlias__1. The maximum date and corresponding measure and dimension values are correctly shown in the report: 10.SALE_TYPE='S') AND SubAlias__1.CLIENT_FIRSTNAME = CLIENT. using Sale Date.SALE. Ensure that the condition objects in the Sale Date sub class are incompatible with the tables used in aggregate awareness.In the Motors database there are a number of clients that have multiple sale date rows. Create a new document in Web Intelligence Rich Client. Client Name and Sales Revenue in the Result Objects pane.CLIENT_ID=SALE. Paul Penn. 8. Filter on the Client Name for Paul Brent. and John Smith. Edit the query and add Invoice ID Number.505. 6.CLIENT_ID) AND (SALE.CLIENT_LASTNAME + '. ' + CLIENT.

a prompt can be used to get an end user to select a value pattern.multi. and the new Max Sales Date for each Client Name condition in the Query Filter pane. In the Name field. The Universe pane changes to show the Condition Object View. 8.'type'. This opens the Edit Properties dialog box for condition objects. Client Name. enter a help message for users describing the condition and any effect it has on queries they make. To create an “ALL Values” prompt in a predefined condition 1. @Prompt scenarios in predefined conditions In many cases prompts are needed to restrict the data or to make large value objects more user friendly to work with. 4. 3.'{Class\Object}'. using Sale Date. Enter the condition directly in the Where field or via the Edit Where Clause box by selecting the >> button. Click the class in which you wish the condition to appear.'{Class\Object}'. 5.COLUMN_NAME IN @prompt('message'. enter a name for the condition object. or by selecting Insert ➤ Condition. 2. Click the Filter icon at the bottom of the Universe pane. 7. In the Description field.11.Run a new query. and Sales Revenue in the Result Objects pane. The result now shows the maximum Sale Date and the correct Sales Revenue value per Client Name. free) OR ('*') IN @prompt('message'. rather than having to look for the value in a long list.multi. The syntax to insert is as follows: TABLENAME. Insert a new condition using the Insert Condition button on the toolbar. It is also possible to create an "All Values" option that allows end users to select values from the list or use the all values option. For example.'type'. free) So how does this syntax work? 64 Advanced Universe Design—Learner’s Guide . Open your universe file in Universe Designer. 9. 6.

The second part is not valid at this point. To create a predefined condition that returns a pattern selection 1. The syntax to insert is as follows: ((TABLENAME.Click OK. it allows end users to select one or more values from the list or type * in the Type a value box. or by selecting Insert ➤ Condition. The Universe pane changes to show the Condition Object View.. LOVs. 10. 3. Due to the use of the OR statement. and Joins—Learner’s Guide 65 .Click Parse. 6. In the Description field. 5. the condition is always valid (* = *) and all values are returned. enter a name for the condition object. Note: Using LIKE as an operator does not work with a list of values. due to the use of the OR statement.'type'. 9. This returns all values of the object.)+'%') 10. enter a help message for users describing the condition and any effect it has on queries they make. the condition is valid if one of the two parts is valid.• When the user selects a value from the LOV or enters a value directly in the box. Click the class in which you wish the condition to appear.Click OK. 11. • When the user enters an asterisk (*). 4.Save the changes in the universe. In the Name field. but in reality this does not work out very well in Web Intelligence Rich Client.COLUMN_NAME) LIKE (@prompt('message'. 2. However.. 11. 13. 7. You can in theory get users to select one value or use the pattern. 12. 8.When using the new prompt condition in the Query Filter pane in a new report. Click the Filter icon at the bottom of the Universe pane. Enter the condition directly in the Where field or via the Edit Where Clause box by selecting the >> button. the first part of the condition is valid. Creating Complex Predefined Conditions. Insert a new condition using the Insert Condition button on the toolbar.Save the changes in the universe. 12.Click Parse. It is best to ensure that there is no LOV referenced in the @prompt function syntax. This opens the Edit Properties dialog box for condition objects. Open your universe file in Universe Designer. the second part of the condition is valid.

Enter the condition directly in the Where field or via the Edit Where Clause box by selecting the >> button. Note: You may need to click on Refresh List if the values are not shown. 2. 8. 3. Edit the query and re-run. 7. enter a help message for users describing the condition and any effect it has on queries they make. free) 5. Create a new predefined condition using a match pattern prompt 1. In the Description field. enter asterisk (*) to return all values. and OK. In Universe Designer. 2.'A'. Insert a new condition in the Client class. Remove the asterisk and test that the end user can also select multiple values from the LOV. In Universe Designer open your Motors universe file. 66 Advanced Universe Design—Learner’s Guide .'A'.free) OR ('*') IN @prompt('Select value or type * for all values' . In the Type a value box enter * and click the arrow.multi. for example: This prompt allows you to: • Enter the first letter of the surname." 4. called Client Name Pattern Prompt. 6. The syntax to insert is as follows: @select(Client\Client Name) IN @prompt('Select value or type * for all values' . for example: "Select one or more values from the list. Click Run Query. The report returns all Client Name values. create a new condition in the Client class. enter a help message for users describing the condition and any effect it has on queries they make. Click Parse. Save changes and create a new Web Intelligence Rich Client report using Client Name and the new Client ALL values prompt filter.'Client\Client Name'.multi. In the Description field.Activity: Using @prompt in predefined conditions Objectives • Create a new predefined condition using an ALL values prompt • Create a new predefined condition using a match pattern prompt Create a new predefined condition using an ALL values prompt 1.'Client\Client Name'. called Client ALL values. 9. Click the Filter icon at the bottom of the Universe pane.

and Joins—Learner’s Guide 67 . 6.)+'%') 4. Client Name. and the new Client Name Pattern Prompt condition. J%. J% 3. In the prompt box enter B%..• Enter one or more starting letters followed by the % sign. • Enter a pattern like: B%. Click Parse and OK.'A'. 5. Enter the condition directly in the Where field or via the Edit Where Clause box by selecting the >> button. LOVs.. 7. The syntax to insert is as follows: @select(Client\Client Name) LIKE (@prompt('Enter a name pattern'. The report returns all clients with a last name starting with "B" and a first name starting with "J". Creating Complex Predefined Conditions. Save the changes and create a new Web Intelligence Rich Client report using Region. Click Run Query.

2. 3.COLUMN_NAME THEN 'ALL' ELSE TABLENAME.COLUMN_NAME END The same TABLENAME. create a new object.COLUMN_NAME FROM TABLENAME 8.COLUMN_NAME is referenced in all sections of the CASE statement. SELECT Distinct CASE WHEN TABLENAME. When selecting this it will also return the full list of values of the object. The SQL shows the UNION between the ALL values object and the original prompt object. In the Query Panel select the Combine Queries toolbar icon. remove the newly created ALL values object and drag in the original object used in the ALL values prompt. This syntax converts each of the column values to a generic 'ALL' value. You can also modify the LOV to show an "ALL values" entry.COLUMN_NAME = TABLENAME. In Universe Designer. Click the Properties tab.Working with advanced LOVs This unit explains different techniques for customizing your list of values. Note: This object only serves as an ALL values object for use in an ALL values prompt syntax. Use the following SELECT syntax for this object: CASE WHEN TABLENAME. 5. 4. After completing this unit. you will be able to: • Add an ALL values entry to an LOV • Arrange LOVs using an A-Z index Customizing LOVs As shown in the predefined conditions unit you can create prompts that allows users to enter an asterisk (*) to return all values.COLUMN_NAME = TABLENAME. 6. Click Edit. In the Query 2 tab. Click View SQL. Click OK to close the SQL Viewer. To modify an LOV to have an ALL values entry 1. 68 Advanced Universe Design—Learner’s Guide .COLUMN_NAME THEN 'ALL' ELSE TABLENAME. This generates a second query tab with the UNION symbol.COLUMN_NAME END FROM TABLENAME UNION SELECT Distinct TABLENAME. 7.

In Universe Designer. The original SQL syntax for this condition reads: TABLENAME. When used in a query. free) OR ('*') IN @prompt('message'.multi.'type'. multi.Open the previously created ALL values prompt condition. 12.multi.Click Display.'{Class\Object}'.Click the Filter icon at the bottom of the Universe pane. 10. and Joins—Learner’s Guide 69 . LOVs. the end user sees the value ALL as part of the LOV of the prompted object. Click Run.multi. 13.Append the following syntax to the modified condition: OR ('ALL') IN @prompt('message'. Create a new Client_ALL object in the LOV Objects class.Click OK twice. free) This syntax ensures that when the 'ALL' value is selected in the LOV it has a 'reference' and the query returns all object values. 14.'type'.'{Class\Object_ALL_Values}'. 2.COLUMN_NAME IN @prompt('message'. free) 16. Activity: Modifying LOVs Objectives • Create a Client ALL values object • Modify the LOV for the Client ALL values predefined condition Instructions 1. 4.'{Class\Object}'.9. free) 15.'{Class\Object_ALL_Values}'. Click Apply. Create a new class called LOV Objects. 11. The LOV contains a list of all individual column values and the value 'ALL'.multi. Selecting this returns all values.The prompt syntax now needs to be altered to reference the LOV of the new ALL values object. open your Motors universe file. 3.'{Class\Object_ALL_Values}'.'type'. Modify the syntax to: TABLENAME.Click the Show or Hide Item toolbar icon to hide the ALL values object. free) OR ('*') IN @prompt('message'.'type'.COLUMN_NAME IN @prompt('message'. Creating Complex Predefined Conditions.'type'.

multi. 10.'LOV Objects\Client_ALL'. free) OR ('*') IN @prompt('Select value or type * for all values' . 16. 9.Click the Show or Hide Item toolbar icon to hide the LOV Objects class. 6. 11.'LOV Objects\Client_ALL'.multi. Click Edit. 14.'A'.multi. 8. Click OK to close the SQL Viewer.Click OK.'A'. In the Query 2 tab.Click the Filter icon at the bottom of the Universe pane. 7. 13. Click the Properties tab. free) 70 Advanced Universe Design—Learner’s Guide . The complete modified syntax should read: @select(Client\Client Name) IN @prompt('Select value or type * for all values'. Use the following SELECT syntax for the Client_ALL object: CASE WHEN @select(Client\Client Name) = @select(Client\Client Name) THEN 'ALL' ELSE @select(Client\Client Name) END This syntax converts all Client Name values to 'ALL'.Open the Client ALL values Prompt condition. 17. 19. free) OR ('*') IN @prompt('Select value or type * for all values' .'A'.Click OK.Select the Export with universe option.Append the following syntax to the modified condition: OR ('ALL') IN @prompt('Select value or type * for all values)'.Click Run. free) This syntax ensures that when the 'ALL' value is selected in the LOV it has a 'reference' and the query returns all client name values. free) 20. 15.'LOV Objects\Client_ALL'. This generates a second query tab with the UNION symbol.5.'A'. Modify the syntax to: @select(Client\Client Name) IN @prompt('Select value or type * for all values'.Click View SQL.The prompt syntax now needs to reference the Client_ALL LOV. The SQL shows the UNION between the Client Name object and the Client_ALL object. The LOV now contains a list of all individual client names and the value 'ALL'.'A'. 12. 18.'LOV Objects\Client_ALL'. remove the Client_ALL object and drag in the Client Name object instead.'LOV Objects\Client_ALL'.Click Display. In the Query Panel select the Combine Queries toolbar icon.multi.multi.

OR ('ALL') IN @prompt('Select value or type * for all values)'. 26. or hierarchical. Note: This activity creates an extra object to bring in the ALL value.Run the query. This should return all client names. The UNION statement can also be added directly to the LOV with the Do not regenerate SQL before running option ticked. free) 21. Select the ALL value and click the arrow. an LOV can be viewed as tabular. the hierarchical option is not available for Web Intelligence or Web Intelligence Rich Client end users. However. 24. Arranging LOV data as an A-Z index Large LOVs can become difficult to navigate through for end users.multi. The same list hierarchy can be achieved in Web Intelligence or Web Intelligence Rich Client by using a cascading LOV. and the Client ALL values Prompt condition in the Query Filter pane. 23.The ALL value now shows up in the available list of values.Create a new report using Region and Client Name in the Result Objects pane.Save the changes in your universe. 22. 25. Creating Complex Predefined Conditions.'A'. Use an index to make the list smaller and easier to navigate. LOVs.Click Run Query. In Universe Designer.'LOV Objects\Client_ALL'.Launch Web Intelligence Rich Client. and Joins—Learner’s Guide 71 .

Click Generate LOVs. Verify that the Hierarchical View check box is selected. 1.To create an A-Z index in a cascading LOV 1. 2. 72 Advanced Universe Design—Learner’s Guide . a message appears asking whether you want to overwrite the existing values.COLUMN_NAME.Click OK. 4. 5. 6. In the Select field use the following SELECT syntax: substring(TABLENAME. 10. Click OK. Open your universe file in Universe Designer. 8. 3. Click the Show or hide item toolbar icon to hide the object. 9. 1) This syntax returns the first letter of the column. 11. Add the first letter object to the cascading list of values menu. Insert a new object using the Insert Object toolbar icon. Select Tools ➤ List of Values ➤ Create cascading list of values. 7.Save the changes in the universe. followed by the original object. As the selected objects may already contains LOVs.

In the Select field enter the following SELECT syntax: substring(MANAGER. Creating Complex Predefined Conditions. 1) This syntax returns the first letter of the manager's last name. 9. 3. 6. 1. followed by the original Manager object. Generate the LOVs. Ensure the LOV Objects class is hidden from the Aggregate awareness tables. and Joins—Learner’s Guide 73 . Return to Universe Designer and restore the Manager LOV using the following steps: • • • • Edit the Manager object and select the Properties tab. Click Run to restore the LOV. Create a new cascading LOV. Verify that the Hierarchical View check box is selected. Remove the cascading LOV generated condition. 4. 7. 8. LOVs. Save the changes and test the results in Web Intelligence Rich Client. Click Edit. Create a new object called First Letter of Manager Lastname in the hidden LOV Objects class 2. 5. Add the First Letter of Manager Lastname object to the cascading list of values menu.EMP_LASTNAME.Activity: Arranging LOVs Objective • Create a cascading A-Z index LOV Instructions 1.

Running the query causes the prompt of the join definition to pop up. In the Motors universe. and how joins can be modified to accomplish relative date-time and running calculations in end user reports. an @prompt syntax can be placed on the Sale table. By including objects in the query that cause the join to be included into the generated SQL you can test whether the prompt in the join definition appears and works correctly. you will be able to: • • • • Define @prompt functions in joins Define conditional join paths Use conditional joins for relative date-time objects Use conditional joins to construct running sum objects Defining @prompt functions in a join Just as you can use prompts in object definitions and in predefined conditions you can define prompts in joins. just as it would for prompts in objects or predefined conditions. After completing this unit. Instead of using self-restricting joins to filter out the data. the Sale table contains rows for sales and rental data. If a prompt has to be applied to all objects for that table you can define a self-referencing join containing a prompt. This method could eliminate the requirement for aliases and additional contexts. 74 Advanced Universe Design—Learner’s Guide .Working with advanced join syntaxes This unit looks at prompts and conditional uses in joins. For instance you want to prompt for selecting a calender range (begin date. end date prompt) when someone wants sales data through time. Sometimes you want a prompt to limit the result set when joining two tables.

For example. Some tables may have several identification categories keys for products. a complex join can be defined between a Product table and the different levels of categories.Note: You cannot use the @select and @where functions in join definitions. and Joins—Learner’s Guide 75 . Defining conditional join paths In some cases designers might want to define conditional joins. LOVs. Creating Complex Predefined Conditions.

Note: The above example is not part of the Motors database schema. an end user wants to create separate measures for the current and the previous years. Using joins to construct relative date-time objects Relative date-time objects can be created using CASE statements and database date-time functions. The conditional join acts as the CASE statement.The prompt gets end users to select the category they need to query on and depending on the selection the CASE statement links the relevant joins. but wants to link them to the same time period. For example. The end user wants to display a table for January periods over a number of years. Another way to construct relative date-time objects is to use a separate alias of the fact table and connect it to a time dimension table with a conditional join. Period This year Last Year 200701 161803 - 76 Advanced Universe Design—Learner’s Guide .

which can be done via a conditional join in the universe. The conditional join is placed between the alias table and the Finance_Period table.200801 200901 201001 201101 314159 271803 141421 - 161803 314159 271803 141421 To achieve this. LOVs. an alias of the Sale fact table. and the Finance_Period time dimension table. In the Motors universe similar results can be achieved by using the Sale fact table. The conditional join uses a database date function to extract the year. for example. and Joins—Learner’s Guide 77 . minus 1 to retrieve the previous year. be returned per quarter of the FY04-05 period and per quarter of the previous FY03-04 period. Data can. Creating Complex Predefined Conditions. you need to link the data of 200701 to the month 200801 as the previous year's value.

Instead of creating several CASE objects. 78 Advanced Universe Design—Learner’s Guide . and you only need to create one special join condition. separate SQL queries need to be carried out which can cause performance issues. Secondly. the conditional join only works for clearly ordered time criteria. by using this method. you just need to create the objects directly based on the new alias. Conditional joins and running calculations Conditional joins can also be used to create running calculations. When using a fact table and a time dimension table you can create running sum and average calculations.The advantage of this solution is that it is an easier method to handle if you want to create a huge amount of measures for the previous year. however. The disadvantage of this method is that you need to have a date dimension table in the schema to make it work correctly.

Therefore.The disadvantage of this method is that users need to run these running calculation objects together with a time dimension to return the correct results. At the end of the day. and internally the join creates a partial Cartesian product. the ">=" join has a negative impact on performance for big amounts of data. Creating Complex Predefined Conditions. That saves a lot of complication and is much faster. Note: These functions can also have a performance impact. that is what functions like runningsum are designed for. consider the following alternatives: • Use analytic database functions (Transact_SQL). and Joins—Learner’s Guide 79 . • Use report functionalities. LOVs. A real life database fact table normally contains several million rows of data. • Ask the ETL person to create extra columns for the running sums and pre-populate them. when having to deal with running calculation requirements. Secondly.

with the same SELECT syntax.1. SHOWROOM. Open List Mode. In the Sales class. already exists in the YTD Measure Objects class (subclass of Sales). Set the appropriate cardinalities. Ensure all newly created joins are included in the SALE_PREVIOUS_YEAR context. 4.CLIENT_ID SHOWROOM. Name the context SALE_PREVIOUS_YEAR and remove all joins referring to the original SALE table: CLIENT. Note: The self-restricting join for the SALE. Tip: This context mirrors the existing SALES context. 6. Add a SALE_PREVIOUS_YEAR context. and select the SALES context.SALE_ID = SALE_MODEL. In your Motors universe create a SALE_PREVIOUS_YEAR (SALE) alias table. with all joins from the original SALES context selected. create a new Previous Year Sales Figures subclass. b.SALE_TYPE column needs to be manually created for the alias table. Join SALE_PREVIOUS_YEAR (SALE) to the FINANCE_PERIOD table. The New Context window appears.SALE_ID SALE.SALE_DATE between FINANCE.FP_START and FINANCE. Insert the following objects: • Sales Total this year: sum(SALE.FP_END 3.SALE_TYPE = 'S' SALE.SALE_TOTAL) Note: A Sales Total object. d. You can make a copy of the SALES context as follows: a. Join the SALE_PREVIOUS_YEAR (SALE) table to the CLIENT.SHOWROOM_ID SALE.CLIENT_ID = SALE. 5. Instead of creating a new object with the same 80 Advanced Universe Design—Learner’s Guide . Replace the removed joins with the SALE_PREVIOUS_YEAR alias table joins. c.FP_START and FINANCE_PERIOD. Right-click the SALES context in the Context zone in List Mode.SALE_PREVIOUS_YEAR. and SALE_MODEL tables.Activity: Using complex joins Objectives • Create relative date-time calculations • Create running calculations Instructions: Create relative date-time calculations 1. Set the appropriate cardinalities. dateadd(year. 2.SALE_DATE) between FINANCE_PERIOD.FP_END e. Select Insert Context.SHOWROOM_ID = SALE.

FP_MONTH 3. you can create a new object in the Sales MAT subclass that references the existing Sales Total object using the @select function. Your results should look similar to this example: Instructions: Create running calculations 1.SALE_TYPE column needs to be manually created for the alias table. Join the SALE_RUNNING_SUM (SALE) table to the CLIENT.FP_END FINANCE_PERIOD. @select(YTD Measure Objects\Sales Total) • Sale Total previous year: sum(SALE_PREVIOUS_YEAR.FP_YEAR and FINANCE_PERIOD. Note: The self-restricting join for the SALE.syntax. SHOWROOM.SALE_DATE between FINANCE_PERIOD_RUNNING_SUM. LOVs. Creating Complex Predefined Conditions. and SALE_MODEL tables. 4. In your Motors universe create a SALE_RUNNING_SUM (SALE) alias table and a FINANCE_PERIOD_RUNNING_SUM (FINANCE_PERIOD) alias table. Insert the following two joins: SALE_RUNNING_SUM.FP_MONTH >= FINANCE_PERIOD_RUNNING_SUM.SALE_TOTAL) 7. and Joins—Learner’s Guide 81 .FP_YEAR = FINANCE_PERIOD_RUNNING_SUM. Set the appropriate cardinalities. 2. Save your changes and test the new objects in Web Intelligence Rich Client.FP_START and FINANCE_PERIOD_RUNNING_SUM.

SHOWROOM_ID = SALE_RUNNING_SUM. In the Sales class. @select(YTD Measure Objects\Sales Total) • Sales Total Running Sum: sum(SALE_RUNNING_SUM.SALE_TOTAL) • Month Number: right(FINANCE_PERIOD.FP_MONTH. and Sales Total Running Average. create a new Accumulating Sales Figures subclass. Insert the following objects: • Sales Total: sum(SALE. Run a report with Financial Month.FP_START and FINANCE_PERIOD_RUNNING_SUM. Save your changes and test the new objects in Web Intelligence Rich Client. Sales Total Running Sum.2)+0 • Sale Total Running Average: sum(SALE_RUNNING_SUM.CLIENT_ID SHOWROOM.SALE_DATE between FINANCE_PERIOD_RUNNING_SUM.SALE_TYPE='S' CLIENT. 4. and so on. Hide the Month Number object. and so on.SALE_TOTAL/@select(Accumulating Sales Figures\Month Number)) 7. the row at Month 03 displays the Sales Total of Month 01 + Sales Total of Month 02 + Sales Total of Month 03. 8.SALE_ID = SALE_RUNNING_SUM. divided by 2.SALE_TOTAL) Note: Either use the syntax shown above or use the @select function to reference the existing Sales Total object in the YTD Measure Objects class (subclass of Sales). consisting of the three new joins only: SALE_RUNNING_SUM.FP_MONTH >= FINANCE_PERIOD_RUNNING_SUM. Your results should look similar to this example: 82 Advanced Universe Design—Learner’s Guide . The Sales Total Running Sum column displays a cumulative aggregation of each Sales Total cell plus the previous period cell value. The Sales Total Running Average column calculates a cumulative aggregation of each Sales Total cell plus the previous period cell value.FP_MONTH SALE_RUNNING_SUM.FP_END FINANCE_PERIOD. 3.FP_YEAR and FINANCE_PERIOD.SHOWROOM_ID SALE_MODEL.SALE_ID 6.CLIENT_ID = SALE_RUNNING_SUM. right(@select(Finance Period\Financial Month). so the row at Month 02 displays the Sales Total of Month 01 + Sales Total of Month 02. depending on the number of cells added up. Add a RUNNING_SALES_FIGURES context.FP_YEAR = FINANCE_PERIOD_RUNNING_SUM.5.2)+0 Note: Either use the syntax shown above or use the @select function to reference the existing Financial Month object in the Finance Period class. Sales Total.

and Joins—Learner’s Guide 83 . LOVs.Creating Complex Predefined Conditions.

what two important syntaxes are required to achieve this? 3. 2. True or false? Using subqueries allows you to use aggregate functions in the WHERE clause. What functions cannot be used in a join definition? 84 Advanced Universe Design—Learner’s Guide . When setting up a predefined condition that returns a pattern.Quiz: Creating complex predefined conditions and LOVs 1.

and Joins—Learner’s Guide 85 . you are now able to: • Create complex predefined conditions • Work with advanced LOVs • Work with advanced join syntaxes Creating Complex Predefined Conditions. LOVs.Lesson summary After completing this lesson.

86 Advanced Universe Design—Learner’s Guide .

0/3. After completing this lesson.1: Universe Design course.Lesson 5 Securing Universes Lesson introduction Different aspects of universe security can be managed at different levels: in the universe connection. combined with the use of universe restriction sets. Universe level security. and directly at universe level. is covered in the BusinessObjects XI 3. This lesson looks at security at connection and CMS level. in the Central Management Server (CMS). you will be able to: • Define connection and user credential parameters • Work with Central Management Server (CMS) universe security • Work with table mapping Securing Universes—Learner’s Guide 87 . in the form of restriction sets.

A group of restrictions that correspond to a user group is called a restriction set. This unit looks at these different options and parameters that can be set in a universe. • Universe As universe designer. Universe designers can secure universes by setting different authentication options in the universe connection. User credentials for the connection In the connection Login Parameters there are three options that can be specified for passing user credential data through the universe connection. deleting. you will be able to: • Describe the different data source credentials that can be applied in the connection About security and universes In BusinessObjects. and depending on the rights defined for a user group. the administrator can also restrict viewing. and other actions in a universe. universe security can be managed at these levels: • Connection credentials and data source The universe connection determines how users connect to the data source and access the database. • Central Management Server The BusinessObjects system administrator can authorize or deny access to universes stored in the CMS.Defining connection and user credential parameters The universe connection determines how users connect to the data source and access the database. • Use Single Sign-On when refreshing reports at view time: 88 Advanced Universe Design—Learner’s Guide . editing. Universe designers can secure universes by setting different authentication options in the universe connection that corresponds back to security set at data source level. The administrator can define which universes users are authorized to access. you can define restrictions for users who are authorized to use a universe. row access. A restriction set can include object access. A number of connection options can be set up to either use an explicit database user account or delegate the authentication to user specific credentials. After completing this unit. and connection controls. • Use specified user name and password: The user name and password for the data source authentication are used. query and SQL generation controls. This unit describes the types of restriction sets you can define on a universe.

See the Business Objects Enterprise Administration guide for information on setting Single Sign-On (SSO). • Use BusinessObjects credential mapping: The user is prompted for a database user password associated with their BusinessObjects account to refresh a report.When selected. Securing Universes—Learner’s Guide 89 . single sign-on to the database enables them to perform actions that require database access. viewing and refreshing Web Intelligence documents without having to provide their logon credentials again. all users in the CMS that need to use this connection require having their database user credentials set in the CMS. Those credentials are known as dbuser and dbpass variables and can also be used with the @variable function. These are set at the administrative level. This option is used in a deployment where each Enterprise user is bound to a Database user to enforce Database security and monitoring on all users. Refer to Business Objects Enterprise Administrator's Guide for information on setting up this option. Once users are logged onto BusinessObjects Enterprise. When this option is selected for a connection. This is set using the parameters dbuser and dbpass. the user name and password used to access the CMS are automatically used as database login parameters. for example.

and other actions in a universe. the administrator can also restrict viewing. consult the BusinessObjects Enterprise Administrator's Guide. deleting. When users log on. The administrator can define which universes users are authorized to access.Working with Central Management Server (CMS) universe security The BusinessObjects system administrator can authorize or deny access to universes stored in the CMS. The CMS also responds to authorization requests made by the rest of the system. Universes can be separated into folder or category structures instead. group memberships. the CMS then grants the user a logon token and an active session on the system. the CMS authorizes the request only after it verifies the user's account or group membership has sufficient privileges. and depending on the rights defined for a user group. the CMS coordinates the authentication process with security plug-ins. 90 Advanced Universe Design—Learner’s Guide . and depending on the rights defined for a user group. the administrator can also restrict viewing. These folders can be created in Universe Designer or in the Central Management Console. and other actions in a universe. Note: For more information on the access levels for users and groups. editing. to provide a logical grouping of universes within one CMS. After completing this unit. you need an HR folder in which you have grouped universes that are only to be accessed by the HR group. deleting. and object rights that define user and group privileges. For example. The BusinessObjects system administrator can authorize or deny access to universes stored in the CMS. editing. you can group universes in folders and set appropriate access rights per folder. When a user requests access to a universe in a particular folder. Access to the HR universe folder can be set in the Central Management Console. such as user accounts. Instead of denying access per universe file. you will be able to: • Organize universes in secured folder structures Organizing universes in secured folder structures The Central Management Server (CMS) manages security information. The administrator can define which universes users are authorized to access.

Securing Universes—Learner’s Guide 91 .

The following types of restrictions can be included in a restriction set: Type of restriction Description Connection The universe connection to the data source.1: Universe Design course. you can define restrictions for users who are authorized to use a universe. You can select an alternative connection for the universe. This unit looks at how you can use table mapping to substitute one database table for another. Restriction sets can be edited. you will be able to: • Apply table mapping in a restriction set About restriction sets Access restrictions that apply to a user or group are defined in a restriction set. You can replace a table referenced in the universe by another table in the database. row access. Query controls SQL generation options Object access Row access Alternative table access 92 Advanced Universe Design—Learner’s Guide . In addition you can use table mapping in a restriction set. query and SQL generation controls. Options to control the SQL generated for queries.0/3. These were covered in the BusinessObjects XI 3.Working with table mapping in restriction sets As universe designer. A group of restrictions that correspond to a user group is called a restriction set. You can apply column-level security. You can define multiple restriction sets for a universe. Options to limit the size of the result set and query execution time. or deleted at any time. A restriction set can include object access. and connection controls. You can define a WHERE clause that restricts access to row and limits the result set returned by a query. After completing this unit. and ensure that some users only have the right to see the substituted table values.

you manage restriction sets using the Manage Access Restrictions dialog box.SHOWROOM_NAME.How are restriction sets managed? In Universe Designer. when an object requires data from the Annual_Figures table. The Available Restrictions pane in the left-hand side of the Manage Access Restrictions dialog box lists all the restriction sets currently available to the universe. SELECT SHOWROOM. For example. Here is the SQL created for a simple query using Showroom and Sales Revenue.ANNUAL_SALE_VALUE) FROM SHOWROOM INNER JOIN ANNUAL_FIGURES ON (SHOWROOM. in the right-hand side of the dialog box. The table name in the SQL is replaced leaving all of the joins intact. Working with table mapping Table mapping is a security restriction feature that allows the universe to substitute one database table for another table when the SQL for an ad-hoc query is written. edit. You can create. and delete a restriction set at any time once the universe has been exported to the CMS.SHOWROOM_ID=ANNUAL_FIGURES. You can create multiple restrictions depending on the query needs of a target user group. even a table from a different database such as the Annual_Figures_Euro from the MotorsEuro database. which you access by selecting the Manage Security option on the Tools menu.SHOWROOM_ID) Securing Universes—Learner’s Guide 93 . The users and groups defined for each restriction set are listed in the Available Groups and Users pane. you can apply a table mapping restriction to require specific users to obtain this data from another table. The SQL uses the Annual_Figures table. sum(ANNUAL_FIGURES.

GROUP BY SHOWROOM.dbo. All references to the Annual_Figures table have been replaced with the Annual_Figures_Euro table. you cannot include tables from a SQL Server database and an Oracle database in the same universe.dbo. To map one table to another 1. In the Manage Access Restrictions dialog box.SHOWROOM_NAME. SELECT SHOWROOM. select Manage security.ANNUAL_FIGURES_EURO ON (SHOWROOM. and then click Manage Access Restrictions. 2. a message box appears to indicate that you must export the universe before you can create security restrictions. Note: If you have not yet exported the universe... sum(MotorsEURO. click New...dbo.SHOWROOM_NAME Here is the SQL created for the same simple query after a table mapping restriction has been applied.SHOWROOM_NAME Note: All database tables in a universe must be on the same RDBMS platform.SHOWROOM_ID) GROUP BY SHOWROOM.. 3.ANNUAL_FIGURES_EURO.SHOWROOM_ID=MotorsEURO.ANNUAL_FIGURES_EURO. For example. 94 Advanced Universe Design—Learner’s Guide .ANNUAL_SALE_VALUE) FROM SHOWROOM INNER JOIN MotorsEURO. From the Tools menu. The Manage Access Restrictions box displays.

Caution: The Reset button at the lower left corner resets every change made in any tab. The six tabs in this dialog box allow you to define the type of restriction you want to include in this restriction set. In the Edit Restriction dialog box. In the Restriction Name field. type the name you want to apply to the restriction. 4. Securing Universes—Learner’s Guide 95 . It resets all options back to the defaults. click the Table Mapping tab. 5.The Edit Restriction Set dialog box displays.

8. If you have completed your restriction set. use the Select button to select the original and replacement tables. If you know the exact names of the tables. click OK to save the changes.The Table Mapping tab displays. The New Table Mapping dialog box appears. which contain data in Euros instead of US dollars. you can define the replacement of a table referenced by an object in the universe by another table for a specific user or group of users. When you have selected the tables. click the Check All button to validate the status of the mapping settings. In this tab. 96 Advanced Universe Design—Learner’s Guide . 9. Otherwise. 6. Activity: Working with table mapping in a restriction set Objectives • Create a new restriction set • Apply the restriction set to a user group • Test the restriction set in Web Intelligence Rich Client Instructions In this activity you insert tables from the MotorsEURO database. 7. you can type them in the text boxes. Click Add in the Table Mapping tab. otherwise navigate the remaining tabs to apply further restrictions.

6. Arrange your structure to be able to add four additional tables. allowing you to apply security to your universe file.Run a query with Client Name and Sales Revenue.Log onto Web Intelligence Rich Client with the sales user account. 1. In the Replacement Table field. Launch the Table Browser and expand the MotorsEURO (and dbo) node. Go to Tools ➤ Manage Security ➤ Manage Access Restrictions and create a table mapping restriction set called Sales_Euro. Insert the following tables into your structure: • ANNUAL_FIGURES_EURO • QUARTER_FIGURES_EURO • SALE_EURO • MODEL_EURO Note: These tables remain in your structure as stand-alone tables. Preview the restriction to check that it is correct. Apply this restriction set to the sales user.Save your universe and export it to the location specified by the instructor. Save your universe and export it to the location specified by the instructor. In the Table Mapping tab click Add. 4. 11. 10. 12. 2. In the Original Table field select ANNUAL_FIGURES. 14. Check with the instructor for the exact user name to use. 5.View the SQL. 3. select ANNUAL_FIGURES_EURO from the MotorsEURO database and click OK.In addition you use the table mapping feature in a restriction set to substitute four tables from the Motors database with the new tables from the MotorsEURO database. Repeat the for the remaining MotorsEURO tables: • QUARTER_FIGURES_EURO • SALE_EURO • MODEL_EURO 7. 13. 8. Select Check All and click OK. Check with the instructor for the exact user name to use. 9. A CUID is assigned. when you export your universe.Create a new report based on your exported Motors universe. To be able to use the Manage Access Restrictions menu you need to export your universe. Securing Universes—Learner’s Guide 97 .

The SALE and SALE_MODEL tables are replaced by the SALE_EURO and MODEL_EURO tables. View the SQL. The ANNUAL_FIGURES table is replaced by the ANNUAL_FIGURES_EURO table. You can format the report to Euro currency in Web Intelligence Rich Client. 15. 98 Advanced Universe Design—Learner’s Guide . The Sales Revenue data is in Euros.Run the report to view the results returned.Run a query with Showroom and Sales Revenue. 16.

Quiz: Securing universes 1. you can group universes in folders and set appropriate access rights per folder. all users in the CMS that need to use this connection will require having their database user credentials set in the CMS. Universe security can be managed at which levels? 2. When the Use Single Sign-On when refreshing reports at view time option is selected for a connection. 3. True or False. Instead of denying access per universe file. Securing Universes—Learner’s Guide 99 . True or False.

Lesson summary After completing this lesson. you are now able to: • Define connection and user credential parameters • Work with Central Management Server (CMS) universe security • Work with table mapping 100 Advanced Universe Design—Learner’s Guide .

After completing this lesson.Lesson 6 Implementing Universe Life Cycle Management Lesson introduction This lesson describes how to move content from a development environment to a production environment. you will be able to: • Move content from development to production Implementing Universe Life Cycle Management—Learner’s Guide 101 .

InfoObjects are system metadata objects that contain index information. you will be able to: • Describe life cycle management • Use the Import Wizard • Move content from a development environment to production Life cycle management Life cycle management promotes Business Intelligence (BI) content from development to quality assurance. Reports and other Business Intelligence objects often require modification or enhancement as a result of changing information needs. Note: Each BI object is stored in the CMS as an InfoObject. quality assurance. • Maintains a unique ID for each InfoObject. Component Unique IDs All objects have a unique ID. Administrators must control how BI objects are promoted through these stages. Many deployments of BusinessObjects Enterprise contain different stages such as a development. and can use a different locale setting that affects the names of the objects. For example. is not the initial deployment of the code from development.Moving content from development to production After completing this unit. 102 Advanced Universe Design—Learner’s Guide . This ID retains the unique identity of objects during move. moved to a different folder. The assigned CUID remains with the object as it goes through life cycle management stages. even between clusters. and production within the same version. None of these actions affects the assigned CUID. a report can be renamed. but to successfully manage subsequent updates to content. that need to be successfully change-managed at different cycles from one another. and even name changes without breaking dependencies. potentially one for a Sales team and one for a HR team. A CUID: • Possesses a unique ID in a cluster. and the actual documents or objects are stored in a file store. location changes. called a Component Unique ID (CUID). whether the objects are completely new or whether they overwrite or update objects that already exist in the destination environment. Part of the life cycle management requirement is to be able to move different subsets of content at different times through a cycle. a customer can have independent BI applications in a shared cluster system. For example. quality assurance. Content is inter-dependant on one another and you need to successfully impact all of the inter-dependant objects when going through a life cycle management. and production. • Permits object changes. The real challenge of moving content in a life cycle. and to production stages.

1. and then promote those objects to a production environment. security. folders.Also. Various dialog boxes may appear depending on the source environment and the types of information that you choose to import. original CUID and handles all dependencies. you can move the changed universe into production together with all dependant reports. You can use the Import Wizard to import content from BusinessObjects.0/3.1 deployment to a Business Intelligence Archive Resource (BIAR) file.1 imports most of the source environment using a single tool called the Import Wizard. universes.0/3. if you modify the name and contents of several classes within a single universe that multiple reports are dependent on. Crystal Enterprise. servers. This allows you to modify and enhance reports and other objects on a development environment. Implementing Universe Life Cycle Management—Learner’s Guide 103 . when you move from development to production. It can promote content between clusters on the same network (LAN or WAN). groups. or BusinessObjects Enterprise into your current BusinessObjects Enterprise deployment. and includes all the subfolders the reports are in. groups. The Import Wizard acts as a bridge between the source repository and target repository. • Exports content to the target repository and physical storage area.1 deployment. universe IDs).1 deployment. The Import Wizard is a locally installed Windows application that allows you to import most objects in the repository (including user accounts. Using the Import Wizard BusinessObjects XI 3. reports. For example. or do the promoted objects simply update existing objects in the new environment? Import Wizard retains object links. and other objects.1 deployment to another XI 3.0/3. if you select a set of three reports. the Import Wizard automatically searches for the interlinked dependencies. the universe where they are based on and the universe connection. In addition to importing objects from previous versions to XI 3. Are the promoted objects completely new objects in the new environment. The Import Wizard: • Acts as a migration tool. universes. • Updates content (for example. An important consideration in life cycle management within the same version. folders. or do the promoted objects overwrite similarly named objects in the new environment. or the CMS database. is how the objects exist in the new environment.0/3. or import content from a BIAR file to your BusinessObjects Enterprise XI 3. • Imports content from the source repository. and objects stored in Inbox and personal folders on a cluster server) to the new BusinessObjects Enterprise system. You can also export content from a BusinessObjects Enterprise XI 3. The Import Wizard provides a series of screens that guide you through the process of importing and exporting Business Intelligence content such as user accounts.0/3. the Import Wizard also enables you to manage the life cycle of a deployment by moving assets from one XI 3. documents.0/3.

1 there are new import scenario options. Import scenarios When using the Import Wizard to promote an object from one BusinessObjects Enterprise XI 3. rename the object. but it finds an object with the same 104 Advanced Universe Design—Learner’s Guide . It also lets you specify what you want the wizard to do when it finds that an object already exists on the destination environment. the wizard allows you to use either the objects CUID or its name and path to determine whether the object already exists on the destination environment. you have three options: Scenario option Description Update the destination.0/3. and the Import Wizard finds a matching object on the destination environment. If the Import Wizard finds an object in the destination environment with the same CUID. When you are matching objects by CUID.In BusinessObjects Enterprise XI 3. If the Import Wizard does not find an object in the destination environment with the same CUID.1 deployment to another. which greatly enhance the administrators choices for content promotion. In case of name conflict.0/3. it updates the destination's object. and a feature called incremental importing.

Do not import the object. it updates the destination's object. it does not import the source's version. and the Import Wizard finds a matching object on the destination environment. If the Import Wizard finds an object on the destination environment with the same name but different CUID. it does not import the object. If Import Wizard finds an object on the destination environment with the same CUID. If Import Wizard finds that an object already exists on the destination environment with the same name and path. it updates the destination environment's version with the source's. If Import Wizard finds that an object already exists on the destination environment with the same name and path. If Import Wizard finds that an object already exists on the destination environment with the same name and path. it imports the source's object and renames it. When you are matching objects by name and path. In case of name conflict. do not import it. Update the destination object.Scenario option Description name. If the Import Wizard finds an object in the destination environment with the same CUID. Do not import the object. Update the object. Note: Matching objects by name and path is not an option when importing content from a BIAR file. When you import from Business Intelligence Archive Resource (BIAR) files. Implementing Universe Life Cycle Management—Learner’s Guide 105 . it imports the object from the source environment and then renames that object. you have three options: Scenario option Description Keep the destination object and import a renamed copy of the object. it does not import the object from the source environment. objects are matched by CUID.

If you are updating objects that already exist on the destination environment. when there is a match found. These options are safeguards that override what you selected on the Import scenarios screen. If you want to import report objects without importing a universe or connection that would overwrite a universe or connection on the destination environment. The Incremental import screen allows you to import objects without overwriting dependent objects that already exist on the destination environment. Note: An object refers to any type of object except universes.Incremental import By default. you can specify this on the Incremental import screen. For example. the Import Wizard also imports the universes and universe connections that the reports use. universe connections. the Import Wizard automatically imports dependent objects. and groups. 106 Advanced Universe Design—Learner’s Guide . when you import report objects. the Incremental import screen appears. This screen prompts you to specify what type of objects and rights to want to overwrite on the destination environment with the objects from the source environment.

even if they are not used by any document. Implementing Universe Life Cycle Management—Learner’s Guide 107 . Imports all universes and connections used by the selected documents. Imports all universes. The Import Wizard has three modes for importing universes: Mode What it does Import all universes and all connection objects. The connection is saved in the File Repository Server (FRS) and an InfoObject is created in the CMS. You cannot select individual universes or connections. Import all universes and only connection objects used by these universes.Universes and universe connections When you import a universe the Import Wizard imports any associated connection objects. Import the universes and connections that the selected Web Intelligence and BusinessObjects documents use directly. The universe and its linked documents are copied into the FRS. and only connection objects used by those universes. Imports all universes and all connection objects. This option also enables you to select additional universes to import.

the Import Wizard automatically selects the associated universes for import. You can also export content from a BusinessObjects Enterprise deployment to a Business Intelligence Archive Resource (BIAR) file. content can be moved directly from source CMS to destination CMS. as certain reports use it. They can be used to archive folders and objects in the Enterprise repository so that they can be easily transferred to a different location. The Import Wizard lets you to backup your source CMS content to a Business Intelligence Archive Resource (BIAR) file. 108 Advanced Universe Design—Learner’s Guide . and moving BI applications from a development environment to a production environment. The import wizard selected these two universes by default. you are asked to choose which universes you want to move to production. Additional universes can be selected. The eFashion and Island Resort Marketing check boxes are grayed out. and then use that BIAR file to import this data into the destination server. then all relevant core universes and their connections are also imported.If you selected the third option. What is a BIAR file? Business Intelligence Archive Resource (BIAR) files are a packaging tool for managed content in a BusinessObjects Enterprise system. This is useful for making a system backup. If a universe is a derived universe. Working with Business Intelligence Archive Resource (BIAR) files Using the Import Wizard. or if you select a Web Intelligence document to import.

there is no direct contact from one environment to another. and where there is a requirement that code comes through a version control system prior to going into production. it acts similar to a WAR or JAR file. This can be useful in an environment where deployment to quality assurance. to production is done by different people with different security rights. XML files Essentially the BIAR file is a binary zip file that contains a collection of XML files for individual documents and universes. and universes must be deployed with the correct CUID before reports can reference them. the reports and universe are exported to a BIAR file. or customers that have separate geographic deployments that do not have connectivity between them. This can help customers that have stringent firewall requirements around their different development and production deployments. allowing for version control. connection objects must be created with the correct CUID before universes can refer to them. This file tells the deployment engine in what order to deploy the object so that the dependency and security model can be deployed correctly. Universes and report dependencies in the BIAR file can be granularly. Version Control Using the BIAR file method also provides a file based archive that can be placed in version. Note: This requires additional steps to move between environments. When the development tests are complete. and individually version controlled in your choice of Version Control Systems. to production. By using a BIAR file.BIAR files can be used to export BI object content to XML for deployments without network access to the source repository. For example. For example. and the administrator can import the BIAR into the production area. Testers can change the label in the Version Control System to "ready for production" after testing. Note: A BIAR file is a standard zip file and can be unzipped accordingly. for example Perforce.xml) that acts as the root deployment descriptor. Implementing Universe Life Cycle Management—Learner’s Guide 109 . Individual documents and universes can be checked in and out of this structure in a granular fashion. or unzips the BIAR file to a specific folder structure. or source control system. Every BIAR file has at least one single specific XML file (BusinessObjects. PVCS. Universes and reports have an individual XML file representation in the BIAR file. and it can help efficiently propagate incremental moves from development to quality assurance. The tester that has direct access to the QA staging area checks in the BIAR file directly. Using the BIAR file functionality in this way can provide an audit history of who changed what and when. the content creator creates a set of reports and a universe that are tested in the development system. and BIAR files can be large. or SourceSafe.

Select Start ➤ Programs ➤ BusinessObjects XI 3. your selected options are stored into the file. Follow the wizard instructions. 7. Specify Business Intelligence Archive Resource (BIAR) File as the destination environment. 3. 8. Note: When using a BIAR file as a destination. 6.1 system as the source environment.1 ➤ BusinessObjects Enterprise ➤ Import Wizard. Specify the BusinessObjects Enterprise XI 3. By default all objects are selected. making the required selections. 5. Click Next. 4. Start the Import Wizard. when you select "Import folders and objects" in this step. and enter the name of the BIAR file. and can be later imported into production. 110 Advanced Universe Design—Learner’s Guide .To export data to a BIAR file 1. Alternatively select the ellipse button to browse to a location. Specify the objects that you wish to copy from the test environment to production. Type in the location and BIAR file name in the BIAR file box. you are later able to refine your selection to just certain folders or reports. Enter the name of the CMS and user authentication.0/3. Each selected option is presented in a later wizard screen.0/3. and click Next until the Ready to Import screen appears. Click Next. 2. For example.

6. Click the ellipse button to browse to the location of the BIAR file and click Open. Enter the name of the CMS and user authentication. 4.0/3.0/3. Click Next. for example. 7. The Import Progress screen appears. making the required selections. click Back to modify your selections. and do not want to overwrite the universe connection on the destination environment. If your selections appear incorrect. So. 10.0/3. the dialog box displays a summary of the import. By default. the Import Wizard imports any universe connections that the universes that you selected rely on. you are still prompted to choose whether or not and which users you want to import. if your BIAR file only contains one universe. If these settings appear correct. Select Start ➤ Programs ➤ BusinessObjects XI 3. 2. Click Finish. The wizard provides a summary of the elements you intend to import to the BIAR file. Click Done to close the Import Wizard. 5.0/3. After the import is complete.1 deployment. The wizard provides a summary of the elements you intend to import to the BIAR file. Specify Business Intelligence Archive Resource (BIAR) File as the source environment. To promote universes and universe connections from a development environment to a production environment This scenario describes promoting universe objects from one BusinessObjects Enterprise XI 3. After the import is complete.Click Done to close the Import Wizard. Specify the BusinessObjects Enterprise XI 3. Understand that the Import Wizard does not first read the contents of the BIAR file and then ask you the appropriate options. The Import Progress screen appears. and click Next until the Ready to Import screen appears. To import data from a BIAR file into the destination CMS 1.1 deployment to another XI 3. click Finish to generate the BIAR file. If you want to promote a universe to the destination.1 ➤ BusinessObjects Enterprise ➤ Import Wizard. Implementing Universe Life Cycle Management—Learner’s Guide 111 . ensure that you clear the Overwrite connection contents checkbox on the Incremental import screen. 3.1 system as the destination environment. 8. Specify the objects that you wish to copy from the test environment to production. Click Next.9. the dialog box displays a summary of the import. 9. Start the Import Wizard. Follow the wizard instructions.

e. an administrator was able to create separate domains for development. select the Overwrite universe contents check box.unv. but using the folder structure method does have its limitations. Folders are a lower-cost alternative to multiple CMS deployments. 2. Using test folders In previous versions of BusinessObjects. select Import universes. the connections that the selected universes rely on are not imported. If you choose to not overwrite universes connections. On the Import scenario screen. and is not widely seen as a best practice.0/3.1. the designer moves the universe to production: \Production\Motors.unv. select Import all universes and only connection objects used by these universes. On the Import options for universes and connections screen. On the Select objects to import screen. Start the Import Wizard. To ensure that you don't overwrite any objects or object rights. and production. and the universe connections that exist on the destination environment are not touched. 7. When development of the Motors universe is complete. 3. to provide a logical grouping of universes within one CMS. select the Overwrite connection contents check box. 5. The Import Wizard imports the universes that you selected to the destination environment. Select Start ➤ Programs ➤ BusinessObjects XI 3. clear the Overwrite object contents and Overwrite object rights check boxes. b. If you want to update a universe that already exists on the destination environment. The Motors universe has been saved and exported to a development folder: \Development\Motors. If you want to update universe connections that already exist on the destination environment. and what you want the Import Wizard to do if it finds an object that already exists on the destination environment. A number of reports have been created based on the Motors universe in the Development folder. Domains could be located on different repository systems.1 ➤ BusinessObjects Enterprise ➤ Import Wizard. The XI architecture no longer works with the concept of universe domains. On the Increment import screen: a. 4. Specify the source and destination environments. Universes can be separated into folder or category structures instead. Click Next to continue. ensure that it is cleared. c. 6. 112 Advanced Universe Design—Learner’s Guide . specify whether you want to match by CUID or name and path. Specify whether you want to overwrite the universe connections on the destination. quality assurance. Complete the import process. Lets take the following scenario. The relationships between the universes and the universe connections are maintained. d. If the Overwrite group and user membership check box appears.

quality assurance. and production in the same repository with the same CUID in different locations. The end user may receive an error message. Copying a universe provides it with its own CUID. quality assurance. This is due to the rule that there can only be a single instance of an object with its CUID in a repository at one time. and production. but also relates to changes in the O/S. It is important to ensure that the designer moves. but do have access to the Production folder. It looks for the universe initially stored in the Development folder. each have to use separate repositories. the universe from development to production. This way you cannot have development. not copies. and other server maintenance changes that have to be tested prior to going into production. quality assurance. Reports created against the development universe can not be refreshed against the production universe. • Security to universes is applied at folder level rather than per individual universe file. and production systems. security patches. Separate servers are also recommended as life cycle management is not only based on changes in the BI content. the document looks for the correct data provider using a unique ID assigned to the universe. Implementing Universe Life Cycle Management—Learner’s Guide 113 .When a user accesses a report. then the universe from the Production folder is used. and produces two different versions of the universe in production and development. If you want to retain the CUIDs and have separation between development. Use test folders only if: • It is not possible to implement multiple CMS environments. Life cycle management recommendations Recommended industry best practices are to use separate repositories and servers for development. They can edit and refresh the report. If the users do not have access to the Development folder.

Save the report locally as Dev_xx. Create a Web Intelligence Rich Client report based on your Motors universe and explore what happens when the universe is moved and/or copied from the development folder to the production folder. a warning message appears. In Universe Designer go to File ➤ Import to import your Motors universe from the folder it was exported to in the last activity.In the Export Universe menu click Browse. Select your new Development folder and click OK twice to export your Motors universe to this new folder.Use the BIAR file to move all. where "xx" stands for your initials. and import your Motors universe from your Development folder. 15.Right-click the folder specified by the instructor (same location used to create the Development_xx folder) and select New Folder. Check with the instructor for the exact user name to use. Select Move to ensure there is only one version of your Motors universe. as well as in the Central Management Console. 3.Log into Universe Designer with the login name used throughout the course (the same login name used in step 1). 14. 10. 12. or incremental loads from one environment to another. 8. Log into Web Intelligence Rich Client with the sales user. where "xx" stands for your initials.wid file.Name the folder Production_xx. Name the folder Development_xx. 6. 2. 114 Advanced Universe Design—Learner’s Guide . 9. Folders can be created directly in Universe Designer. Click File ➤ Export. Add the Client Name and Sales Revenue objects to the report. In the Export Universe menu click Browse. Create a new Web Intelligence Rich Client document using your Motors universe from your Development folder. 7. 13. In this activity the folders are created in Universe Designer. Activity: Moving content from development to production Objective • Use test folders Instructions Create two new folders: Development and Production. 5. where "xx" stands for your initials. 4. Right-click the folder specified by the instructor and select New Folder. As your universe was exported in the previous activity. 1. Click File ➤ Export. 11.

Export your universe to your new Production folder. Although your universe is in a new location the CUID has been retained and your report can refresh correctly. The copy of your universe in your Development folder has been given a new CUID.16. 20. Check with the instructor for the exact user name to use. Note: The location the original Motors universe is now exported and is not accessible to the sales user. 25. Use the same user name that was used in step 5 and step 10. Implementing Universe Life Cycle Management—Learner’s Guide 115 . and a copy of the same universe is created in your Development folder.Open your Dev. The report can not be refreshed against this universe. A warning message appears.wid file.Export your Motors universe file (previously located in your Production folder) to the folder location specified by the instructor.Select Move to ensure there is still only one version of your Motors universe. and verify that you can edit the query.Select the Copy option. 27.Import your Motors universe from your Production folder. Click File ➤ Export. Check with the instructor for the exact user name to use. and the test sales user has no access to the other universe location.Log into Web Intelligence Rich Client with the sales user. Refresh the data.Open your Dev. 21. The original version of your Motors universe file remains in your Production folder.wid file. 18. 22.In the Export Universe menu click Browse. 23. 19. 26.Log into Web Intelligence Rich Client with the sales user. and export your universe to your Development folder. Refresh the data.Log into Universe Designer with the login name used throughout the course (the same login name used in step 1 and step 6). Use the same user name that was used in step 5. and verify that you can edit the query. 17. 24.

True or False. True or False. True or False. The Import Wizard acts as a bridge between the source repository and target repository. 3. It can promote content between clusters on the same network (LAN or WAN).0/3. It also lets you specify what you want the wizard to do when it finds that an object already exists on the destination environment. When using the Import Wizard to promote an object from one BusinessObjects Enterprise XI 3. When importing documents from a BIAR file. 2. 116 Advanced Universe Design—Learner’s Guide .Quiz: Implementing universe life cycle management 1. the wizard allows you to use either the objects CUID or its name and path to determine whether the object already exists on the destination environment.1 deployment to another. or the CMS database. both the universe name and path are used for finding dependent documents.

you are now able to: • Move content from development to production Implementing Universe Life Cycle Management—Learner’s Guide 117 .Lesson summary After completing this lesson.

118 Advanced Universe Design—Learner’s Guide .

After completing this lesson. As a designer you can apply several parameters that are universe based or data access specific in order to maximize the potential of a universe. you must maintain the universe to ensure that it continues to function correctly and provide the reports with accurate results. you will be able to: • Optimize universes • Apply foreign key index awareness • Apply best practices for universe design Maintaining and Optimizing Universes—Learner’s Guide 119 .Lesson 7 Maintaining and Optimizing Universes Lesson introduction After you have completed the universe and then deployed it to the end-user population in your organization for report creation.

The cs.sbo.sbo.prm.0/3.cfg file is stored at the root level for the Connection Server: C\Program Files\Business Objects\BusinessObjects Enterprise 12.cod) can be found in the installation directory: C\Program Files\Business Objects\BusinessObjects Enterprise 12.stg. The Connection Server and the required data access components are automatically installed when you install BusinessObjects products. <driver>. <driver>.0/3. together with a look at other performance enhancing parameters that can be specified in the BusinessObjects product suite.prm. Desktop Intelligence Report Server. <driver>. Data access drivers (<driver>.1 Designer 's Guide and the for more information on the individual data access files (<driver>.Optimizing universes As a designer you can apply several parameters that are universe based or data access specific in order to maximize the potential of a universe. • Describe data access files and connection parameters • Set up a trace file • Use BusinessObjects dynamic SQL parameters The Connection Server Data access is managed by the Connection Server. <driver>.CFG file Using the cs.stg.0\win32_x86\dataAccess\connectionsServer\<RDBMS> Note: Refer to the BusinessObjects XI 3. <driver>. The CS.cfg file you can set trace parameters that allow the recording of connection activity through the Connection Server in log files. In the BusinessObjects XI 3.0\win32_x86\dataAccess\connectionsServer 120 Advanced Universe Design—Learner’s Guide .1: Universe Design course you looked at how you can set specific parameters when creating a new universe or via File ➤ Parameters menu.cod). <driver>. and Web Intelligence Job Server which allow these services to query the database directly without communicating with the Connection Server service. The Connection Server is the Business Objects connection engine that creates and manages connections used by universes between Business Objects data access drivers and the target RDBMS middleware.cfg file is a data access general configuration file in XML format that contains default configuration parameters that apply to all data access drivers. The cs. The Connection Server libraries are present on the Web Intelligence Report Server. This unit looks at a more in depth insight into the parameters that can be set in the Universe Parameters ➤ Parameters menu.

Maintaining and Optimizing Universes—Learner’s Guide 121 . and Web Intelligence Rich Client: 1. The BO_trace.ini file is the core trace file that defines how the trace is generated and which level is required. the cs. keep = true.ini file should consist of these parameters: active = true. once for each of the following variables: • BO_TRACE_CONFIGDIR is the path of the folder containing the bo_trace. You need to repeat this three times.ini file • BO_TRACE_CONFIGFILE is the complete path of the bo_trace. Thus. using this file is mandatory to get any trace files. Open the cs. when editing and/or modifying the XML file. • == and <= does capture SELECT statements to data source only (universe connection). the BO_trace. To trace the full-client BusinessObjects products Follow these steps to get a SQL trace from full-client BusinessObjects applications. • >> and >= does not capture any SELECT statements.cfg file in an XML editor. size = 10000. • << captures everything. Ensure that.ini C:\ 2. Go to Control Panel ➤ System ➤ Advanced ➤ Environment Variables and click on the New button to create a new system variable. Set the System Environment variables. including SQL communication with the CMS.cfg file is located in C\Program Files\Business Objects\BusinessObjects Enterprise 12.ini file can be located in: C\Program Files\Business Objects\BusinessObjects Enterprise 12. Setting up a trace file The BO_trace. importance = '<<'. The cs.0\win32_x86\dataAccess\connectionsServer.cfg file is in the same directory. The Document Type Definition (DTD) file that relates to each element used in the cs.Note: The cs. Desktop Intelligence. like Universe Designer.cfg file is an XML file. For the purposes of generating the SQL trace.0\win32_x86\scripts.ini file • BO_TRACE_LOGDIR is the path of the folder where the log files are saved For example: Variable Name BO_TRACE_CONFIGDIR BO_TRACE_CONFIGFILE BO_TRACE_LOGDIR Variable Value C:\ C:\BO_trace. including SQL traces.dtd is available.

5. and all of the SQL statements that are going to the database. Click Save. and ODBC access drivers are traced: <Traces ClassID="csTRACELOG" Active="Yes"> <Trace Name="MiddleWare" Active="Yes"> <Trace Name="Oracle" Active="Yes"/> <Trace Name="Sybase" Active="No"/> <Trace Name="Informix" Active="No"/> <Trace Name="Teradata" Active="Yes"/> <Trace Name="DB2" Active="No"/> <Trace Name="DB2/iSeries" Active="No"/> <Trace Name="ODBC2" Active="Yes"/> <Trace Name="ODBC3" Active="Yes"/> <Trace Name="OLEDB" Active="No"/> </Trace> </Traces> 4. The SQL statements are inserted into the client log file itself. Connection pool mode There are three connection pool mode options: 122 Advanced Universe Design—Learner’s Guide . Note: You can specify a subset of access drivers that you want to trace. • Login time-out. • Array fetch size. The connection configuration page contains parameters used to optimize a universe: • Defining the duration of a connection into a pool. • Defining the size of the array fetch. When now launching a BusinessObjects client module. you generate a log file that contains information regarding internal functions. • Defining how BusinessObjects products respond when database resources are not available.3. Navigate to the <Traces> XML element and set <Traces ClassID="csTRACELOG" Active> equal to Yes. BusinessObjects allows you to filter the SQL statements according to the database type you want to trace. Query time can often be shortened by optimizing a universe. Connection configuration parameters When creating or editing a new connection you can set certain parameters to optimize the connection against the database in use. Save the changes. In the following example. Restart the services in the Central Configuration Manager (CCM). • Array bind size. Oracle. You can set the following configuration parameters: • Connection pool mode. Teradata.

The default value is 20. If you enter 1. Five fetches of 20 rows each equals 100 rows of data. Array fetch size Specifies the maximum number of rows authorized with each fetch. You must also enter a value for the number of minutes. the more rows (n) can be loaded in one operation. the faster your rows are retrieved. ensure you have adequate client system memory. Keep the connection active for Keep the connection active during the whole session (local mode only) Check this box if you want your connection to stay active during the entire session of the product. it is transmitted to the database. Users have to reconnect each time they want to access data. The connection ends when the user exits the application. Pool timeout If you select Keep the pool active for in the previous field. Note: If a query retrieves data containing blob or long text types. the array fetch is automatically reset to 1. Maintaining and Optimizing Universes—Learner’s Guide 123 . Note: Deactivating array fetch is the safest way of retrieving your data but row-by-row retrieval slows down server performance. the array fetch is deactivated and data is retrieved row by row. The bind array is the area in memory where the Connection Server stores a batch of data to be loaded (sent to the repository). Check this box if you want your connection to stay active for a defined period of time. the connection executes 5 fetches to retrieve your data. This is the default Pool timeout value. and the better your performance. The greater the value in the Array fetch size option. When the bind array fills. Array bind size Specifies the size of the bind array that the Connection Server uses before sending to the repository.Pool mode option Description Disconnect after each transaction Check this box if you want your connection to disconnect immediately after the transaction is completed. Login time-out Specifies the number of seconds that must be spent to establish a connection before an error message is displayed. Generally. If you enter 20. the larger the bind array. this parameter specifies the length of time to keep the connection open. and your query retrieves 100 rows. you must. however.

including memory. For example you can use a parameter like: ConnectInit = Begin DBMS_SESSION. processors. the PDQPRIORITY environment variable determines the degree of parallelism that the database server uses and affects how the database server allocates resources. or BusinessObjects administrator.END.COMMIT. This can be used to set database-specific parameters used for auditing purposes. These parameters should only be modified by an advanced user. it is possible to send commands to the database when opening a session.SET_IDENTIFYER('@variable('BOUSER')'). ConnectInit = SET OPTIMIZATION FIRST ROWS The ConnectInit parameter can be useful for: • Auditing: Using the ConnectInit parameter. These statements are not parsed and should therefore be carefully set. you can set the following variables: BO username: @variable('BOUSER') Universe name: @variable('UNVNAME') Document name: @variable('DOCNAME') Data provider name: @variable('DPNAME') Data provider type: @variable('DPTYPE') • Query Banding: Some Relational Database Management Systems (Teradata for example) can provide a query band (like banding a bird to track its flight path) with each query. The following outlines a few parameters options that can be set: • ConnectInit • Hint ConnectInit This parameter is used to declare database specific session statements when the connection is established. Parameters set in this menu are database specific. as you can monitor the session_id and user that is accessing the universe. The Custom Parameters menu contains certain parameters that can be used to override connection settings. and disk reads. • • • • • For auditing purposes. DBA. The band can contain any 124 Advanced Universe Design—Learner’s Guide . For example: ConnectInit SET PDQPRIORITY HIGH For Informix Dynamic Server. An example Oracle database syntax is shown below: ConnectInit ALTER SESSION SET CURRENT_SCHEMA = @variable('BOUSER') It can also be used with Informix Dynamic Server to add SQL statements to a connection that are executed once the connection is opened.Custom connection parameters You can also add custom connection parameters in the Custom Parameters menu. The syntax is defined in the universe Custom Parameters menu.

and used by the Oracle optimizer to choose an execution plan. and how they can be used to optimize queries. immediately after the comment delimiter. business intelligence (BI) tools and new Web service applications. Using the ConnectInit parameter. you can specify the number of seconds that must be spent to establish a connection before an error message is displayed. and the policies are automatically applied whenever a user accesses data. You should consult your Oracle documentation for full information on the Hints that can be used. Scans table by rowid. For example. such as traditional session pool applications. Optimizes response time. You enter the value for a Hint as a comment. or synonyms. analytic applications using pooled sessions.. Hint (Oracle only) A hint is commented information that is embedded in a query. • Setting session specific database parameters: Depending on the RDBMS used you can set session specific database parameters. • Enforcing Oracle Virtual Private Database: Oracle Virtual Private Database enforces security. there is no way to bypass security. Query banding is especially valuable for applications that send work through pooled sessions. Consult your Oracle documentation for a full list: Hint FIRST_ROWS What it does.. Performs a full table scan on the table. directly on database tables. views. Because you attach security policies directly to these database objects. to a fine level of granularity. and triggers. with no space between the comment delimiter and the plus sign: /*+ <hint> */ Some useful hints that you can use are as follows. you can use the SET Database Object Mode statement to change the filtering mode of constraints of unique indexes. with Informix Dynamic Server. or to enable or disable constraints. RULE FULL ROWID Maintaining and Optimizing Universes—Learner’s Guide 125 .number of attributes and values that provide detailed information about the query and may be referenced by workload management rules during the query classification phase. Use rule-based optimization and not cost. indexes. A plus sign is used at the beginning. You can use query banding to aqcuire information useful for workload management or tracking the use of the data warehouse.

To edit a dynamic SQL parameter 1.CLIENT_ID FROM CLIENT Dynamic SQL parameters Each data access driver is associated with a SQL parameters file (<driver>. These parameters apply only to the current universe. On the Custom Parameters page. and click Finish. The selected parameter is displayed in the Property Name field together with the parameter default value in the Value field. and are accessible only from the universe. Type /* + FIRST_ROWS */ in the values box. 4. These dynamic SQL parameters are saved in the ..prm file affect all universes through their middleware connection. so universes using the same data access driver can have different SQL generation behavior. SQL parameters common across RDBMS are now modified within an individual universe. 2. and in the Online Help option in Universe Designer. 5. An example of the FIRST_ROWS parameter is outlined below: 1. 2.prm). INDEX_FFS Perform a fast full scan on the index rather than on the table. click Hints. 3. The Parameter dialog box opens showing the SQL parameters.1: Designer's Guide. Select File ➤ Parameters ➤ Parameter from the toolbar menu.. and functions. Open your universe in Universe Designer. 126 Advanced Universe Design—Learner’s Guide . Click OK to close the Parameter dialog box.unv file. date and other operators. Select the appropriate parameter to edit.0/3. This PRM file contains default SQL parameters used for query generation. The PRM file is still used for many RDBMS specific SQL and connection parameters.Hint What it does. Note: Information on Dynamic SQL parameters can be found in the BusinessObjects XI 3. however. all parameters set in the <driver>. As the PRM file is associated with the data access driver. The SQL generated in the client tool looks similar to this: SELECT /* + FIRST_ROWS */ CLIENT. Change the value as required and click Replace to apply the changes. 3.

• BEGIN_SQL • END_SQL • ANSI92 and FILTER_IN_FROM • JOIN_BY_SQL BEGIN_SQL SQL statements can be prefixed with the BEGIN_SQL parameter. or when the system has to be stopped for maintenance reasons. and can also be useful in a situation where a long running query must be terminated. This function works with any database that supports passing parameters before the SELECT statement. By using a parameter like @variable('BOUSER'). Variables that can be used are: • • • • • BO username: @variable('BOUSER') Universe name: @variable('UNVNAME') Document name: @variable('DOCNAME') Data provider name: @variable('DPNAME') Data provider type: @variable('DPTYPE') Maintaining and Optimizing Universes—Learner’s Guide 127 . • Netezza: The BEGIN_SQL parameter can be used to trigger optimization options. This can aid system optimization. the DBA can clearly see who sent the query with what results. END_SQL The End_SQL parameter is used to append a string to the SQL sent to the database each time a query is run. • Oracle: The BEGIN_SQL parameter can be used to turn on read-only transactions.Adapting dynamic SQL parameters This section looks at some of the more common dynamic SQL parameters used and how changing their default values can influence the BusinessObjects interface and behavior. This ensures that the orders are executed before all generated SQL statements. The End_SQL parameter allows designers to input variables. The following are some examples of use: • Terradata: The BEGIN_SQL parameter can be used to monitor and manage database usage based on query origin details provided within the executed SQL. The BEGIN_SQL parameter can be configured to insert SQL orders that are executed before BusinessObjects-generated SQL statements. This parameter is useful for query banding and auditing. DBAs often need to monitor query usage.

REGION_ID=CLIENT.ANSI92 and FILTER_IN_FROM If a query uses a condition object or a quick filter the selected values for this restriction are still displayed in the WHERE clause. but the REGION. REGION.CLIENT_FIRSTNAME.CLIENT_LASTNAME + '.REGION_ID) WHERE REGION. The FILTER_IN_FROM parameter determines if query conditions are included in the FROM clause. but any query filters and restrictions remain in the WHERE clause. query filters are still generated in the WHERE clause instead of in the FROM clause: SELECT CLIENT. ' + CLIENT. 128 Advanced Universe Design—Learner’s Guide . ' + CLIENT. These types of WHERE clause restrictions can be moved to the FROM clause.REGION_NAME In ('East'. moves the WHERE clause conditions seen in the previous section to the FROM clause. and No. standard SQL is generated. REGION. REGION.REGION_NAME In ('East'. FILTER_IN_FROM: Yes Setting the FILTER_IN_FROM parameter to Yes.REGION_NAME.REGION_ID) WHERE REGION. FILTER_IN_FROM: No As seen in the above example. the default ANSI92 SQL generation takes place.CLIENT_ID) FROM CLIENT INNER JOIN REGION ON (REGION. As with the ANSI92 parameter.CLIENT_LASTNAME + '. Note: This parameter only works in conjunction with the ANSI92 parameter.REGION_ID=CLIENT. either as a dynamic SQL parameter.'North') GROUP BY CLIENT. All joins are placed in the FROM clause. or set in the PRM file. or in case ANSI92 is set.'North') GROUP BY CLIENT. In the example below a filter on Region is placed in the query. count(CLIENT.CLIENT_FIRSTNAME.'North') restriction is placed in the WHERE clause. the FILTER_IN_FROM parameter has two settings: Yes.REGION_NAME In ('East'. and the SQL is generated as: SELECT CLIENT.REGION_NAME.CLIENT_ID) FROM CLIENT INNER JOIN REGION ON (REGION. count(CLIENT.CLIENT_FIRSTNAME.CLIENT_LASTNAME + '. REGION. ' + CLIENT.CLIENT_FIRSTNAME.REGION_NAME The joins are generated in the FROM clause.CLIENT_LASTNAME + '. ' + CLIENT. This can be achieved be altering the setting for the FILTER_IN_FROM parameter.REGION_NAME When set to No.

REGION_NAME.CLIENT_LASTNAME + '. the generated SQL looks like this: With the FILTER_IN_FROM parameter set to Yes. ' + CLIENT.SALE_QTY * MODEL.MODEL_ID=MODEL. with the Sale_Type = 'S' join restriction placed in the FROM clause: SELECT CLIENT.REGION_NAME) Note: By changing the FILTER_IN_FROM parameter to Yes. which can help decrease the quantity of data parsed by the database. this parameter is applied to the whole universe. a query with Client Name.CLIENT_FIRSTNAME. and Sales Revenue produces the following SQL.SALE_ID AND SALE.MODEL_PRICE * ((100 SALE.SALE_ID=SALE_MODEL.SALE_DISCOUNT) / 100)) FROM MODEL INNER JOIN SALE_MODEL ON (SALE_MODEL.REGION_ID) GROUP BY CLIENT. ' + CLIENT.CLIENT_ID=SALE.CLIENT_FIRSTNAME. About ANSI92 SQL syntax The ANSI92 syntax moves join references from the WHERE clause to the FROM clause.MODEL_ID) INNER JOIN SALE ON (SALE. Maintaining and Optimizing Universes—Learner’s Guide 129 . The SQL displays the table joins as INNER JOIN references in the FROM clause. Region. REGION. ' + CLIENT.CLIENT_LASTNAME + '.COUNTRY_NAME.CLIENT_ID) INNER JOIN REGION ON (REGION. The FILTER_IN_FROM functionality can however be applied to individual classes and objects. COUNTRY_REGION. sum(SALE_MODEL.When the end user creates a new Web Intelligence Rich Client report using Client Name.REGION_ID=CLIENT.SALE_TYPE='S') INNER JOIN CLIENT ON (CLIENT. For example: SELECT CLIENT. REGION.CLIENT_FIRSTNAME. Region. with a quick filter applied to Region.CLIENT_LASTNAME + '.

count(CLIENT.CLIENT_FIRSTNAME. and the same query outputs the following SQL statement: SELECT CLIENT. the ANSI92 setting is applied on all universes that access the same middleware connection. COUNTRY COUNTRY_REGION WHERE (COUNTRY_REGION.CLIENT_LASTNAME + '.COUNTRY_ID=CLIENT. count(CLIENT.CLIENT_LASTNAME + '. ANSI92: No With the ANSI92 parameter set to No.COUNTRY_ID) GROUP BY CLIENT.COUNTRY_ID) GROUP BY CLIENT.COUNTRY_NAME. and Number of Clients is as follows: SELECT CLIENT.COUNTRY_NAME For databases that support ANSI92 SQL syntax. ' + CLIENT. COUNTRY_REGION. The ANSI92 dynamic SQL parameter The ANSI92 parameter allows ANSI92 SQL syntax to be used in query generation. The SQL output for a query using Client Name.CLIENT_ID) FROM CLIENT. ' + CLIENT. If in the PRM file. The parameter has two possible setting: Yes. Region. ' + CLIENT.COUNTRY_ID=CLIENT. the ANSI92 parameter is automatically applied at data access driver (<driver>. Note: Remember that the PRM file is a system file and should be used/adapted responsibly. If you want to only apply ANSI92 syntax to selected universes.CLIENT_FIRSTNAME. SQL generation behaves according to the OUTER_JOIN_GENERATION parameter in the PRM file. The PRM file contains the following parameter that is set to ANSI92: <Parameter Name="OUTERJOINS_GENERATION">ANSI_92</Parameter> As the PRM file is accessed via the connection. COUNTRY_REGION.COUNTRY_NAME. It enables complete left. right.CLIENT_ID) FROM CLIENT INNER JOIN COUNTRY COUNTRY_REGION ON (COUNTRY_REGION.CLIENT_LASTNAME + '. standard SQL output is generated. 130 Advanced Universe Design—Learner’s Guide .COUNTRY_NAME ANSI92: Yes By setting the ANSI92 parameter to Yes. COUNTRY_REGION. ' + CLIENT.prm) level. and No.CLIENT_FIRSTNAME.CLIENT_FIRSTNAME.CLIENT_LASTNAME + '. join references are moved from the WHERE clause into the FROM clause. Ensure that a backup version is available to restore the defaults if changes have been applied. COUNTRY_REGION. and full outer join support in the universe. the option in the PRM file needs to be set to No: <Parameter Name="OUTERJOINS_GENERATION">NO</Parameter> The ANSI92 dynamic SQL parameter can instead be set to Yes directly in the universe. the OUTER_JOIN_GENERATION parameter is set to No.

count(CLIENT. In the Advanced Join Properties dialog box you can determine which classes and objects are included in the FROM clause in the generated SQL.CLIENT_FIRSTNAME. COUNTRY_REGION.COUNTRY_ID=CLIENT. When the ANSI92 parameter has been set to Yes. Note: In order to apply the FILTER_IN_FROM functionality to individual classes and objects.COUNTRY_ID) GROUP BY CLIENT.CLIENT_LASTNAME + '. FILTER_IN_FROM dynamic SQL parameter needs to be set to No. or when the PRM file has ANSI92 set as the default. ' + CLIENT. Applying the FILTER_IN_FROM functionality to individual classes and objects The FILTER_IN_FROM can be applied to individual classes and objects via each universe join.. the Advanced button in the Edit Join dialog box of each universe join becomes active. Maintaining and Optimizing Universes—Learner’s Guide 131 .CLIENT_ID) FROM CLIENT INNER JOIN COUNTRY COUNTRY_REGION ON (COUNTRY_REGION.COUNTRY_NAME The structure now shows the join references in the FROM clause using INNER JOIN references.

The standard ANSI92 rules are applied and if a quick filter is used in the query. • No objects in FROM: When applied. You can select the individual classes and objects. all classes and objects that are associated with this join are greyed out and can not be selected. To apply FILTER_IN_FROM functionality to individual classes and objects 1. 4. If a quick filter is applied to an object that was not selected. the generated SQL displays the filter results for that object in the WHERE clause. 132 Advanced Universe Design—Learner’s Guide . the generated SQL displays the filter results in the WHERE clause. Note: The classes and objects remain greyed out in the Advanced Join dialog box. • All objects in FROM: When applied. 3. Select File ➤ Parameters ➤ Parameter. If a quick filter is applied to a selected object. Change the default value for the ANSI92 parameter to Yes. 2. any condition/quick filter applied to the objects associated with this join are included in the FROM clause. Ensure the FILTER_IN_FROM parameter is set to No. all classes and objects that are associated with this join are greyed out and can not be selected. the classes and objects in the Advanced Join dialog box are activated. Double-click a join in the Structure pane. • Selected objects in FROM: When applied. the generated SQL displays the filter results for that object in the FROM clause. the generated SQL displays the filter results in the WHERE clause. The standard ANSI92 rules are applied and if a quick filter is used in the query.You can specify the following: • Default behavior: When applied. 5. Open your universe file in Universe Designer. The Edit Join properties open for the selected join.

Note: This button is active only if the ANSI92 dynamic SQL parameter is set to Yes or when the PRM file has ANSI92 set as the default. The Advanced Join Properties dialog box opens. Click the Advanced button.6. Maintaining and Optimizing Universes—Learner’s Guide 133 .

8. Select the appropriate classes and objects.7. 134 Advanced Universe Design—Learner’s Guide . Select the appropriate option from the behavior drop-down list.

it requires running across two contexts.9. When the query is based on an Oracle data source. this has double impact on the entire system sending a total of 20.000 rows in your final report. The JOIN_BY_SQL parameter The JOIN_BY_SQL parameter combines split queries into one sentence and makes the database calculate the union. Each context generates one query and each query result set is sent back to the microcube. Fewer rows travel the network and as the microcube no longer needs to merge the data. Maintaining and Optimizing Universes—Learner’s Guide 135 . The end result is the same. The default behavior generates two separate queries for each context. Each separate result set or SQL statement is processed sequentially by the RDBMS. Example scenario: Using the Motors universe. especially if the requested query needs to process several SQL statements. Merging data this way has a high impact on the network and Enterprise server performance. JOIN_BY_SQL generated SQL The generated SQL for the JOIN_BY_SQL functionality may differ depending on the RDBMS you are connecting to. The NVL function lets you substitute a value when a null value is encountered. Split queries happen when requesting measures over multiple contexts. The syntax for the NVL function is as follows: NVL(string1. if in a query you need information on car sales and rental revenue. there is less impact on the BusinessObjects Enterprise server.000 rows of car sales information. The JOIN_BY_SQL parameter can also help in taking advantage of the RDBMS ability to generate derived tables and the full outer join SQL. Applying the JOIN_BY_SQL parameter moves the data UNION processing from the BusinessObjects Enterprise server to the RDBMS. Use of this parameter can improve performance depending on how well your RDBMS is set up. this parameter can be used for universes through Crystal Reports.Repeat steps for other joins in the schema. sales and rentals.000 rows of data across the network. Despite generating at least two SQL flows.000 rows of car rental information. 10. On some databases there is the possibility to force the generation of a single flow of SQL from the universe by setting the JOIN_BY_SQL = Yes. The returned result sets subsequently need to be merged by the microcube into a final report result set. and the Enterprise server synchronizes them to display 10. the SQL generated uses NVL to display the dimensions common to both sets of queries. Click OK to apply the changes. Finally. there is only one global SQL flow. replace_with) Where string1 is the string to test for a null value and replace_with is the value returned if string1 is null. The microcube makes the final union and presents the data in the report as one result set. Multi-flow SQL cannot be applied for Crystal Reports. This can slow down response time. Assuming the query returns 10. and 10.

and Number of Cars Sold objects to the Result Objects pane. Drag the Client Name. 4. 6. Click Replace to apply the changes. 9. Log out of Web Intelligence Rich Client. 2. Click View SQL to see the results.. 136 Advanced Universe Design—Learner’s Guide . Select File ➤ Parameters ➤ Parameter.. select FileImport to import your universe.n]) Where expression is an expression of any type and n is a placeholder indicating that multiple expressions can be specified. 8.. The end result is the same.. Create a new Web Intelligence Rich Client document based on your Motors universe. Save the changes locally. If all arguments are NULL. The COALESCE function returns the first non-null expression among its arguments. 5. The syntax for COALESCE is: COALESCE(expression [. COALESCE returns NULL.n]) is equivalent to the following CASE statement: CASE WHEN (expression IS NOT NULL) THEN expression1 . Number of Clients. The query generates two statements.. Locate the JOIN_BY_SQL parameter and change this to Yes. Launch Universe Designer and open your Motors universe file. Note: The universe was exported in the previous lesson. WHEN (expression IS NOT NULL) THEN expressionN ELSE NULL Activity: Using dynamic SQL parameters Objectives • Apply the JOIN_BY_SQL parameter • Apply the END_SQL parameter • Apply the ANSI92 and FILTER_IN_FROM parameters Instructions: Apply the JOIN_BY_SQL parameter 1... The Parameter dialog box opens. Click OK to close the Parameter dialog box. the SQL generated uses COALESCE as NVL is not supported. Note: The COALESCE syntax COALESCE(expression [.When the query is based on a MS SQL Server data source. 7. 3. All expressions must be the same type or must be implicitly convertible to the same type..

12. With your Motors universe open in Universe Designer. Sales Revenue. What has happened to the results? 13. 9. 10. @variable('UNVNAME'). @variable('DOCNAME'). Instructions: Apply the END_SQL parameter 1. Run the query and return to the Query Panel by editing the query. 8. 11.Log out of Web Intelligence Rich Client. The generated SQL appears in the SQL Viewer. When viewing the SQL after running the query. select File ➤ Parameters ➤ Parameter. The parameter syntax for END_SQL is now modified.View the SQL. Click OK to close the Parameter dialog box. Maintaining and Optimizing Universes—Learner’s Guide 137 . 7. The Parameter dialog box opens. 2. . With your Motors universe open in Universe Designer. The last line in the SQL contains the syntax added to the END_SQL parameter in the Parameter dialog box. Save your universe locally. @variable('DPNAME'). In the Value box add the following syntax: /*@variable('BOUSER'). 2.10. Click the View SQL icon. Note: The END_SQL parameter in the universe properties allows you to insert a string at the end of the SQL generated by a query.Drag the Client Name. Instructions: Apply the ANSI92 and FILTER_IN_FROM parameters 1. The variables are stated in a comment field and evaluated when running a query. 6. @variable('DPTYPE')*/ 4. Locate the END_SQL parameter. select FileParametersParameter and change the ANSI92 parameter to Yes. The Parameter dialog box opens. select File ➤ Parameters ➤ Parameter. 5.Launch Web Intelligence Rich Client and create a new document based on your Motors universe. 3.Click View SQL to see the results. Test the results in Web Intelligence Rich Client. 3. The END_SQL was executed at query run time. you can see that the variable values are populated. and Rental Revenue objects into the Result Objects pane. The query is generated with the explicit sentence. Click Replace. Locate the ANSI92 parameter and change this to Yes. Run a query with Showroom and Sales Revenue.

Is the Client Name condition showing up in the FROM clause? 15. 24.View the SQL.Return to Universe Designer and open your Motors universe file. Choose the Selected objects in FROM option. The SQL statement contains the INNER JOIN statements and there is no longer a WHERE clause generated. 11. 6.Remove the filter and apply a Quick Filter on the Client Name object and select a few values from the list. Click Replace and then OK. 9. 14.4.Remove the filter and drag in the Area Code detail object.View the SQL. Click OK twice. and select the values East and North.View the SQL. 5.Click View SQL to see the results. 22. 8.Change all altered parameters in your universe back to their default settings (END_SQL.Click OK to close the Parameter dialog box. 20.Change the FILTER_IN_FROM parameter to Yes. Double-click the join between the CLIENT and the REGION tables. Is the Region object condition showing up in the FROM clause? 13. 12. 16.Launch Web Intelligence Rich Client and create a new report with Client Name. 18. 21.Apply a second Quick Filter on the Area Code object and select the values 10011 and 10012. Region. Add a quick filter on Region. 25. 10.Apply a Quick Filter on the Region object and select the East Coast value.Create a new Web Intelligence Rich Client report with the Client Name and Region objects. Apply a Quick Filter on the Region object and select a few values from the list.Log out of Web Intelligence Rich Client. What is happening with the WHERE and FROM clauses? Why is this happening? 19. 7.Save your universe locally. Click Replace. Note: All detail objects below the Client Name are NOT selected. ANSI92. 17. Select the Region and the Client Name objects only. Click Advanced. and FILTER_IN_FROM). 23. and Sales Revenue. 138 Advanced Universe Design—Learner’s Guide . JOIN_BY_SQL.

Universe Designer can apply the filter directly on the fact table by using the dimension table foreign key. The generated query uses the key value instead of the actual column value.Applying index awareness The BusinessObjects XI 3. and how Universe Designer takes advantage of primary and foreign keys that may already exist in the data source. an integer) that is not meaningful to the end user. Universe Designer retrieves only one unless it is aware that each customer has a separate primary key. The objects that you create in the universe are based on database columns that are meaningful to an end user. Universe Designer can apply the filter directly on the fact table by using the dimension table foreign key. you will be able to: • Understand foreign awareness • Set up foreign key index awareness What is index awareness? Index awareness is the ability to take advantage of the indexes on key columns to speed data retrieval. In Universe Designer you can apply primary and foreign key index awareness: • Primary key index awareness: by applying primary key index awareness on an object Universe Designer can substitute the object's column value with the associated index value.0/3. If two customers have the same name. When you set up index awareness in Universe Designer. This eliminates unnecessary and costly joins to dimension tables. After completing this unit. • Foreign key index awareness: by applying foreign key index awareness on an object Universe Designer can restrict the values returned without the need to join the tables. Maintaining and Optimizing Universes—Learner’s Guide 139 . In this situation the customer table typically has a primary key (for example. This unit further explores index awareness by setting foreign key awareness. If you build a query that involves filtering on a value in a dimension table.1: Universe Design course looked at applying primary key index. but which is very important for database performance. This is particularly important in a star schema database. you tell Universe Designer which database columns are primary and foreign keys. Note: Universe Designer does not ignore duplicates with index awareness. For example. This eliminates unnecessary and costly joins to dimension tables. If you build a query that involves filtering on a value in a dimension table. a Customer object retrieves the field that contains the customer name. • Universe Designer can generate SQL that filters in the most efficient way. This can have a dramatic effect on query performance in the following ways: • Universe Designer can take advantage of the indexes on key columns to speed data retrieval.

By defining the foreign key in the Client Country object. Reducing the number of joins in a query can help improve query performance. FROM CLIENT INNER JOIN REGION ON (CLIENT.COUNTRY_ID In ( 44. The SQL from the primary key index awareness example improved performance by restricting on the primary key (indexed) of the Country_Region table.CLIENT_FIRSTNAME. Avoiding joins in tables With foreign key index awareness. with Client Name in the Result Objects pane. a query in Web Intelligence Rich Client. which both can provide the Country_ID column. 140 Advanced Universe Design—Learner’s Guide . Note: If the FILTER_IN_FROM parameter is also set for the universe. Using this information.CLIENT_LASTNAME +'. FROM CLIENT WHERE ( CLIENT.COUNTRY_ID In ( 44.COUNTRY_ID) WHERE ( COUNTRY_REGION. Universe Designer can restrict the countries without joining to the Country_Region table.CLIENT_FIRSTNAME. you can tell Universe Designer that Country_ID is the primary key of the Country_Region table and that it also appears in the Client table as a foreign key.REGION_ID=REGION. '+ CLIENT. Using index awareness it is possible to remove the Country_Region table from the query completely. '+ CLIENT. instead of in the WHERE clause.CLIENT_LASTNAME +'.REGION_ID) INNER JOIN COUNTRY COUNTRY_REGION ON (COUNTRY_REGION. The example query includes the Client and Country_Region tables. the index awareness condition appears in the FROM clause. This table no longer shows up in the FROM clause.COUNTRY_ID) ) The restricted country name values have been replaced by their respective primary key index value to help increase query performance. restricted on the countries United Kingdom and the United States. The Country_Region table is only needed to satisfy the WHERE clause and is not needed in the SELECT or GROUP BY clauses.COUNTRY_ID=CLIENT. nor in the WHERE clause as a join to the Client table or as a table used to retrieve the condition values from. the same query returns the following SQL: SELECT CLIENT. by telling BusinessObjects to use the Maker table to retrieve Country_ID data from.1 ) ) The Country_Region table is no longer referenced in the SQL. and Client Country in the Query Filters pane.COUNTRY_ID=REGION.1 ) AND (COUNTRY_REGION. produces the following SQL when primary key index has been applied: SELECT CLIENT.For example.

. use the SQL Editor to build the foreign key SQL SELECT or type it directly. Multiple foreign key entries The Keys tab allows more than one foreign key entry. 3. Database designers may denormalize primary key values beyond what is necessary to satisfy constraints or to assist in performance and simplification of SQL generation. This can aid query performance. Right-click the object on which you are setting up index awareness and select Object Properties from the shortcut menu. Click the Keys tab. A key line is inserted in the list of keys box. 2. Select Enable. Click Insert. In the Motors schema you can find such a scenario with the following tables: • Client • Region • Country_Region All three tables contain a Country_ID column. 5. you can give BusinessObjects three choices from which it can retrieve these values for the purposes of restricting data in the WHERE clause. The Edit Properties dialog box displays. This allows you to deal with repeated values in multiple tables (denormalized data). button. To define key awareness for the foreign key: • Select Foreign in the Key Type list. Repeat the steps for all columns in the foreign key and then click OK. Denormalization implies that the database designer has gone beyond this duplication and has more than two instances of the value in a schema. • Click in the Select field and then click the . 4. Maintaining and Optimizing Universes—Learner’s Guide 141 .To set up foreign key index awareness 1. • In the Edit Select Statement dialog box.. If you set up the keys for the Client Country object. 6. It is expected to see an entity repeated twice: initially in the entity’s own table as its primary key and then in a table that refers to this primary key through its foreign key.

Why does BusinessObjects use the Region table and not the Client table? Both tables exist in the FROM clause. REGION. Rearranging the keys by placing the Country_ID key from the Client table last results in the following SQL instead: SELECT CLIENT.44) Note: If a shortcut join has been defined between the Country_Region and Client table. REGION.REGION_ID=CLIENT. however the Region table is used as the Country_ID key replacement. The reason for this is the order in which the foreign keys have been defined.REGION_NAME FROM CLIENT INNER JOIN REGION ON (REGION.REGION_ID) WHERE CLIENT.CLIENT_LASTNAME + '.When running a query in Web Intelligence Rich Client using Client Name and Region objects in the Result Objects pane. The Country_ID key from the Region table was the last one defined in the list and this is the one that is used in the SQL generation. 142 Advanced Universe Design—Learner’s Guide .COUNTRY_ID In (1.COUNTRY_ID In (1. even if the last foreign key defined is the Region key.CLIENT_LASTNAME + '.CLIENT_FIRSTNAME. and the Client Country object in the Query Filters pane.44) The Region table is used to restrict on Country_Region (Country_ID) as it is one of the foreign key entries and the Country_Region table is not used anywhere else in the query and is subsequently dropped from the SQL.REGION_NAME FROM CLIENT INNER JOIN REGION ON (REGION. the SQL generated is as follows: SELECT CLIENT. ' + CLIENT.REGION_ID) WHERE REGION.REGION_ID=CLIENT. ' + CLIENT.CLIENT_FIRSTNAME. this shortcut key takes precedence as the foreign key.

String values need to be appended by "/*" and closed with "*/" 4. Double-click the primary key select statement and append an appropriate string value. Click OK to apply your changes. String values need to be appended by "/*" and closed with "*/" 3. 2. Double-click the primary key select statement and append an appropriate string value. Using an index awareness WHERE clause This section looks at using a WHERE clause for the primary and foreign key. String values need to be appended by "/*" and closed with "*/" 4. Edit the object that has been made index aware and click the Keys tab. To add a string value in the SQL Editor dialog box 1. 2. Click OK to apply your changes. If your target database allows them. SELECT and WHERE clauses for objects. Double-click the foreign key select statement and append an appropriate string value.SQL Editor dialog box The SQL Editor available to the management of index aware is the same SQL Editor dialog box available to predefined conditions. Double-click the foreign key select statement and append an appropriate string value. This may be useful if there is a large amount of data returned for a particular object. String values need to be appended by "/*" and closed with "*/" 3. Edit the object that has been made index aware and click the Keys tab. you can add SQL comments to the primary key and foreign key entries so that they are identifiable in the final query SQL for example: /* Index Awareness Foreign Key */ To add a string value in the SQL Editor dialog box 1. Maintaining and Optimizing Universes—Learner’s Guide 143 . Using a WHERE clause condition in either the primary or foreign key index acts as a data restriction.

for example when naming objects and classes. 144 Advanced Universe Design—Learner’s Guide . you will be able to: • Describe best practices for universe design • Trace universe errors Best practices for designing and optimizing your universe The following section outlines a general workflow of best practices to design an effective universe that meets end users’ needs. Always define cardinality. two methods are often used to place technical comments in the universe where they are not visible for the end user: ○ Just type the text in the universe structure ○ Place comments in SQL. • Insert joins and define cardinalities. After completing this unit. Involve users at every step of the universe design and production process. General best practices • Identify reporting requirements.boxes of objects between /* and */ in: Select and. In general. to avoid cardinality warning messages. • Identify the database schema relevant to the universe you are creating and ensure there is representative data in that schema. Where fields.Applying best practices for universe design As with any project you should always base your universe design and implementation on best practices. Keep the universe business-focused. especially in naming objects (this ensures the terminology is correct). • Lay out your structure window with cardinalities facing the same direction and always arrange tables logically in the structure window. Ensure that the data and structure of that schema is stable and not likely to change dramatically during development without warning. • Add relevant comments to your universe to document up to date universe development changes. understanding how each table relates to rest of the universe. even for self-referencing and self-restricting joins. Remember that you may not be the only person building and designing this universe. and in join definitions. • Build relevant objects. Specify cardinalities manually as opposed to using the Detect Cardinalities option in Universe Designer. This unit summarizes some of the recommended guidelines for universe design. This helps you identify and visualize the context and resolve loops and SQL Traps. not in bulk. • Insert universe tables one at a time.

Base lists of values on lookup tables. 500 objects is the recommended maximum. • Always define help for objects. which speeds up query time by using special tables containing pre-calculated data. This ensures that the SQL is terminated cleanly and that the are no treads left open to the database which are inactive. then end users could experience difficulties in accessing the database. • Consider putting the full class path and object name in the object’s description. ranks and alerters quicker. Use Multi-Dimensional Modeling instead. • Always check integrity.• Do not normalize. Note: A number of databases are licensed on the number of concurrent connections and if a connection is left open for a period of time when the keep connection active for x minutes is enabled. • Dimension. • Test the universe by building queries in BusinessObjects end user querying tools.5MB RAM. The description is shown in the report/query panel when a user points to an object. • Define aggregate SQL functions on universe measures. If the universe is 1. This may be a laborious process but one which is useful if you are working with a large universe. in which case a general measure class is created. • If the universe is bigger than 1MB. Best practices for classes and objects • Use the minimum possible objects in a universe. • Format objects and measures within the universe. measure. This could have an impact on the RAM available to your system. and detail objects should be within their logical classes unless the measure objects are generic to the whole universe. then it uses 1. divide it into multiple universes.39 MB. you load the universe into RAM. • Remove unnecessary lists of values. Do all aggregation on the server side instead of in the document (this can result in huge time savings). such as on dates and measure objects. • Add any other elements to the universe such as predefined conditions and hierarchies. Too many objects may slow down the time required for a user to find objects. Note: When you select File ➤ Open. Fewer rows get returned from the database thus making reports smaller and the calculation of variables. Maintaining and Optimizing Universes—Learner’s Guide 145 . Start the help off with the object’s full name: this is particularly helpful to users if the object’s name is very long and cannot be fully displayed in the report/query panel. • Create predefined condition or filter objects when possible. • Optimize universe performance and database tuning. • Use aggregate awareness. • Database connections for a universe should be set to disconnect after each transaction.

this could cause the SQL to try to match on the equality of a NULL value. There are exceptions. 146 Advanced Universe Design—Learner’s Guide .This prevents users having to spend valuable time formatting data from within the reporting tool every time they create a report. Shortcut joins provide an alternative path between two tables. Note: It is recommended that outer joins be placed at the end of the flow of data. the subsequent joins in the path may also have to be made outer to avoid errors. • Avoid outer joins where possible. This can have a significant negative impact on performance. otherwise outer join errors may occur. Outer joins may have a negative effect on performance since more rows are returned. Using aggregate aware and aliases may help if outer joins are necessary but cannot be placed at the end of the path. Note: Placing shortcut joins in an existing universe may change the results returned by existing queries. Potentially. Best practices for joins • Avoid building universe tables with no joins. If you do place outer joins in the middle of a table path. Additionally. • Optimize database performance by using shortcut joins. which it cannot do. like with Views that act as summary tables. some databases do not use indexes when outer joins are involved. however in those instances ensure that incompatibilities are set using the Aggregate Navigation tool to avoid SQL errors. Shortcut joins can improve query performance by using shorter paths and bypassing intermediate tables.

True or False. 2. you only need to edit all the objects that referred to the original column. 3.Quiz: Maintaining and optimizing universes 1. True or False. True or False. Setting the FILTER_IN_FROM parameter to Yes moves the SELECT clause data of a query to the FROM clause. Maintaining and Optimizing Universes—Learner’s Guide 147 . Adding new tables or columns to the database impacts the reports that are already created and refreshed regularly by end users. In the case of a column name change.

Lesson summary
After completing this lesson, you are now able to: • Optimize universes • Apply foreign key index awareness • Apply best practices for universe design

148

Advanced Universe Design—Learner’s Guide

Lesson 8

Creating Universes from Other Data Sources
Lesson introduction
The universe access list continues to grow as the variety of data sources evolve in customer environments. Using Universe Designer, you can create a universe from a data source, such as XML files or Oracle Analytic Workspaces, OLAP cubes, Stored Procedures, and JavaBeans. After completing this lesson, you will be able to: • Create a universe from an XML metadata file • Create stored procedure and JavaBeans universes • Work with OLAP universes

Creating Universes from Other Data Sources—Learner’s Guide

149

Creating a universe from an XML data source
You can use Universe Designer to create a universe from a XML data source, by using the Metadata Exchange panel. Once the universe has been created it can be exported to the Central Management Server (CMS) as any other universe, and is then available to end users to run queries and create reports on. Note: The Metadata Exchange wizard is also available in stand-alone mode. To access the Metadata Exchange panel in stand-alone mode launch Universe Builder via Start ➤ Programs ➤ BusinessObjects XI 3.0/3.1 ➤ BusinessObjects Enterprise ➤ Universe Builder. After completing this unit, you will be able to: • List the data sources you can use with the Metadata Exchange panel • Describe the Metadata Exchange panel functions • Create a new universe from an XML data source

Which data sources are supported in the Metadata Exchange panel?
Using the Metadata Exchange panel, you can create universes from the following data sources: • XML data sources: ○ Common Warehouse Model (CWM Relational 1.0) ○ Common Warehouse Model OLAP (CWM OLAP) ○ Oracle Warehouse Builder (Oracle WB) ○ Data Integrator ○ IBM DB2 Data Warehouse Center (IBM DB2 DWC) ○ IBM DB2 Cube Views • Oracle Analytic Workspaces (Oracle OLAP)

Working with the Metadata Exchange panel
You access the Metadata Exchange panel by selecting the Metadata Exchange option from the File menu in Universe Designer.

150

Advanced Universe Design—Learner’s Guide

In the Metadata Exchange panel, you can: • Select the data source format to build the universe. This is the source XML file or database view that you use to build a universe. A universe creation wizard takes you through steps to select a connection for the data source, selecting the data components that you want to be mapped to the universe, and finally the generation of the universe. • Update an existing universe with data from a data source that has been updated. This is the data source that has been used to create the universe. The source has been updated, and now you want to update the universe with the same modification. A universe update wizard takes you through the steps needed to update the universe. • Export a universe to a data source format. You select a data source format to which you can export the universe. The default option available is DB2 Cube Views 8.1, then save the universe in that format. The Metadata Exchange panel takes you through a three-step process to create the universe: • Specify the location of the data source file. • Select the tables you want to include in the universe. • Define the connection to the original data source.

To create a universe from a CWM Relational 1.0/1.1 metadata file
1. From the File menu in Universe Designer, select Metadata Exchange. The Metadata Exchange panel displays. 2. In the Metadata Exchange panel, click the drop-down arrow next to the Create a universe from the drop-down list.

Creating Universes from Other Data Sources—Learner’s Guide

151

In the Universe creation . Select the CWM Relational 1.0 Universe Builder wizard appears. Click Next to continue. browse to the location of your XML metadata file. 4.Step 2/5 wizard page displays: 152 Advanced Universe Design—Learner’s Guide . The Universe creation . 5. The CWM Relational 1. 8.3.0/1. 7.1 Metadata format. Click Next to continue. Click OK.Step 1/5 wizard page. 6.

Click Next to continue.Click the File Locations tab. you can specify the location where trace files can be stored. 12. so it is not important which connection is selected here. 10. This wizard page displays all the tables and columns in this metadata file. you will not actually connect the universe to a data source. Or you can use the >> button to move all the contents of the file at once.Step 3/5 wizard page displays.Type a name for the new universe in the Universe name field.Step 4/5 wizard page displays. The Universe creation . The universe name must be eight characters or less. Select Database1 to highlight it and click Next.Step 4/5 wizard page allows you to select the connection the universe uses to connect to the data source.You can select individual tables or columns in the list and use the > button to move them individually into the list in the right-hand side of the wizard box. 13. 11.Click the + box next to a table to view the columns in this table. 14. 15. In the General tab of the Options dialog box. The Universe creation .Select the Advanced button. The Options dialog box displays. Creating Universes from Other Data Sources—Learner’s Guide 153 . The Universe creation . For the purposes of this course.9.

and joins automatically defined: Note: You cannot actually check the integrity of this universe.The File Locations tab allows you to specify default locations for storing the source XML files and the parameter files associated with the metadata.Save the universe and close Universe Designer. Click Next to continue The Universe creation .Click Finish. 18. This page summarizes the connection and file information that are used to create the universe. The universe displays with classes.Click OK to close the Options dialog box.Step 5/5 wizard page appears. or export the universe to the CMS. because you have not defined a connection to the original data source. objects. 16. 17. 154 Advanced Universe Design—Learner’s Guide .

A stored procedure is a compiled SQL program. and Live Office. By doing so. • With parameters (IN). consisting of one or more SQL statements. Polestar. After completing this unit. This is the only way that Web Intelligence users can access stored procedures. Note: It is important to note that you must create a new universe based on the stored procedure. thus they benefit from Derived Table mechanisms and concepts. Creating Universes from Other Data Sources—Learner’s Guide 155 . This feature is very important for customers who have historically used Desktop Intelligence for their reporting needs and are now interested in migrating to Web Intelligence. • With multi-statement (with SQL sentences different from SELECT). analyze. BusinessObjects supports stored procedures: • Without parameters. Web Intelligence users can use the stored procedure universes to create reports that are based on stored procedures in the database. • With multi-result sets. This unit looks at creating universes using stored procedures and JavaBeans. Query as a Web Service.Creating stored procedure and JavaBeans universes The objective of universes is to provide a seamless access to any underlying source. which then ensures a consistent experience to users. you will be able to: • Create a universe using a stored procedure • Create a universe using JavaBeans Stored procedure universes A stored procedure universe is a special universe that enables Web Intelligence users to access stored procedures residing in the database. users can query. Support of stored procedures brings Web Intelligence closer to parity with Desktop Intelligence functionality. Note: Universes that have been created from stored procedures are supported in Web Intelligence. and report on any data source using universes. Creating a universe based on stored procedures Universe Designer allows designers to create universes based on stored procedures. the universe's capabilities are extended to access relational SQL stored procedures and JavaBeans. which resides and runs on the target database. The universe access list continues to grow as the variety of data sources evolve in our customer environments. Stored procedures are represented as Derived Tables.

Choose the database connection from the Select the database connection list or click New to create a new connection. 7. The Define the Universe Parameter dialog box appears. In Universe Parameters. To create a universe based on stored procedures with input parameters You already have objects declared if the procedure prompts the user to select a value from a list in the database. click the Quick Design Wizard button on the toolbar. Click Add. The Congratulations dialog box appears. Stored procedure parameters in the universe To improve performance.sum. count. 2. 156 Advanced Universe Design—Learner’s Guide . 10. In Universe Designer. The Welcome dialog box appears. Expand the database node and the database owner node (for example dbo) to select a stored procedure. Click Next. Click the Click here to choose stored procedures universe check box at the bottom of the pane. 4. 5. you can have several stored procedures based on the same universe for the same data source (via the Quick Design Wizard or Insert ➤ Stored procedures ➤ Update ). Click Begin. for example using the aggregate functions . Type in a universe name in the Enter the universe name field. This indicates that the current universe is based on a stored procedure. check the parameter STORED_PROC_UNIVERSE is set to Yes. 3. The Create initial classes and objects dialog box appears.To create a universe based on a simple stored procedure You can create a universe based on one or several stored procedures without parameters. The stored procedure is created in the Universe pane. Click Next. 9. 8.Click Finish. Note: The stored procedures do not support OUT or dynamic result sets parameters. In order to avoid parsing errors on stored procedures columns. it is recommended that you alias result columns based on complex SQL. 6. The creation of aliased objects cannot be constrained. 1.

The Congratulations dialog box appears. Type in a universe name in the Enter the universe name field. Click Begin.Click Finish. 10. in the stored procedure. 6. and when the procedure is executed. 9. Expand the database node and the database owner node (for example dbo) to select a stored procedure.If you have selected Prompt me for a value. 15. When the stored procedure requires input parameters. This improves debugging as well as maintainability. This value is passed on to the procedure. 8. The Welcome dialog box appears.Select Use this value or Prompt me for a value. 1.Click Next. Creating Universes from Other Data Sources—Learner’s Guide 157 . The database operation appears once. 4. In Universe Designer. 2. The Define the Universe Parameter panel appears. 13. Click the Click here to choose stored procedures universe check box at the bottom of the dialog box. 11. Click Add.You can create a universe based on stored procedures that requires one or more input parameters. You can enter a prompt message or browse to select an existing object (for example. When you enter a value. 14. Depending on the entered value. Select a parameter from the list of parameters. and not multiple times throughout the application source. Advantages and disadvantages of stored procedure universes Stored procedures offer the following benefits: • They encapsulate code. 5.Enter a value for the parameter in the Value field or type in a prompt. 12. Click Next. click the Quick Design Wizard button on the toolbar. 3. the Stored Procedures Editor appears. type in the prompt. The Create initial classes and objects panel appears. the procedure returns the fact data of the value from the appropriate fact table. list of subscriber IDs from a table).Click OK. 7. the parameter retrieves the columns and the result set structure. Choose the database connection from the Select the database connection list or click New to create a new connection.

• If the stored procedure uses input parameters. Developers can create JavaBeans that you can use as data sources. • COMPUTE. Typically. A JavaBean can be developed to obtain a result set from any source. the developers who create the JavaBean need to supply: 158 Advanced Universe Design—Learner’s Guide . these JavaBeans provide access to a datasource. they are converted as prompts in a Web Intelligence document. JavaBeans and universes JavaBeans are classes written in the Java programming language conforming to a particular convention. The limitations are also the same: • No joins are permitted. Note the following restrictions apply to stored procedures universes: • No joins are permitted between objects in stored procedures universes. • Because stored procedures are compiled and stored outside the client application. you can set tighter security restrictions.ResultSet method. or STATUS statements contained in stored procedures are not executed. the stored procedure. so that the bean can be passed around rather than the individual objects. such as passwords or personal data. This saves more trusted permissions for the well-protected stored procedure themselves. • The stored procedure universe feature is useful for customers who already have many programs that cannot be duplicated easily in straight SQL. If you want to link the stored procedure to a list of values. You can create connections using these JavaBeans. In order to create a JavaBeans connection. They are used to encapsulate many objects into a single object (the bean). The bean allows BusinessObjects designers to build a universe from a bean that implements at least one Java. it's better to build a universe or simply add a derived table to an existing universe. If the customer is designing a new project.• Changes to the database schema affect the source code in only one place. • Since the stored procedures reside on the server. • Filters cannot be used on the universe. • Filters cannot be used on the stored procedure universe. • Not all RDBMSs support stored procedures. Using a JavaBean universe Universe Designer supports the creation of a universe based on JavaBeans. they can use more sensitive variables within the SQL syntax. Any schema changes become a database administration task rather than code revision. and we support beans that implement at least one Sql. • Using stored procedures reduces network traffic. • You cannot link a stored procedure universe to a standard universe. PRINT. The universe based on JavaBeans uses the same workflow and offers the same benefits as a universe based on stored procedures.Sql. OUTPUT.ResultSet method. The universe based on JavaBeans returns a result set from which you build a universe entity-relation. you need to create an additional object in the universe to house the LOVs returned. Consult your database guide to see if yours does.

sbo file for editing. on a Windows system. For example. Use an XML editor to open the javabeans. of the New Connection Wizard you must select the Filter Stored Procedures Network Layers check-box. the New Connection Wizard does not display the JavaBeans drivers that are available. • Any other files that the JavaBean requires. • Any specific configuration details that the JavaBeans driver requires.• The required . If you do not. JavaBean SBO example file structure: <DataBase Active="Yes" Name="Excel Spreadsheet"> <JavaBean> <ClassPath> <Path>$ROOT$/beans/bean_excel. where $INSTALLDIR is the directory where the BusinessObjects applications are installed: \\<INSTALDIR>\win32_x86\dataAccess\connectionServer\javabean.beans.Excel Creating Universes from Other Data Sources—Learner’s Guide 159 . on the Database Middleware Selection screen. the configuration files are located in the following paths.businessobjects. When configuring a JavaBeans connection.excel.jar files.jar file details to the ClassPath area.jar </Path> </ClassPath> <Parameter Name="JavaBean Class">com . Within a JavaBeans driver. Include the fully qualified path names when specifying these files. data-retrieval procedures are configured as stored procedures. Add the required . Note: These files need to be installed on the machine running the BusinessObjects application. To create a JavaBean connection 1. 2.

</Parameter> <Parameter Name="URL Format">$DATASOURCE$ </Parameter> </JavaBean> <Parameter Name="Family">Java Beans </Parameter> <Parameter Name="Description File"> bean_excel</Parameter> <Parameter Name="Authentication Mode"> Bypass</Parameter> <Parameter Name="Extensions">bean_excel. When you complete this task. The JavaBeans datasource that you have configured should appear in the list of available connections. javabean</Parameter> </DataBase> </DataBases> 3. Activity: Creating stored procedure universes Objective • Create universes from stored procedures. Instructions There are two stored procedures available in the Motors database: • TenMostExpensiveModels • CustomerOrderHistory 160 Advanced Universe Design—Learner’s Guide . Select the JavaBeans datasource and use the Wizard to configure the connection. 5.sbo file. Perform any other configuration tasks specified by the JavaBeans developer. Save and close the javabeans. the connection is available for use with a BusinessObjects application. Run the Connection Wizard. 4.

Using the TenMostExpensiveModels stored procedure. 2. Use your MotorsOLEDB_xx (where "xx" stands for your initials) connection to connect to the Motors database. Creating Universes from Other Data Sources—Learner’s Guide 161 . Using the CustomerOrderHistory stored procedure. 1.Tip: The CustomerOrderHistory stored procedure contains an input parameter for the Client ID 1001. 3. Save your universes locally and test them in Web Intelligence Rich Client. Use your MotorsOLEDB_xx (where "xx" stands for your initials) connection to connect to the Motors database. create a new universe called SimpleSP_xx (where "xx" stands for your initials). create a new universe called ParamSP_xx (where "xx" stands for your initials).

Using OLAP. or OLAP allows end users to get concise answers to business questions such as: "Show me the sales generated during a specified period. In addition. when the volume of transactions is high. the sales for a single product. or many products can be displayed. By comparison. in the scenario illustrated above. and is then available to Web Intelligence users to run queries and create reports.Working with OLAP universes An OLAP universe is a BusinessObjects universe that has been generated from an OLAP cube or query. an OLAP database provides a powerful calculation engine which supports ad hoc analysis to extend the value of the information beyond the data physically stored in the OLAP database. you will be able to: • Describe what an OLAP cube is • Create and maintain an OLAP universe Understanding the OLAP cube On Line Analytical Processing. In a traditional relational reporting system. 162 Advanced Universe Design—Learner’s Guide . The universe is created automatically from a selected connection to an OLAP data source using an OLAP query flattening driver that is installed as an add in to Universe Designer. Once the universe has been created it can be exported to the Central Management System (CMS) as any other universe. each of these questions would require a separate relational query to summarize historical data which. comparable queries in an OLAP database can deliver answers with a better response time. can take a long time to produce the desired results. For example. After completing this unit. a group of products. a user can quickly narrow or expand the scope of a business question. for a specified product in a specified location less than a specified amount". The power of an OLAP database is its ability to quickly and dynamically summarize data by a variety of dimensions.

Depending on analytical requirements. this dimension can also include Week. When you query an OLAP database. or axes. When the design of a dimension allows this type of summarization. you can select a particular location or you can summarize all locations. Product. Atlanta is a member of the Location dimension in the example above. When you query an OLAP database. of a cube. In the example shown above. Members can be organized into multiple "levels". Dimensions define the numerical data under analysis.Dimensions An OLAP database is constructed from multiple components. Time is a dimension which commonly contains many levels. The cube cells represent the intersection of each dimension member with members of all other dimensions. Q1. knowing that there are $1 million in sales is not meaningful until you put this amount in context with one or more dimensions. For example. a special type of member known as the "All Member" is available to provide a summarized value for the members of that dimension. and Month. For example. often Year. while Jan and Feb are members of the Month level of the same dimension. Day. which is the numerical data being analyzed and summarized. Contained within each cell is the "Measure". Location. Q2. you select one or more members of a dimension or you can choose to summarize all members of a dimension. Levels organize a dimension into a hierarchy with the most summarized values at the top and the most detailed values at the bottom. Q3. and Q4 are all members of the Quarter level of the Time dimension. levels allow you to drill up or down a dimension to view summary or detailed data. In the example above. and Time are the "Dimensions". and even Hour and Minutes. or "Members". A cube can contain one or more measures. Creating Universes from Other Data Sources—Learner’s Guide 163 . Quarter. Is this sales amount for one month or for one product or is it the annual sales for all products in a single city? A dimension is comprised of representative values. Measures Dimensions form the sides.

details.Click Next and click Finish twice to complete defining the OLAP connection. 4.Generating universes from OLAP cube sources An OLAP universe is created automatically from a selected connection to an OLAP data source. and click Next. Shared.The Catalog/Database parameters window displays the available OLAP cubes. Click Add. The universe is then available to Web Intelligence and Web Intelligence Rich Client users to run queries and create reports. and filters in the universe. fill in the appropriate authentication mode and login details to connect to your OLAP data source. or Personal. Expand the appropriate database node that supports the data access driver to the relevant OLAP data source. Secured. the Structure pane remains empty. Click Next. If you receive an error message. 12. Expand the OLAP Cubes node and select the appropriate OLAP cube to connect to. 164 Advanced Universe Design—Learner’s Guide . If the connection is valid. OLAP structures are mapped directly to classes. 3. The New Connection Wizard opens. To create a universe from an OLAP cube 1. check that you entered all the parameters correctly. The universe structure appears in the Universe pane. dimensions. 8. and click Test Connection. 7. Select the appropriate data access driver to the relevant OLAP data source. Select Tools ➤ Connections. Expand the appropriate middleware node that supports the data access driver to the relevant OLAP data source. a message dialog box appears indicating that the connection is correct. it can be exported to the central management server (CMS) as any other universe. 6. Activate the Connection Type drop-down list to select the appropriate connection type. Create a new OLAP connection. In the Connection Name field enter a name for the connection. Note: OLAP universes support a single cube in the universe. 5. 2. 9. You can use Universe Designer to create OLAP universes from the following OLAP data sources: • SAP BW (Business Warehouse) • Microsoft Analysis Services 2000 • Microsoft Analysis Services 2005 • Hyperion Essbase Once the universe has been created. 10. Open Universe Designer. measures.In the Login Parameters window. 11. and click Next.

13. @prompt). • Define a delegate search for a list of values. • Parse dimension. details. measures. Modifying and updating an OLAP universe Once the OLAP universe has been automatically generated. The universe structure appears in the Universe pane. Create a new universe. The OLAP universe gets generated. detail. This may take a few minutes depending on the cube size. and measure object MDX syntaxes. • Edit an object's data type (character and number only). allowing users to limit loading of the list of values at query run time. and click OK. designers are able to make the following types of modifications: • Hide. • Run the Check Integrity or Parse tools at any time. detail. Creating Universes from Other Data Sources—Learner’s Guide 165 . 15. and measure) • Insert new classes and objects (dimension.Give the universe a name and a description. OLAP structures are mapped directly to classes. • Use universe functions (@variable. and rename classes and objects (dimension. • Define measures with database delegated projection function (delegated measures). 14. • Edit an object's format.Select the OLAP data source connection from the Connection drop-down menu. dimensions. and filters in the universe. • Edit hierarchies. detail. • Create a cascading list of values. • Create calculated measures (SAP BW and MSAS only). and measure). @select. Click File ➤ New. duplicate.

For SAP BW. Calculated measures in OLAP universes Calculated measures allow universe designers to create their own measures manually. This is important to support constants as it could be used (like in relational universes) to pass dynamic values to the report: ratio. and so forth. this allows the universe designer to use the cube aggregation calculated in the OLAP source. @prompt. This greatly eases the user experience by simplifying workflows and reducing inconsistent results. The wizard compares the universe with the updated data source. Note: For MSAS 2000. the universe designer must set this option manually for each measure. • You cannot view and edit the universe entity-relationship schema as no schema is generated for OLAP universes. "ABC". percentage. • You cannot edit a list of values in an OLAP universe. all measures generated in OLAP universes are defined as delegated measures. For OLAP universes. The Update OLAP Wizard The Update OLAP Universe Wizard allows you to manage the life cycle of the OLAP universe. The following Universe Designer features are not supported for OLAP universes: • You cannot set row-level security authorizations in an OLAP universe. Universe Designer also supports constants in the expression such as: "10". In order to create calculated measures. The wizard automatically refreshes the universe structure with changes made in the OLAP data source. • Define optional prompts. MSAS 2005. by default. A delegated measure is a measure that delegates its aggregation calculation to the database. Delegated measures OLAP cube aggregation is supported in Universe Designer with delegated smart measures. Web Intelligence reporting and layout workflows now work seamlessly on OLAP sources regardless of the nature of the measure.• Create predefined conditions/filters. for example: • @select • @prompt • @variable • @where For example: <EXPRESSION>@select(MEASURES GROUP\ORDER COUNT)*@select(MEASURES GROUP\SALES REVENUE)</EXPRESSION> Note: Expressions for calculated measures cannot include the @aggregate_aware function. and Essbase. and can 166 Advanced Universe Design—Learner’s Guide . designers create pure MDX expression embedded in new XML tags: <EXPRESSION></EXPRESSION> Universe Designer functions are allowed in calculated measure expressions. The check integrity validates the XML syntax and any of the Universe Designer functions. and so forth.

Select View ➤ Refresh Structure. On the Change Management Results page. parses joins. The Change Management Results page appears showing added/deleted/hidden objects. Export. open the OLAP universe you want to update.differentiate generated objects from objects added or modified manually. It allows you to choose which strategy to adopt: • Business Name Keep Replace. Hidden objects are moved to a separate class in the universe and appear in italic font preceded by /##/. designers can now run the Check Integrity tool after the update process. you can click OK. • Object Type Keep Replace. 5. Click Finish. • Export: If you are satisfied with the changes. In Universe Designer. In Universe Designer. Select the desired options you want to preserve modifications to manually made objects in the universe. parses objects. • Check Integrity: Click Check Integrity to perform an integrity check. 4. From this page you can print the results of the check. 6. • Deleted objects Delete from the Universe Keep and Hide: objects and add "/##/" as prefix to the Object name. 2. When the check is complete. and checks cardinality. The universe update option page appears. select OK. Creating Universes from Other Data Sources—Learner’s Guide 167 . 3. The integrity tool checks the structure. and then close the universe without saving or exporting. All keep options are selected by default. allowing you to preserve the manual changes made in Universe Designer. A LOG file is generated at the end of the update process and can been saved on a hard disk to be reviewed later. Note: The wizard does not update objects added manually in Universe Designer. • LOV options Keep Replace. Click Begin. or Check Integrity. the Integrity Check Results page appears. click Export to save and export the updated universe to the CMS. To refresh the structure of an OLAP universe 1. The Update OLAP Universe Wizard appears. • OK: If you are not satisfied with the results. parses conditions.

where "xx" stands for your initials. 3. (where "xx" stands for your initials). Save your universe locally and test it in Web Intelligence Rich Client. 4. Create a new MotorsOLAP_xx universe. using your created secured OLAP connection. In the connection Login Parameters window enter the following parameters: • Use specified username and password. 6. with the following parameters: • Connection Type: Secured • Connection Name: OLAP_xx (where "xx" stands for your initials) • Database middleware: Microsoft ➤ MS Analysis Services 2005 ➤ OLE DB for OLAP Providers 2. 5. 168 Advanced Universe Design—Learner’s Guide . The Catalog/Database parameters window displays the available OLAP cubes. Open Universe Designer. Create a new OLAP_xx connection. • For user name and password. Select OLAP Cubes ➤ Motors (Motors) ➤ Motors (Motors). • Enter the server name as provided by the instructor. use the credentials as provided by the instructor. and click Test Connection. Click Next.Activity: Creating an OLAP universe Objective • Create a universe from an OLAP cube Instructions 1.

consisting of one or more SQL statements. Stored procedures are represented as Derived Tables. When creating an OLAP universe.Quiz: Creating universes from other data sources 1. A stored procedure is a compiled SQL program. True or False. What three tasks can you perform in the Metadata Exchange panel? 2. True or False. thus they benefit from Derived Table mechanisms and concepts. Creating Universes from Other Data Sources—Learner’s Guide 169 . 4. no tables are generated in the Structure pane. which resides and runs on the target database. True or False. 3.

Lesson summary After completing this lesson. you are now able to: • Create a universe from an XML metadata file • Create stored procedure and JavaBeans universes • Work with OLAP universes 170 Advanced Universe Design—Learner’s Guide .

however. SALE.MAKER_ID.MODEL.SALE_QTY * MODEL. Open your Motors universe file in Universe Designer. In addition they would like to review the universes for possible optimization. 5. Add the following SQL Syntax for the table: SELECT MODEL.SHOWROOM_ID. datepart(m.MODEL_PRICE * ((100 -SALE.Appendix A End of Course Challenge Activity: Completing the end of course challenge Objectives • Build YTD objects in the Motors universe • Use aggregate awareness to optimize the universe Prestige Motors management is finding that their monthly reports take a long time to run.SALE_DISCOUNT) / 100)) as Monthly_Sales_Revenue FROM SALE_MODEL. based on the DT_Monthly_Figures table: • Month • Year • Monthly Sales Revenue 4.SALE. 1.SALE_DATE).sum(SALE. Join the derived table with the MAKER and SHOWROOM tables using the appropriate foreign keys and update the Sales context as required.SALE_ID) AND ( SALE_MODEL. 2.SALE_ID=SALE_MODEL. no changes can be made to the existing data store structure.SALE_DATE) as Month. MODEL.SHOWROOM_ID.SALE.SALE_DATE).SALE_TYPE='S' ) GROUP BY datepart(yy.SALE_TOTAL) as Monthly_Sales.datepart(mm. Update the existing Sales Revenue measure SQL syntax to include a month value aggregation level.SALE.SALE. End of Course Challenge—Learner’s Guide 171 . Year to date data needs to be implemented to get up to today's sales revenue data. They have requested that these reports be produced without any noticeable processing delay.MODEL_ID ) AND ( SALE.SALE. SALE WHERE (SALE.MODEL_ID= MODEL.MAKER_ID 3.SALE_DATE) as Year.datepart(yy. Create a new derived table called DT_Monthly_Figures. sum(SALE_MODEL. Create a new Monthly Figures class to contain the following monthly figures objects.

Type Date datepart(yyyy. 11. 8. create a new derived table.Add the following syntax to the derived table SELECT statement: SELECT CLIENT_ID.SALE_ID.getdate()) as SALE_DATE SALE_TOTAL.getdate()) AS SALE_DATE 172 Advanced Universe Design—Learner’s Guide .-1. Use the View SQL button to verify if the generated SQL is correct.SALE_ID. Set incompatibilities where required.getdate()) as SALE_DATE SALE_TOTAL. There are no current date values in the Motors database. dateadd(yy. To ensure that you can create YTD objects. apply the changes and click Parse.Name the table DT_Sale_YTD. for example year object in the Financial Period class.SALE_ID. FROM SALE WHERE CLIENT_ID = (1089) UNION SELECT CLIENT_ID. 9.-2. Select Insert ➤ Derived Tables from the toolbar menu. getdate() as SALE_DATE SALE_TOTAL.-1. dateadd(mm. dateadd(mm. 10. To check if the syntax is correct click Tables. Alternatively save the universe and test in Web Intelligence Rich Client. FROM SALE WHERE CLIENT_ID = (1087) UNION SELECT CLIENT_ID.getdate()) Number datepart(mm.Tip: Check other objects that reference the monthly aggregate. 6. Test the aggregation level generations by running test queries in the Universe Designer Query Panel.getdate()) Returns the current month Number Note: These objects are not based on any database columns and do not parse as they are lacking a reference table. FROM SALE SALE_TOTAL.SALE_ID. Returns the current year. FROM SALE WHERE CLIENT_ID = (1088) UNION SELECT CLIENT_ID. 7. Create a new class called Current Dates and insert the following objects: Date Object Current Date Current Year Current Month SELECT syntax getdate() Description Returns the current date and time. select the SALE table.

current month CASE @select(YTD Objects\Year of Sale Date (SALE_YTD table)) WHEN @select(Current Dates\Current Year) THEN 1 ELSE 0 END * CASE sign(@select(Current Dates\Current Month)@select(YTD Objects\Month of Sale Date (SALE_YTD table))) WHEN 1 THEN 1 ELSE 0 END 19. Name the context SALE_YTD.Double-click the Sale Date (SALE_YTD table) object and click on the Properties tab. 13.Create the following indicator or boolean flag objects in the YTD Objects class that are used to create YTD measure objects in the remaining activity steps: Boolean Flag Object SELECT Syntax Sales in YTD flag CASE WHEN THEN ELSE @select(YTD Objects\Year of Sale Date (SALE_YTD table)) @select(Current Dates\Current Year) 1 0 END Sales in YTD flag .SALE_TOTAL) DT_Sale_YTD.WHERE CLIENT_ID = (1086) 12.Create the following relative date-time measure objects in the YTD Objects class: End of Course Challenge—Learner’s Guide 173 . and add the following objects based on the SALE_YTD derived table: Object Sales Total (SALE_YTD table) Sale Date (SALE_YTD table) SELECT Syntax sum(DT_Sale_YTD.Select the Automatic Time Hierarchy button and create a year and month object.Create a YTD Objects class.SALE_DATE 16. 14. 17.Detect the cardinality and create a new context for the join between the DT_Sale_YTD and CLIENT tables. 18.Check the syntax and click OK.As you need to ensure that all tables are part of a context you need to join the DT_Sale_YTD table to the CLIENT table via the CLIENT_ID. 15.

Measure Object SELECT syntax sum((DT_Sale_YTD.SALE_TOTAL)* @select(YTD Objects\Sales in YTD flag))

Total Sales YTD

Total Sales YTD - current month

sum((DT_Sale_YTD.SALE_TOTAL)* @select(YTD Objects\Sales in YTD flag - current month))

20.Save the changes and test the results in Web Intelligence Rich Client. 21.Run a new query using the Sale Date (SALE_YTD table), Sale_Total (SALE_YTD table), Total Sales YTD and the Total Sales YTD - current month objects.

174

Advanced Universe Design—Learner’s Guide

Appendix B

Data Access Files
BusinessObjects data access files
A number of driver level files used by specific data access drivers are installed with the BusinessObjects product suite. This unit will look at the individual data access files and at advanced connection parameters that can be used to enhance your universe deployment. Data access is managed by the Connection Server. The Connection Server is the Business Objects connection engine that creates and manages connections used by universes between BusinessObjects data access drivers and the target RDBMS middleware. The Connection Server libraries are present on the Web Intelligence Report Server, Desktop Intelligence Report Server and Web Intelligence Job Server which allows these services to query the database directly without communicating with the Connection Server service. The Connection Server and the required data access components are automatically installed when you install Business Objects. Data access drivers can be found in the installation directory:
C\Program Files\Business Objects\BusinessObjects Enterprise 12.0\win32_x86\dataAccess\connectionsServer\<RDBMS> Driver specific file Description

<driver><language>.stg

Contains the help text for each external strategy defined in the <driver>.stg file. This text appears when the strategy is selected in a universe. Contains the external strategies available to data access driver.
Note: External Strategies will be covered later on in Lesson 7 External strategies

For example: sqlsrven.stg

<driver>.stg

For example: sqlsrv.stg or oracle.stg

<driver>.sbo

For example: odbc.sbo

Defines all databases supported and the specific connectivity configuration for each database. Contains the help text for functions that are listed in the <driver>.prm file. This text appears when the function is selected in Universe Designer.

<driver><language>.prm

For example: sqlsrven.prm

Data Access Files—Learner’s Guide

175

Driver specific file <driver>.prm

Description

For example: sqlsrv.prm

Defines the information parameters and functions related to the database. Stores information related to connection Note: Do not modify this file.

<driver><language>.cod

For example: odbcen.cod

How can you quickly identify which data access files are being used? By looking at the connection details. Select File ➤ Parameters . On the Definition menu click the Test button for the Connection. Click on Details. This will show the version of BusinessObjects Enterprise used, the network layer. The details are split up into two parts: • Business Objects configuration

This section highlights the BusinessObjects version used, and the network layer as defined in the connection. Note: The line <DBMS Engine: MS SQL Server 2005> is what has been defined in the connection. This does not mean that the database connected to is actually MS SQL Server 2005. The database version connected to is outlined in the Middleware and DBMS Configuration section. The BusinessObjects Configuration section also highlights the library of data access files used. Note: Double-click on the path to view the full path, or to copy the path. • Middleware and DBMS Configuration

176

Advanced Universe Design—Learner’s Guide

The Middleware and DBMS Configuration section highlights the actual Database Management System (DBMS) that you are connected to, and the version. This can be an important indicator that no cross reference of DBMS versus what is specified in the connection occurs.

The SBO file
The SBO file is a parameter file used to configure the behavior of some of the connection parameters. For each access driver (RDBMS) there is one SBO file that contains the appropriate connection parameters. Each <driver>.sbo file contains the following: • Default parameters that apply to all connections using the data access driver. ○ A list of database middleware that the driver supports. This list can also contain aliases for middleware versions that are no longer supported, but which are still used by connections defined with the data access driver. Each middleware entry can have default parameters set that apply only to that database middleware. For example for Microsoft SQL Server 2005 you will find the following settings in the ODBC.sbo file:
<DataBase Active="Yes" Name="MS SQL Server 2005"> <Libraries> <Library>dbd_wmssql</Library> <Library>dbd_mssql</Library> </Libraries> <Parameter Name="Family">Microsoft</Parameter> <Parameter Name="Version">rdbms_mssqlserverodbc.txt</ Parameter> <Parameter Name="SQL External File">sqlsrv</Parameter <Parameter Name="SQL Parameter File">sqlsrv</Parameter> <Parameter Name="Strategies File">sqlsrv</Parameter> <Parameter Name="Array Bind Available">True</Parameter> <Parameter Name="CharSet Table" Platform="Unix">datadirect <Parameter Name="Driver Name">SQL Server</Parameter> </DataBase>

The table below outlines what some of the above shown parameters mean:

Data Access Files—Learner’s Guide

177

sbo file.SBO file is a system file. only an editor designed for XML should be used to edit such files. This setting is specific to each <driver>. 178 Advanced Universe Design—Learner’s Guide .crs) for the data access driver with no extension.cfg file.crs file is in the same directory as the . Editing XML files without a proper editor may create file corruptions which can result in problems with demonstrations and activities.0: Data Access Guide for more information on the . When the bind array fills.SBO file. Note: Consult the BusinessObjects XI 3. Although XML files may be opened in any text editor such as WordPad or Notepad. 31 specifies that you can use the driver to create the BusinessObjects repository. Array Bind Variable The bind array is the area in memory that Connection Server stores a batch of data to be loaded (sent to the repository). Driver Level • • CharSet Table Specifies the Charset file (. The . The middleware that correspond to your data access key are displayed on this page in a tree view. you need to create a backup.sbo files contain parameters that are also set in the cs. Note: Do not modify this parameter. and to create universe folders. to create and execute queries.sbo file • • 1 specifies that you can only use the driver to create and execute queries. and to create and execute queries. 13 specifies that you can use the driver to create and execute queries.Parameter Description Family This specifies the family of database engine to be displayed in the Database Middleware Selection page of the new connection wizard. Values can be set to True or False. and to access stored procedures. The . This setting is specific to each . the default value is set to True Specifies the limitations of each driver. Note: All data access files are now in XML format. This parameter specifies if the database supports this method.SBO file. Note: Prior to making any changes in the . it is transmitted to the database. 15 specifies that you can use the driver to create the BusinessObjects repository. The values set in the SBO file can over-ride the values in the cs.sbo file. Consult your database administrator before making any changes.cfg file. Some <driver>.

Note that for some databases. SQL Server included. The Document Type Definition (DTD) file that relates to each element used in the cs. for example Microsoft SQL Server and Microsoft Access.0\win32_x86\dataAccess\connectionsServer\ Note: The cs. • Distribution: This element contains two sub elements. the specific target database information must be exposed to Connection Server to allow queries to be routed through ODBC to the correct data account. ○ Library: parameters apply to a standard Connection Server installation. if Connection Server is being used as a standalone server.The CS. when editing and/or modifying the XML file. To allow for UNICODE compliancy the UNICODE setting in the PRM file or the UNICODE Dynamic SQL Parameter in the universe needs to be set accordingly. and has two databases that are accessed by the same ODBC network layer. This is the default mode when you install a BusinessObjects product that is installed automatically with Connection Server.dtd is accessible.cfg file: • Locales: This element defines the usual operating system charset for a given language.cfg file is an XML file. for example the file extensions of files used by Connection Server to manage data access. The Lookup element allows you to expose the target RDBMS that corresponds to a specific ODBC network layer to Connection Server.cfg file is a data access general configuration file in XML format that contains default configuration parameters that apply to all data access drivers. the SQL UNICODE settings are set to NVARCHAR. By default. However. ○ Server: parameters apply to a Connection Server stand alone server installation. There are five XML elements in the cs. The cs.CFG file The cs.cfg file is stored at the root level for the connectionServer: C\Program Files\Business Objects\BusinessObjects Enterprise 12. • Settings: This element defines parameters that apply to all data access drivers. Protocols and Lookup. Some settings can be defined either for library version or server version of Connection Server. The protocols element contains settings that the Connection Server uses to process requests coming from CORBA clients or HTTP clients. the cs. through a common ODBC network layer. so Connection Server associates a target RDBMS to its ODBC network layer.cfg file is in the same directory. Lookup is set to No. It is installed alone with no other BusinessObjects desktop or server product. • Driver defaults: Data Access Files—Learner’s Guide 179 . This applies when Connection Server is using two different data access drivers. It is installed with other BusinessObjects desktop or server software. The locales are UNICODE compliant which allows SQL UNICODE to be used. Make sure that.

Parameters specified in the SBO file can over-ride the parameters set in the cs. The values set for these parameters apply to all data access drivers. this file over-rides the default from the cs.cfg file.cfg holds the default settings for the Array Fetch Size and Array Bind Size values. For example the cs. in the oracle. If no values are changed in these menus when defining the universe connection.cfg file. If these values have been altered in the SBO file.Data access driver parameters that are also found in driver specific SBO files. 180 Advanced Universe Design—Learner’s Guide .cfg file.0: Data Access Guide for more information on the cs. These values are normally set in individual universe connections in the Advanced Parameters and Custom Parameters menus.sbo file you can define different Array Fetch size and Array Bind size values. the default settings from the cs.cfg will be used instead. Note: Consult the BusinessObjects XI 3. • Traces: You can set trace parameters that allow the recording of connection activity through Connection Server in log files.

PRM file.0: Data Access Guide for more information on the .The PRM file A number of driver level files used by specific data access drivers are installed with the BusinessObjects product suite. for example. This unit will look at the individual data access files and at advanced connection parameters that can be used to enhance your universe deployment. QUALIFIER. Consult your database administrator before making any changes. only an editor designed for XML should be used to edit such files. Although XML files may be opened in any text editor such as WordPad or Notepad.PRM file. and Variance. When working in Universe Designer. Configuration Date Operations Operators Functions The function list shown in the PRM file never includes a complete list of available functions for the designated RDBMS. The functions section holds the functions available to Universe Designer. COMMA. If functions are used frequently this way. This PRM file contains default SQL parameters used for query generation.PRM file is a system file. and the BusinessObjects end user querying tools. MULTIPLY and SUBSTRACT. Each data access driver is associated with a SQL parameters file (<driver>. instead of typing this in every time. and functions.prm). Note: All data access files are now in XML format. the PRM file can be adapted and new functions can be added. Editing XML files without a proper editor may create file corruptions which can result in problems with demonstrations and activities. you can add SQL functions directly into the Select statement box of an object. Each PRM file is structured into four groups: The configuration section holds the SQL parameters used to create and optimize a universe. If additional functions are required for reporting purposes. and OUTERJOINS_ GENERATION The date operations section holds the date operators available to Universe Designer and the BusinessObjects end user querying tools. for example Average. for example ADD. The operators section holds the operators available to Universe Designer and the BusinessObjects end user querying tools. you need to create a backup. it can be added to the PRM file to appear as a function in the list. Sum. Note: Prior to making any changes in the . For example YEAR. The . Data Access Files—Learner’s Guide 181 . date and other operators. OWNER. QUARTER and MONTH options. Note: Consult the BusinessObjects XI 3.

ROW_NUMBER</Parameter> <Parameter Name="OVER_CLAUSE">Y</Parameter> The first parameter lists the RISQL functions supported by the database.PRM file function help text The help text that appears under each function when selected in Universe Designer is maintained in a separate file.AVG.prm file. These parameters have values set for use internally within a Business Objects product. In previous versions of Business Objects products this text was maintained in the same file as the PRM parameters. 182 Advanced Universe Design—Learner’s Guide . Certain configuration parameters must not be edited.SUM. Analytic functions can be added directly to the Select statement if the RDBMS allows their use.DENSE_RANK.prm file has the following tags that need to refer to the each function added in the PRM file: • Name: The name tag represents the name of the function. To ensure correct use of the functions. You can view. As with all parameter files.COUNT. and add parameters to a PRM file.MAX. Depending on the database used. The following two parameters need to be added to the configuration section: <Parameter Name="RISQL_FUNCTIONS">RANK. • Message: This tag is split up into two ID tags. PRM file Configuration Parameters The configuration section holds the SQL parameters used to create and optimize a universe.NTILE. you can add a help text message to convey what type of argument is expected to be used. These parameters can be edited by altering the default values to a customized setting that can help optimize queries run against universes using the target data access driver. Before editing any other PRM file parameter.prm file. The second ID needs to convey the function name. you should make a backup copy of the PRM file. edit. and needs to correspond with the name of the function in the <driver>.0: Data Access Guide for a full list of configuration functions that can be adapted in the PRM file. The Over Clause parameter allows BusinessObjects products to include aggregate analytic functions (for example. in the PRM file you also need to apply parameter rules for the GROUP BY. Each <driver><language>. MIN. • Arguments: For each argument set in the function. The PRM file is also used to allow the use of analytic functions. When you add a function to the PRM file. The first ID tag represents the help text for the function that will be seen in Universe Designer. you need to add the Help text for the new function to the appropriate <driver><language>. This is the name that appears in the function list in Universe Designer. the RISQL functions parameter has to be enabled in the PRM file. please make sure that settings are correctly defined and are compatible with the RDBMS in use. SUM OVER PARTITION BY) when generating SQL. Note: Consult the BusinessObjects XI 3.

Note: Consult the BusinessObjects XI 3. Data Access Files—Learner’s Guide 183 .0: Designer's Guide for more information on analytic functions and the PRM file.

184 Advanced Universe Design—Learner’s Guide .

appears as External Strategy: Constraints in the Joins drop down list on the Strategies page. These routines are called strategies and are available from the Strategies page of the Parameters dialog box. and table detection tasks in a universe.stg.unv file. You can select these from the Strategies page with the other strategies. Accessing External Strategies in Universe Designer External strategies appear in the drop down list boxes that also list the built-in strategies on the Strategies page. An external strategy appears in the list with External Strategy prefixing the strategy name as follows: External Strategy:<strategy name> For example. This appendix describes external strategies and their use. owners) in your data source. create SQL scripts that follow a defined output structure to perform customized automatic universe creation tasks. These files can be found in the BusinessObjects installation directory: C\Program Files\Business Objects\BusinessObjects Enterprise 12\win32_x86\dataAccess\connectionsServer\<RDBMS>\ External strategy files are in XML format. External Strategies—Learner’s Guide 185 . There is an STG file for each supported RDBMS. The Strategies Tab The Strategies tab of the Universe Parameters dialog box defines how the universe uses information from the data dictionary to help you build the universe. These strategies are built-in to Universe Designer. Each drop down list box corresponds to a strategy type category in the XML file. an external strategy for join creation called Constraints in the Strategy file. views. synonyms. You cannot access or modify them. however.Appendix C External Strategies Using external strategies in Universe Designer Universe Designer uses built-in automated routines to automatically create universe components based on the database structure. A data dictionary is a set of system tables that your RDBMS automatically creates and maintains about the objects (tables. They can be edited or viewed in Notepad or Wordpad. but it is recommended to use an XML editor to make modifications. You can. External strategies are stored in an external strategy file with the extension . What is an external strategy? An external strategy is an SQL script stored externally to the . These user defined and customized scripts are called External strategies. and structured so that it can be used by Universe Designer to automate object or join creation.

and that drops the DW from the proposed classes automatically. designers can create customizable external strategies to reflect their needs. Strategies are SQL statements that read the data dictionary tables in your source system. • tables. you will need to create external strategies to ensure Universe Designer can see those synonyms as tables in the table browser. the proposed classes will also have a DW prefix. There are a number of default built-in strategies that provide a good starting point. classes and objects. However. designers can create a customized strategy that identifies potential classes and objects. for example DW_Sales_fact. so in order to get data source specific requirements added to the universe. The returned query results use that dictionary information to form of a list of potential tables. In some cases Data warehouse tables have a DW prefix. joins. If a built-in strategy is used to identify potential classes and objects.The information in the Strategy dialog box is accessed by Universe Designer when: • the quick design wizard is used to build a new universe. Classes and objects need to remain end users focused and should not be portrayed with confusing prefixes. 186 Advanced Universe Design—Learner’s Guide . Instead of using the built-in strategy and manually remove the prefixes. if you have a data warehouse or DBMS that uses public synonyms (Oracle for example). • your database option for "Extract joins with tables" has been selected in Tools ➤ Options ➤ Database to assist in automatically creating tables and joins for a universe. objects and joins are inserted via the toolbar icons or via the Insert menu. Built-in strategies can not be modified.

Joins Universe Designer has four built-in strategies that automatically create joins in a universe. By default. the user name specified in the connection parameters does not necessarily own the physical tables). If you wish joins to be proposed for numeric. • Database keys matching names: When using this strategy. • All matching numeric column names: When using this strategy. They can be a useful solution for: External Strategies—Learner’s Guide 187 . then you must log in with the user ID System for Universe Designer to find these tables. date.Types of strategies There are three universe components that strategies interact with: objects. The built-in object strategy also converts all names to initial caps and removes the underscore (_) from any table and field names. • All matching column names: This strategy identifies matching column names. Tables The built-in table strategy selects all physical tables owned by the individual user specified in the connection parameters. When the column names match between two tables. External strategies allow you to control how the data dictionary is read. joins. Objects The built-in object strategy determines how Universe Designer reads the table and column information from the data dictionary to come up with potential classes and objects (either when using the wizard or when inserting tables). and tables. When setting this parameter to N it drop the owner name from your table prefix and will cause the built-in strategies to look for public synonyms and views (for example. or character columns. To avoid users to see Owner prefixes on tables you DBA can create synonyms (depending on the DBMS used). This strategy would only propose join candidates for numeric fields. or can change the OWNER parameter in the <driver>. even if these columns are not designated primary or foreign keys. the joins are automatically inserted. joins are created automatically between columns that are indicated in the database as primary keys and foreign keys. If the owner of the tables in your DBMS is System.PRM file. the data source table names are used as the proposed class names and the table columns are used as the proposed objects names. rather than a numeric value. To learn more about how strategies interact with these components we will look at how these are used in the built-in strategies. • Edit manually (none): Joins are not created automatically. select the preceding strategy. If owner prefixes need to be excluded from tables names it is better to use an external table strategy that adapts to those needs instead of using the built-in-strategy. All these built-in strategies can be used as an example layout for customized external strategies. joins are created automatically between columns that are numeric and have matching names. Note: Setting the parameter OWNER to N without customizing an external strategy can also pick up unwanted system tables. In some schemas primary and foreign keys can be a date or char type.

you need to restart Universe Designer. Open a universe in Universe Designer 2. Select File ➤ Parameters from the menu bar. To acces the added strategey : 1.STG file.• database public synonyms • extracting column comments from your source system and use them as object descriptions • importing metadata from a text file Accessing new external strategies in Universe Designer After adding new strategies in the . 188 Advanced Universe Design—Learner’s Guide .STG file. 4. or Table strategies that were defined in the . The drop-down arrows allow designers to select Object. Join. Select the Strategies tab. 3.

SQL syntaxes for other RDBMS—Learner’s Guide 189 . MySQL. sectioned by lesson and topic. for the objects and functions used within this course.Appendix D SQL syntaxes for other RDBMS Alternative SQL syntaxes for other RDBMS This appendix provides the alternative SQL syntaxes for Oracle. and DB2.

' ') substr(CLIENT.ORACLE This section provides solution syntaxes for ORACLE. Oracle counts from the beginning of the string.)) This example returns the last four characters of the Client Name column: substr(CLIENT.'search string'.Using database functions in objects SQL Server Substring() Oracle Substr() Instr() function. if length is omitted.-4) Ceiling() Floor() Round() Ceil() Floor() Round( number.4) Substr() Fn_Left() (or Left(.1. Fn_Right() (or Right(. [ decimal_places ] ) 190 Advanced Universe Design—Learner’s Guide . if start is positive.)) if start is negative. length characters long.instr( CLIENT.position) instr('some string'. Can be used as: instr('some string'.1.' ')-1) Fn_Length() Length() Substr() Substr() returns part of a character string beginning at start position.CLIENT_AREA_CODE.CLIENT_AREA_CODE. Lesson 3 .CLIENT_NAME. based on SQL examples used in the course.'search string'.CLIENT_AREA_CODE. Oracle counts backwards from the end of the string. This example returns the first four characters of the Client Name column: substr(CLIENT. Oracle returns all characters to the end of the string.occurence) CharIndex() Course example syntax: instr(CLIENT.'search string') instr('some string'.position.CLIENT_NAME.

) WW W IW D DAY SQL syntaxes for other RDBMS—Learner’s Guide 191 . 4.CLIENT_PHONE_NO.instr(CLIENT.SALE_DATE.CLIENT_PHONE_NO ELSE substr(CLIENT.CLIENT_PHONE_NO. 2.CLIENT_PHONE_NO. 3.'(') . Abbreviated name of month.')')) END Lesson 3 .'(') WHEN 0 THEN CLIENT. Week of year (1-52 or 1-53) based on the ISO standard. spelled out 4-digit year Quarter of year (1. Name of day. Month (01-12. Week of month (1-5) where week 1 starts on the first day of the month and ends on the seventh.Constructing relative date-time objects SQL Server Oracle Oracle uses TO_CHAR() to extract date parts: TO_CHAR(SALE. JAN-MAR = 1). Name of month Week of year (1-53) where week 1 starts on the first day of the year and continues to the seventh day of the year. Day of week (1-7).instr(CLIENT.CLIENT_PHONE_NO.'Q') You can add the following parameters to the To_char function to extract date parts: YEAR YYYY Q MM MON MONTH Year. JAN = 01).SQL Server CAST() Oracle CAST() CASE WHEN THEN ELSE END or Decode() Course example syntax: CASE WHEN THEN ELSE END CASE instr(CLIENT. {fn year()} {fn month()} {fn week()} {fn dayofweek()} Datepart(qq.

RENTAL.SALE_TYPE='R' ) GROUP BY TO_CHAR(RENTAL. Datepart(mm.SQL Server Oracle DD DDD DY Day of month (1-31). TO_NUMBER(TO_CHAR(RENTAL.SALE_TYPE='R' ) GROUP BY Datename(mm. To_Char() Sysdate() or current_date() to_date(to_char(Sysdate(). To add a "Q" for formatting: CONCAT('Q'.SALE_DATE).Working with advanced LOVs SQL Server SELECT max(Datename(mm.sysdate()) to_date(to_char(@Select(Sales Dates\Sales Date Prompt).'MM')).SALE_DATE) Oracle SELECT max(TO_CHAR(RENTAL.SALE_DATE)) FROM SALE RENTAL WHERE ( RENTAL.'YYYY') 'YYYY') to_date(to_char(@Select(Sales Dates\Sales Date Prompt).SALE_DATE. You can use months_between(date 2.SALE_DATE. Substr() DateDiff() There is no real equivalent in Oracle.'MM')) FROM SALE RENTAL WHERE ( RENTAL. date ) DateAdd() You can also use the Add_Months() function.RENTAL.SALE_DATE.'MM') 'MM') DateName() Current Date Current Year Current Month Next Year Sales Year Prompt Sales Month Prompt Lesson 4 . date 1)or subtract one date directlyt from another date.TO_CHAR(SALE.'MM')) 192 Advanced Universe Design—Learner’s Guide . Abbreviated name of day.SALE_DATE.'MM') 'MM') Add_Months(12. Day of year (1-366).RENTAL.'Q')) DATEADD ( datepart .'YYYY') 'YYYY') to_date(to_char(Sysdate(). number.

SALE_DATE.SALE_DATE.'D') SQL syntaxes for other RDBMS—Learner’s Guide 193 .SALE_DATE.SALE_DATE.'D')) FROM SALE RENTAL WHERE ( RENTAL.SALE_DATE) Oracle ORDER BY TO_NUMBER(TO_CHAR(RENTAL.SALE_DATE).'D')) ORDER BY TO_NUMBER(TO_CHAR(RENTAL.SALE.'D')) CAST({fn dayofweek(SALE.SQL Server ORDER BY Datepart(mm.SALE_TYPE='R' ) GROUP BY TO_CHAR(RENTAL.'Day') + '.SALE_DATE) TO_CHAR(RENTAL.SALE_DATE)} ORDER BY{fn dayofweek(SALE.SALE_TYPE='S' ) GROUP BY Datename(weekday.'D')). {fn dayofweek(SALE.SALE_DATE.'MM')) SELECT max(datename(weekday.' + TO_CHAR(RENTAL.' + datename(weekday.SALE_DATE)} as Varchar) + '. TO_NUMBER(TO_CHAR(RENTAL.SALE_DATE)) FROM SALE WHERE ( SALE.SALE_DATE.SALE_DATE)} SELECT max(TO_CHAR(RENTAL.RENTAL.SALE.SALE_DATE. SALE.

Lesson 3 .)) Fn_Left() (or Left(.MySQL This section provides solution syntaxes for MySQL.1. CLIENT.Using database functions in objects SQL Server Substring() MySQL Substring() CharIndex() CharIndex() substring(CLIENT. INTERVAL 31 DAY) 194 Advanced Universe Design—Learner’s Guide .)) Ceiling() Floor() Round() CAST() CASE WHEN THEN ELSE END Length() Right() Left() Ceil() Floor() Round() CAST() CASE WHEN THEN ELSE END Lesson 3 . based on SQL examples used in the course. ) Quarter() DATE_ADD(date.Constructing relative date-time objects SQL Server MySQL Year() {fn year()} Month() {fn month()} MonthName() {fn week()} Week() {fn dayofweek()} WeekDay() Datepart(qq.CLIENT_AREA_CODE.charindex(' '.INTERVAL exprunit) DateAdd() SELECT DATE_ADD('1998-01-02'.CLIENT_AREA_CODE)) Fn_Length() Fn_Right() (or Right(.

Month(RENTAL.SALE_TYPE='R' ) GROUP BY Datename(mm.SALE_DATE) SELECT max(datename(weekday.SALE_DATE)) FROM SALE RENTAL WHERE ( RENTAL.SALE_DATE).SALE_DATE) MySQL SELECT max(MonthName(RENTAL.SALE_DATE)) FROM SALE RENTAL WHERE ( RENTAL.RENTAL.RENTAL.SALE_TYPE='S' ) SELECT max(WeekDay(RENTAL.TO_DAYS(date1) MonthName() DateName() WeekDay() Current Date Current Year CURDATE() or NOW() to_date(to_char(Sysdate(). Datepart(mm. INTERVAL 12 MONTH) Year(@Select(Sales Dates\Sales Date Prompt) Month(@Select(Sales Dates\Sales Date Prompt) Lesson 4 .SALE_TYPE='R' ) GROUP BY MonthName(RENTAL.Working with advanced LOVs SQL Server SELECT max(Datename(mm.RENTAL.SALE_DATE).SALE_DATE) ORDER BY Datepart(mm.SALE_DATE)) FROM SALE RENTAL WHERE ( RENTAL. SQL syntaxes for other RDBMS—Learner’s Guide 195 .SALE_DATE).SALE.'YYYY') 'YYYY') Month(CURDATE()) Current Month MonthName(CURDATE()) Next Year Sales Year Prompt Sales Month Prompt DATE_ADD(CURDATE().SQL Server DateDiff() MySQL DateDiff() or TO_DAYS(date2) .SALE_TYPE='R' ) GROUP BY WeekDay(RENTAL.SALE_DATE)) FROM SALE WHERE ( SALE.RENTAL.SALE_DATE) ORDER BY Month(RENTAL.

SALE_DATE)} MySQL Week(RENTAL.SALE_DATE).SALE_DATE) 196 Advanced Universe Design—Learner’s Guide .SQL Server GROUP BY Datename(weekday.' + WeekDay(SALE.SALE_DATE) CAST({fn dayofweek(SALE.SALE. SALE.SALE_DATE)} as Varchar) + '.' + datename(weekday.SALE_DATE) CAST(Week(SALE.SALE_DATE) ORDER BY Week(RENTAL.SALE_DATE)} ORDER BY{fn dayofweek(SALE. {fn dayofweek(SALE.SALE_DATE) as Varchar) + '.

'(') WHEN 0 THEN CLIENT. Lesson 3 .)) Fn_Left() (or Left(.)) Ceiling() Floor() Round() CAST() Length() Right() Left() Ceil() Floor() Round( number.Using database functions in objects SQL Server Substring() DB2 Substr() LOCATE(<Search String>.')')) END Lesson 3 . <Starting Position>) CharIndex() Course example syntax: substr(CLIENT.CLIENT_PHONE_NO ELSE substr(CLIENT.LOCATE(' '. [ decimal_places ] ) CAST() CASE WHEN THEN ELSE END Course example syntax: CASE WHEN THEN ELSE END CASE LOCATE(CLIENT.CLIENT_PHONE_NO. based on SQL examples used in the course.CLIENT_AREA_CODE)) Fn_Length() Fn_Right() (or Right(.DB2 This section provides solution syntaxes for DB2.CLIENT_AREA_CODE.1.LOCATE(CLIENT.'(') .CLIENT_PHONE_NO.LOCATE(CLIENT.Constructing relative date-time objects SQL Server {fn year()} {fn month()} {fn week()} {fn dayofweek()} DB2 Year() Month() MonthName() DayOfWeek() SQL syntaxes for other RDBMS—Learner’s Guide 197 .<Actual String>.CLIENT_PHONE_NO.CLIENT_PHONE_NO. CLIENT.

SALE_DATE +5 months SALE.SALE_DATE -5 year SALE.SALE_DATE -5 day SALE.SQL Server DB2 Week() Day() Datepart(qq.<datetype>" and "+ datetype" SALE. ) DayName() Quarter() DB2 adds date values by using ".SALE_DATE +5 day DateAdd() SALE.SALE_DATE +5 year DateDiff() timestampdiff() or DateDiff() MonthName() DateName() DayOfWeek() DayName() Current Date DATE() or Current Date Year(Date()) Current Year Year(Current Date) Month(Date()) Current Month Month(Current Date) Next Year Sales Year Prompt Sales Month Prompt Year(Current Date + 1 year) Year(@Select(Sales Dates\Sales Date Prompt) Month(@Select(Sales Dates\Sales Date Prompt) 198 Advanced Universe Design—Learner’s Guide .SALE_DATE -5 months SALE.

SALE.RENTAL.SALE_TYPE='R' ) GROUP BY Datename(mm.Lesson 4 .RENTAL.SALE_DATE)} as Varchar) + '.SALE_DATE) as Varchar) + '.RENTAL.SALE_DATE)) FROM SALE RENTAL WHERE ( RENTAL.SALE_DATE)} SELECT max(DayOfWeek(RENTAL. Datepart(mm.RENTAL.SALE_DATE).SALE_DATE) ORDER BY Week(RENTAL.SALE_DATE)} ORDER BY{fn dayofweek(SALE.SALE_TYPE='S' ) GROUP BY Datename(weekday.SALE_DATE)) FROM SALE RENTAL WHERE ( RENTAL.SALE_DATE) SELECT max(datename(weekday.' + datename(weekday.' + DayOfWeek(SALE.SALE_DATE).SALE. {fn dayofweek(SALE.SALE_DATE) ORDER BY Month(RENTAL. SALE. Month(RENTAL.SALE_DATE) ORDER BY Datepart(mm.SALE_DATE)) FROM SALE RENTAL WHERE ( RENTAL.SALE_DATE)) FROM SALE WHERE ( SALE.SALE_DATE).SALE_DATE) SQL syntaxes for other RDBMS—Learner’s Guide 199 .SALE_TYPE='R' ) GROUP BY DayOfWeek(RENTAL. Week(RENTAL.SALE_DATE).SALE_DATE) CAST(Week(SALE.SALE_TYPE='R' ) GROUP BY MonthName(RENTAL.Working with advanced LOVs SQL Server SELECT max(Datename(mm.SALE_DATE) DB2 SELECT max(MonthName(RENTAL.SALE_DATE) CAST({fn dayofweek(SALE.

200 Advanced Universe Design—Learner’s Guide .

Answer Key—Learner’s Guide 201 .Answer Key This section contains the answers to the reviews and/or activities for the applicable lessons.

202 Advanced Universe Design—Learner’s Guide .

3. ○ Data is secure. ○ The interface allows you to create a universe in an easy-to-use graphical environment. What is a universe? Answer: The BusinessObjects universe is the semantic layer that isolates business users from the technical complexities of the databases where their corporate information is stored. Users can see only the data exposed by the universe.Review: Using universe design concepts Page 2 1. Describe the connection types and their purposes. Answer: ○ Dimension: These objects relate to the key information being retrieved from the database. universes are made up of objects and classes that map to data in the database. ○ Users can use a simple interface to create reports. ○ The results are reliable and the universe is relatively easy to maintain. Data is not stored in the . They can be date. Does a universe store data? Answer: You associate data to universes by mapping to a data source. Answer Key—Learner’s Guide 203 . ○ Shared: Use this connection to share your universe across the network with other designers. Answer: ○ Secured: Use this connection to enable your universe to be exported to the BusinessObjects Enterprise repository. ○ Personal: Use this connection if the universe is solely for a single user and there is no need to neither share nor publish this universe to the Enterprise system. and may contain a calculation. For the ease of the end user. They are used in queries and condition/filters and can also be used to drill on in hierarchies and link on between queries. character. Users can only read data. ○ All users work with consistent business terminology. What are the types of objects that can be created in a universe? Provide a brief description of each type. What are the main advantages of a universe? Answer: ○ Only the universe designer needs to know how to write SQL and understand the structure of the target database. ○ Users can analyze data locally. 4. 5. 2. or number type. not edit it. using everyday terms that describe their business environment.unv file.

Count. ○ Outer: This join works in the same way as an equi-join. Ideally. or can contain a complex where clause. ○ Predefined Condition/Filter: These objects contain a name. and may contain a calculation. a description and a restriction. They are used in queries and condition/filters but cannot be used to drill on or link on between queries. For example. containing functions like Sum. ○ Shortcut: A shortcut join is a join that provides an alternate path between two tables. This join should not be used as it creates a loop. a join between Customer and Sales would be based on Customer ID. for example sales date between begin date and end date. Max. therefore returning data from both tables where the data matches. character. but all customers must be reported on regardless of sales. or Min. and the requirement is for the data to be returned regardless. then this join would allow that flag to be referenced every time the table is used in the SQL statement. Answer: ○ Equi: This join works on the principle of the data in the fields that are a joined match. ○ Complex/Theta: This join works on the Between principle. ○ Measure: These objects are dynamic aggregates and are always a number type.A chasm trap is essentially a many-to-one-to-many relationship and may be seen as a parent table with two child tables. they dynamically aggregate themselves when displayed in the report block. Provide a short description of each type. What are the different types of SQL traps that can be found in a schema? How can each of these types be identified? How can each type be resolved in the universe schema? Answer: • Chasm Trap: ○ Identify . 6. or number type. and shortening a normally longer join path. They can be date. For example. for example Customer ID = Customer ID. ○ Self-referencing: A self-referencing join is a join from one column of a table to another column of the same table. Depending on the other objects in the query. Average. if this join exists. a sales date may be joined to a begin and also an end date in a table which is date based. the child tables having the many end 204 Advanced Universe Design—Learner’s Guide . however a customer may still be prospective and not have any records in the sales table.○ Detail: These objects relate to supportive information and are associated with dimensions. What are the different join types allowed in the universe structure. then the table should be aliased and the appropriate join and cardinality should be assigned. 7. If there is a field that can be used as a flag on a table. however there may be data in one table but not the other. They can be quite basic. They are designed to give the user a choice as to whether to apply a condition filter or not. ○ Self-restricting: This join works as a restriction on the table. It improves the performance of a query by not taking into account intermediate tables.

in different queries.If they can be avoided by using the lowest level of granularity then this is the best practice. either too many or not enough rows (but aggregation may be affected) are produced. Answer: To test a measure correctly. this is a conflict so no data is returned. as this is how they can reuse code between objects. Applying a total to the tables checks (if they are all the same total) the aggregation level from the database.what is the issue is if there are two fields being used as aggregates and they are at different levels in the path. Once the table has been projected. a minimum of three queries should be created. In which case.Explain two drawbacks of using restrictions at the object level. The measure with two different dimensions.of the relationship. Describe how you would test a measure to make sure the aggregation levels are projected correctly. Answer Key—Learner’s Guide 205 . 10. it does have benefit to the designer. This can give the same result as a chasm trap. The measure on its own.Best resolved by using contexts. however that isn't always possible. 3. For example: UK customers. ○ Resolve . Answer: The @select function has no benefit to the end user. this isn't an issue . 11. 8. 2. depending on the objects used. 9.A fan trap is identified as a one-to-many or a one-to-many-to-many relationship. forming a circle. Fan Trap: ○ Identify . Answer: Two drawbacks: 1. US customers. 2. Creates a flat level at the end of the class making drilling through the hierarchy difficult. or loop. Effectively you are saying they must be UK and US at the same time. In itself. However. ○ • Resolve . a combination of aliases and contexts resolves the fan trap. remove the dimensions and then add them again using the drag and drop method. Usually the error Incompatible combination of objects alerts you to the fact you may have a loop.Describe the use of the @select function. 1. This checks the aggregation in the report is correct. If a query is run with a chasm trap. Conflicting restrictions in the objects may be confusing if those objects are placed in the query. What are loops and how can they be resolved? Answer: Loops are joins between tables that (eventually) come back to the starting point.

instead of aliasing tables based on their flag and using self-restricting joins 14. 206 Advanced Universe Design—Learner’s Guide . Answer: A derived table is a table that contains an SQL statement. It is set up via the object properties.What are the pros and cons of delegated functionality in a universe-based reporting structure? Answer: Delegated or "smart" measure objects were discussed in the core Universe Design class. The objective is to shift the responsibility for the aggregation to the data source. It is generally used: • When it is not possible to create a table at the database level. 15.12. Hierarchies can be default (or natural) and custom. and how it is used in a universe schema. Answer: Index awareness is a way of utilizing the indexing in the database to enable queries to be more efficient in the SQL that they generate. instead of the universe This allows for complex and weighted calculations of dimensional subsets.Describe what a derived table is and how it is generally used in a universe schema.Describe what index awareness is. especially if there is a need to link two otherwise un-linkable tables together • To create a table based on a restriction .What is a hierarchy? Answer: A hierarchy is the order of dimensions in a "class" in a one-to-many order. but requires a refresh to the data source in order to display the results in the Web Intelligence report. 13.

How does the @aggregate_aware function improve query performance? Answer: It directs the query to run against aggregate tables or summary tables. if any.Quiz: Working with aggregate awareness Page 28 1. 3. ○ Value calculation is not required. The tool you use in Universe Designer to set incompatibilities between objects and tables in the structure of the universe is called the ___________________ tool. Answer: Aggregate Navigation Answer Key—Learner’s Guide 207 . joins are required. whenever possible. 2. ○ Fewer. Why does using summary table data speed up response times? Answer: ○ There are fewer rows to process.

Answer: ○ RANK ( ) OVER (PARTITION BY) ○ ROW_NUMBER ( ) OVER (PARTITION BY) ○ SUM ( ) OVER (PARTITION BY) 3. Answer: True 2. Answer: True 208 Advanced Universe Design—Learner’s Guide . The @select function is an internal function that allows you. True or False. to reuse universe objects without forcing you to repeat the entire SQL syntax. List three different analytic(Transact-SQL) functions.Quiz: Designing advanced objects Page 57 1. True or False: You can use all database functionality over and above what is listed in the functions list in the Select and Where fields. as the designer.

When setting up a predefined condition that returns a pattern. Answer: True 2.Quiz: Creating complex predefined conditions and LOVs Page 84 1. True or false? Using subqueries allows you to use aggregate functions in the WHERE clause. What functions cannot be used in a join definition? Answer: @select and @where Answer Key—Learner’s Guide 209 . what two important syntaxes are required to achieve this? Answer: LIKE and % 3.

Quiz: Securing universes Page 99 1. This only applies to the Use BusinessObjects credential mapping option. all users in the CMS that need to use this connection will require having their database user credentials set in the CMS. you can group universes in folders and set appropriate access rights per folder. When the Use Single Sign-On when refreshing reports at view time option is selected for a connection. Answer: True. True or False. Universe security can be managed at which levels? Answer: ○ Connection credentials and data source ○ Central Management Server ○ Universe 2. 3. True or False. Answer: False. Instead of denying access per universe file. 210 Advanced Universe Design—Learner’s Guide .

0/3. It uses CUID to find the dependencies. Answer: True. It also lets you specify what you want the wizard to do when it finds that an object already exists on the destination environment. True or False. 3.1 deployment to another. Answer Key—Learner’s Guide 211 . or the CMS database. When importing documents from a BIAR file. The Import Wizard acts as a bridge between the source repository and target repository. Answer: True. When using the Import Wizard to promote an object from one BusinessObjects Enterprise XI 3. both the universe name and path are used for finding dependent documents. True or False. 2. Answer: False. It can promote content between clusters on the same network (LAN or WAN). the wizard allows you to use either the objects CUID or its name and path to determine whether the object already exists on the destination environment. True or False.Quiz: Implementing universe life cycle management Page 116 1.

Adding new tables or columns to the database impacts the reports that are already created and refreshed regularly by end users. 3. Answer: False.Quiz: Maintaining and optimizing universes Page 147 1. 2. True or False. In the case of a column name change. True or False. you only need to edit all the objects that referred to the original column. Setting the FILTER_IN_FROM parameter to Yes moves the SELECT clause data of a query to the FROM clause. Answer: False. 212 Advanced Universe Design—Learner’s Guide . True or False. Answer: True.

True or False. 2. Update an existing universe when the metadata has been updated. True or False. consisting of one or more SQL statements. Answer: True. Export a universe to a metadata format. Answer: True. Answer Key—Learner’s Guide 213 . When creating an OLAP universe. 3. Stored procedures are represented as Derived Tables. What three tasks can you perform in the Metadata Exchange panel? Answer: • • • Create a new universe from a metadata file. thus they benefit from Derived Table mechanisms and concepts. which resides and runs on the target database. A stored procedure is a compiled SQL program. 4.Quiz: Creating universes from other data sources Page 169 1. no tables are generated in the Structure pane. Answer: True. True or False.

214 Advanced Universe Design—Learner’s Guide .

Notes .

Notes .

Notes .

Notes .

Sign up to vote on this title
UsefulNot useful