Framework Manager
Framework Manager
A model is the set of related dimensions, query subjects, and other objects required for one or more related reporting applications. The Framework Manager model is a metadata layer that adds value to a data source in several ways. Most importantly, it provides a business view of the information in the source data to simplify building reports, analyses, and queries. The business view can organize items in folders that represent business areas for reporting format items using numeric, currency, date, time, and other formats present multilingual folder and item names, descriptions, tips, and data so that users can operate in their language of choice automate the generation of SQL queries sent to the relational data source specify default prompting This can include having Cognos 8 prompt the user using a descriptive name while actually filtering on a code or key value for improved query performance. In particular, you can modify the Framework Manager model to ensure that queries sent to the data source are efficient, well formed, and secure. You can specify the rules governing query generation, restrict user access to specific rows or columns of data, and model data relationships to hide the complexity of data from your users.
Namespaces
A namespace uniquely identifies query items, dimensions, query subjects, and other objects. You import different databases into separate namespaces to avoid duplicate names.
Packages
A package is a subset of the dimensions, query subjects, and other objects defined in the project. A package is what is actually published to the Cognos 8 server, and it is used to create reports, analyses, and ad hoc queries.
Dimensions
A dimension is a broad grouping of data about a major aspect of a business, such as products, dates, or markets. The types of dimensions that you can work with in Framework Manager are regular dimensions and measure dimensions. In SAP BW, measure dimensions are called key figures.
Query Subjects
A query subject is a set of query items that have an inherent relationship. In most cases, query subjects behave like tables. Query subjects produce the same set of rows regardless of which columns were queried. There are different types of query subjects: data source Data source query subjects directly reference data in a single data source. Framework Manager automatically creates a relational data source query subject for each table and view that you import into your model. model Model query subjects are not generated directly from a data source but are based on query items in other query subjects or dimensions, including other model query subjects. By using model query subjects, you can create a more abstract, business-oriented view of a data source. stored procedure Stored procedure query subjects are generated when you import a procedure from a relational data source. Framework Manager supports only user-defined stored procedures. System stored procedures are not supported.
Query Items
A query item is the smallest piece of the model that can be placed in a report. It represents a single characteristic of something, such as the date that a product was introduced. Query items are contained in query subjects or dimensions. For example, a query subject that references an entire table contains query items that represent each column in the table. For your users, query items are the most important objects for creating reports. They use query item properties of query items to build their reports.
Icon
Object Project
Data source
Parameter map
Packages folder
Package
Published package
Dimension
Hierarchy
Level in a hierarchy
Measure dimension
Measure
Icon
Query subject that contains query items whose Usage property is set to Fact
Query item
Embedded calculation
Calculation
Filter
Relationship
Icon
The object is checked into the repository. This icon appears over other icons.
The object is checked out of the repository. This icon appears over other icons.
The object is checked out of the repository by a different user. This icon appears over other icons. Linked segment or project that was updated. This icon appears over other icons.
change the settings for the diagrams change the layout of objects to either star layout or standard layout by clicking Auto Layout from the Diagram menu focus on an object by clicking Set Focal Point from the Diagram menu. find an object by right-clicking the object in the Project Viewer and clicking Locate in Diagram. zoom in or out by clicking Zoom from the Diagram menu. expand or collapse all objects from the Diagram menu. focus on the dimensions in the model by clicking Dimensions view from the Diagram menu. save the diagram for printing by clicking Screen capture from the Diagram menu and specifying the name of the picture.
1. From the Diagram menu, click Diagram settings. 2. Set the level of detail. You can select query items, relationships, scope relationships, cardinality, and descriptions. 3. Select the type of notation. You can use Merise or Crowsfeet notation. By default, Framework Manager uses Merise notation. Merise notation marks each end of the relationship with the minimum and maximum cardinality of that end. You can also use Crowsfeet notation, which provides a pictorial representation of the relationship. 4. To align objects more easily, turn the Snap options on. 5. To have a network of evenly spaced lines in the background, select the Display grid check box. 6. Select the font and color for text. 7. If you are working in the Context Explorer, under Options for Context Explorer, specify showing objects with or without their related objects. If you change this option, it is applied the next time you open the Context Explorer. 8. Click OK.
The Measures and Attributes tabs appear after you click the Dimension Map tab. Use the Measures tab to view or modify all the measures and scope relationships that are available in the model. Use the Attributes tab to view or modify the role of the selected query item. You can also embed calculations in the query item. Tip: The best way to view SAP BW metadata is in the star layout. From the Diagram menu, click Auto Layout Diagram, and then select Star.
If you need more room, you can resize the Properties pane or move it so that it floats in the window. For example, if you have more than one monitor, you can then move the Properties pane to another monitor.
nation is replaced with This country and that country. However, "national" will be replaced with "countryal". Tip: Before replacing property values, enlarge the Properties pane and widen the column of the property whose value you want to replace.
Steps
1. In the Project Viewer window, select multiple objects. Tip: To reduce the set of properties to search for before performing the replace, filter the properties first. On the Properties tab, right-click the column heading you want to filter on and click Set Autofilter. 2. Choose one of the following: o o If your model contains multiple languages, click the Language tab. If your model contains only one language, click the Properties tab.
3. Right-click the column heading for the property whose values you want to replace, and click Bulk Replace. 4. In the Search for and Replace with boxes, type the search and replace text strings. Tip: To replace empty properties, leave the Search for box blank. 5. To perform a case-sensitive search, select the Match case check box. 6. To search for the complete property text, select the Match entire cell contents check box. Tip: To replace all property fields, regardless of the text they contain, type one asterisk in the Search for box and select the Match entire cell contents check box. 7. Do one or more of the following: o o o o Click Replace to replace the currently selected object and find the next match. Click Next to select the next matching object. Click Replace All to replace all matching properties, starting from the first matching property in the list. Click Close if you are finished replacing.
As the changes to a property are made, the results appear on the tab. When the bulk replace reaches the last object in the list, a message appears showing the number of replacements.
You can change the Tools pane into a separate window. To do this, click the title bar of the pane and drag it in any direction until the outline of pane becomes a thick line. You can now drag the Tools window to any location on your desktop. To change the window back to a pane inside the Framework Manager window, drag it to one of the Framework Manager borders until the window outline becomes a thin line.
1. In the Tools pane, click the Search tab. Tips: o If the Tools pane is not visible, from the View menu, click Tools. You can drag the Tools pane to the bottom of the Framework Manager window and resize it to have a better view of the search results. To reduce the set of search properties, filter the properties first. On the Properties tab, right-click the column header you want to filter on, and click Set Autofilter.
2. In the Search String box, type the text that you want to find. You can use uppercase, lowercase, or mixed case strings. The search is not case sensitive. Valid wildcard characters are "*" and "?".
4. In the Condition list, select a condition to apply to the search string. The Condition box determines how the Search string value is matched with text in the model. It contains a list of possible search conditions. If you want to search using wildcard characters, use the equals condition. A regular expression is a complex and powerful method for matching text strings. To search using a regular expression, use the regular expression condition. A regular expression search is case sensitive. For example, to find all objects that contain the word "Car" search for the string "\Car", without the quotation marks. The value for the Condition box is saved from session to session. 5. In the Search in list, select the part of the model hierarchy that you want to search. The value for the Search in box is saved from session to session. 6. In the Class list, select the single class of objects that you want to search. 7. In the Property list, select the type of property that you want to search. The (All Properties) property searches all properties. The Object Name property restricts the search to the name of each object. The Text Properties property searches the set of properties that contain text strings, such as Description or Screen Tip, but not including the object name. The value for the Property box is saved from session to session. 8. Click Search. The results are listed at the bottom of the Search tab. Search results can contain multiple values, such as text properties, for a single object. When you click an object that has multiple values, all the values that belong to that object are selected. If your model contains multiple languages, the search results include properties for each language in the model. After you do one search, the Subset check box becomes available. If you select the Subset check box, the next search operates on the existing search results. The Subset check box is cleared after each search. You can do successive subset searches by selecting the Subset check box. 9. To see an object in the Project Viewer, click an object in the Search tab. 10. To see an object in the diagram, right-click an object in the Search tab and click Locate in Diagram. You can replace values for properties .
10
7. Leave the defaults for the Generate Relationship criteria. Click Import. Click finish, Yes
11
Task 2 Organize using folders and namespaces. 1. We will create a new Namespace and name it Physical View a) Right Click the great_outdoors_sales Namespace b) select create namespace.
c) A Namespace will be created at the bottom of the greatoutdoors_sales namespace in the Project viewer. Right Click on New Namespace, choose rename, and type in Physical View
2. Select all the tables and objects under the great_outdoors_sales namespace and Cut and Paste into the namespace you just created called Physical View. (or drag and drop)
12
3. Create a second Namespace and name it Business View following the steps above for Physical View without cutting and pasting the tables and objects
13
Task 3 Modify or Create relationships 1. In the Project Viewer, select the Physical View 2. Select the Diagram icon from the window beside the Project Viewer. Close all other windows if needed 3. The query subjects from the Physical View appear in the object diagram 4. Change the zoom % to 50 5. Notice the icon in the bottom right corner. This allows you to quickly navigate to your desired spot
6. In the Project Viewer window, Expand the Physical View, select the BRANCH query subject. Right-click and select Locate in Diagram 7. Double-click the relationship between BRANCH and INVENTORY_LEVELS
14
Note the text for Relationship impact: Each INVENTORY_LEVLES has one and only one BRANCH Each BRANCH has zero or more INVENTORY LEVELS (outer join)
Task 4 Insert a Filter in the SQL of a Query Subject in the Physical View 1. Select the ORDER_DETAILS query subject in either the Project Viewer, or in the diagram 2. Doubleclick or Right-mouse and select edit definition 3. Select the filters tab 4. Add a filter (icon at the bottom). From great_outdoor_sales, Physical View, Order Details, drag Product Number to the expression definition window. Create the following expression: ORDER_DETAILS.PRODUCT_NUMBER in (41110,69110,75110) It can be typed in or built using the Functions tab
15
5. Click OK, choose the Test tab, click Test Sample. Click OK
You can quickly and easily alter the SQL of a data source query subject to meet your needs. You can modify your SQL to include filters, calculations, UNIONS, nested select statements, or any other SQL requirement you may have. This gives the metadata modeler control over what data is returned when a query is executed. Task 5 Create a Business View A best practice is to create multiple functional views of your data for end users 1. Select the Business View. Right Click - Create a Query Subject, name it Order Information. Click OK
16
2. Select the data that defines the query subject. In the available model objects pane, expand great_outdoor_sales, expand Physical View 3. In the Available Model Objects pane, expand the Order Header query subject, and use ctl click to select the following: ORDER_NUMBER, RETAILER_NAME, ORDER_DATE 4. Drag the selected items into the Query Items and Calculations pane
17
5. Perform the same operations open the ORDER_METHOD and ORDER_DETAILS query subjects to get the following: ORDER_METHOD ORDER_METHOD_EN ORDER_DETAILS PRODUCT_NUMBER QUANTITY UNIT_COST UNIT_PRICE UNIT_SALE_PRICE
18
19
Task 6 Create a calculation in the business layer 1. In the Project Viewer, expand the Business View, select Order Information, right-click, and select Edit Definition. The Query Subject Definition dialog box appears. 2. Select the Add icon. The calculation definition window appears
3. In the Name box, type Margin 4. In the Available Components window, expand great_outdoor_sales, Business View, Order Information and then double-click UNIT_SALE_PRICE 5. Select the Functions tab, expand Operations, and then double-click the minus operator 6. Select the Model tab and then within Order Information double-click UNIT_COST
20
7. Click OK, choose the Test tab, click Test Sample. Click OK
21
Task 7 Creating and Publishing a Package When a modeler publishes a package, it is published to the content store. 1. In the Project Viewer window, right-click Packages, create package. The Create Package Wizard appears 2. In the Name box, type Workshop Package and then click Next 3. Click on green check mark next to Physical View, This will leave only the Business View to be published (available to users). Click Next 4. The Add Security dialog box appears, click Next 5. Click Finish 6. Click Yes to Publish, click next 7. Click Publish, then Finish, then Close Task 8 View the package in Cognos Connection and the run-time model in Query Studio 1. Open Internet Explorer 2. In the Address box, type http://localhost/Cognos8, and then press Enter. The Log on page appears. 3. Click the Public Folders tab. Notice that the Workshop package appears as an entry within Public Folders. From the timestamp, we can see that this is a package we just published from Framework Manager.
22
23