framework manager

70
Cognos Framework Manager is a metadata modeling tool. A model is a business presentation of the information in one or more data sources. When you add security and multilingual capabilities to this business presentation, one model can serve the needs of many groups of users around the globe. The model is packaged and published for report authors and query users. Report authors use the published package in Cognos Report Studio to create standardized reports. Query users use the package in Query Studio to create adhoc queries. Objects You Will Work With When you work in Framework Manager, you work in a project. A project contains a model, namespaces, data sources, and packages. A model is the metadata layer that you imported from one or more data sources. The model provides a business presentation of the metadata. After you define a Framework Manager project and namespace, you can publish one or more packages containing metadata information to the Cognos ReportNet server for use by authors and query users. After a package is published to the Cognos ReportNet server, users can create reports and queries in the Cognos ReportNet server runtime environment. Projects A project is a set of models, packages, and related information for maintaining and sharing model information. Often a single project will span many more data sources or tables than any set of users requires access to. Models A model is the set of related 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 report authors and query users to simplify building reports and queries. The business view can • organize data items in folders that represent business areas for reporting

Upload: ram-kittu

Post on 14-Oct-2014

614 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Framework Manager

Cognos Framework Manager is a metadata modeling tool. A model is a business presentationof the information in one or more data sources. When you add security and multilingualcapabilities to this business presentation, one model can serve the needs of many groups ofusers around the globe.The model is packaged and published for report authors and query users. Report authors usethe published package in Cognos Report Studio to create standardized reports. Query usersuse the package in Query Studio to create adhoc queries.

Objects You Will Work WithWhen you work in Framework Manager, you work in a project. A project contains a model,namespaces, data sources, and packages.A model is the metadata layer that you imported from one or more data sources. The modelprovides a business presentation of the metadata.After you define a Framework Manager project and namespace, you can publish one or morepackages containing metadata information to the Cognos ReportNet server for use by authorsand query users.After a package is published to the Cognos ReportNet server, users can create reports andqueries in the Cognos ReportNet server runtime environment.ProjectsA project is a set of models, packages, and related information for maintaining and sharingmodel information. Often a single project will span many more data sources or tables than anyset of users requires access to.ModelsA model is the set of related query subjects and other objects required for one or more relatedreporting applications.The Framework Manager model is a metadata layer that adds value to a data source in severalways. Most importantly, it provides a business view of the information in the source data toreport authors and query users to simplify building reports and queries.The business view can• organize data items in folders that represent business areas for reporting• format data items with numeric, currency, date, time, and other formats• present multilingual folder and item names, description, tips, and data so that users canoperate in their language of choice• automate the generation of SQL queries sent to the database• specify default prompting.This can include having Cognos ReportNet prompt the user with a descriptive name whileactually filtering on a code or key value for improved query performance.The Framework Manager modeler can• specify the rules governing query generation• restrict user access to specific rows or columns of data• model data relationships to hide the complexity of data from report authorsNamespacesA namespace uniquely identifies query items, query subjects and other objects. Youimport different databases into separate namespaces to avoid duplicate names.PackagesA package is a subset of the query subjects and other objects defined in the project. Apackage is what is actually published to the Cognos ReportNet server, and it is used to createreports and adhoc queries.Query ItemsFor report authors, query items are the most important objects for creating reports. Query itemshave more properties than query subjects. These properties are what report authors use tobuild the reports they want.Query items are contained in query subjects. For example, a query subject that references anentire table contains query items that represent each column in the table.

Page 2: Framework Manager

Query SubjectsFor modelers, query subjects and relationships are the most important objects in the model. Inconjunction with relationships, you use query subjects to build the queries that get the answersyou want. A project is built upon query subjects.There are several types of query subjects:• data source• model• stored procedureA data source query subject directly references data in a single data source. When metadata is first imported, a data source query subject is created by default for each table you select. Default relationships between query subjects are created for you automatically.You can refine data source query subjects in various ways. For example, you can addcalculations or filters, or you can add or modify relationships between query subjects to definethe query generation rules for report authors.

Model query subjects can contain query items from an arbitrary set of data source querysubjects. Model query subjects can be enhanced by adding filters or calculations tocreate additional query items. You can also use query subjects from other model query subjects.

The stored procedure query subject operates much like a data source query subject in that itdefines a set of query items that are available to the model from the underlying data source.Stored procedure query subjects cannot be enhanced by filters or calculations.

Recommended Workflow for Relational MetadataWhen you prepare relational metadata for use in a reporting application, you must identify therelationships and aggregations that are necessary to generate efficient queries. The reportauthor uses the published model structure that you provide to design reports and generatequeries.You follow this process to create a model:

Analyze the problem. Create a new Framework Manager project and import the required data and metadata as

data source query subjects. Analyze and verify all relationships, keeping only those you need. Add any missing

relationships. Resolve ambiguous relationship paths and verify cardinality. Modify query subjects as needed so that they can be reused throughout the model. This

will simplify maintenance of the model. Add multilingual support, such as folder and item names, descriptions, tips, and data, so

that your users can operate in their language of choice. Verify the properties for all query items, especially usages, aggregates, and dimensional

information. Add business rules, such as security, calculations, filters, and prompts. Create a business view that contains model query subjects and shortcuts.

The business view makes it easier for report authors and business authors to find andunderstand their data.

Use star schema groups to isolate the fact tables that share one or more conformeddimensions.

Use shortcuts where possible, instead of copies.Shortcuts make it easier to maintain metadata because changes to the target object arereflected in the shortcut.

Define the packages to be published to the Cognos ReportNet server.

Page 3: Framework Manager

Designing a Project

Project FilesWhen you work in Framework Manager, you work in the context of a project. The FrameworkManager project contains objects that you organize for reporting authors according to thebusiness model and business rules of your organization.A Framework Manager project appears as a folder that contains a project file (.cpf) and thespecific .xml files that define the project. The files in a project folder are unique to each project.

Create a ProjectBefore you can import metadata, you must create a project.Steps1. From the Welcome page, click Create a new project.2. In the New Project page, specify a name and location for the project.3. If you want to add the project to a source control repository, click Repository, and thenselect the Add to repository check box.4. Click OK.5. In the Select Language page, click the design language for the project.The language you select cannot be changed after you click OK, but you can add others.6. Click OK.The Import wizard appears.7. Choose whether to import your metadata now or later.• To import, select the import source and click Next.• To delay importing metadata, click Cancel.

Open a ProjectTo import metadata into an existing project, you must first open the project.Steps1. From the Welcome page, click Open a project.2. Browse to locate the project folder and click the .cpf file.3. If you want to open a open a project directly from a source control repository, clickRepository.• In the Connection box, select the repository connection.• In the Project file in repository box, select the .cpf file for the project you want to add.• In the Create new local project folder in the directory and select the folder locationfor the project.• Click OK.4. Click Open.

The Project PageAfter you create or open a project, the project page appears. The project page isthe environment in which you design, package, and publish project metadata. This pagecontains several panes and views that you can use to view and modify the objects in a project.Project ViewerThe Project Viewer shows the objects in a project in a hierarchical view. You can use the ProjectViewer to view, modify, and create these objects:• query subjects • data sources • namespaces • parameter maps • folders• segments

Page 4: Framework Manager

• links • calculations• filters • packagesObject Diagram and Object Explorer ViewsYou can use both the Object Diagram and the Object Explorer Views to view, create, and modifyobjects and relationships. You can also create folders and namespaces to group objects.The Object Diagram View shows the relationships between objects in a project in a diagram.Relationships between query subjects are shown as lines with cardinality notation. Youcan expand objects that are grouped in folders to show the object hierarchy and therelationships between query subjects.Properties PaneThe Properties pane shows the properties of the objects you last selected in either the ObjectExplorer View, Object Diagram View, or Project Viewer. Object properties are set during import,and some property values can be modified during modeling. You can use the Properties pane toadd, modify, or delete the properties of objects.You can modify the properties for multiple objects at one time. If you select more than oneobject, Framework Manager shows only the properties that are common to all the objects.Summary PaneThe Summary pane shows the statistics and tasks available for a selected object.Search PaneWhen you are working with a large project, it can be difficult to locate the objects that you needto complete a task. The Search pane lets you quickly find objects by applying different searchcriteria. You can either search for the object name alone, or add additional criteria, such as thelocation, class, or a condition.

Naming Conventions for Objects in a ProjectAll objects in a project must have a unique way to identify them. The reference can consist ofone, two, or three parts, depending upon the type of object. The parts include• an object name• a location in the project hierarchy, as expressed in the default language of the project.Two-part IdentifiersQuery subjects and shortcuts to query subjects have a two-part identifier consisting of the nameof the containing namespace and the name of the object. The object name must be unique inthe nearest containing namespaceOne-part IdentifiersSome objects in a project have a one-part identifier. The one-part identifier must be uniqueacross the entire project, even if the namespace contains other namespaces. These are theobjects that have a one-part identifier:• namespaces• functions• shortcuts to namespaces• shortcuts to foldersThree-part IdentifiersSome objects in a project have a three-part identifier based on the identifier of the containingquery subject. Each name must be unique in the containing query subject. These are theobjects that have a three-part identifier:• query items• query item folders

Use Separate NamespacesNamespaces are containers like folders. You create a namespace in Framework Manager if youwant to have two objects that have the same name in a project. Objects in a FrameworkManager project must be uniquely identifiable. If you have two objects of the same type that

Page 5: Framework Manager

have the same name, they must reside in two separate namespaces.Steps1. Click the project or root namespace and from the Actions menu, click Create, and clickNamespace.2. Right-click the namespace, click Rename, and give the namespace a descriptive name.

Importing MetadataYou can import metadata into a new project, or an existing project. Importing metadata isan operation that can be performed many times to extend the project. You can also export yourmodel to a Common Warehouse Metamodel (CWM).Framework Manager can use the metadata and data from external data sources to build aproject.To import metadata, you must indicate which sources you want and where they are located. Ifyou want to add a project to a repository, you must set up the repository connection.You can import metadata from• relational databases, such as Oracle, DB2, and Microsoft SQL Server• SAP BW data sources• existing Cognos ReportNet models• Architect models and Impromptu catalogs• DecisionStream models• third-party metadata sources• XML as a data source

Import from a Relational DatabaseWhen you import from a relational database, you can import all the metadata or select particularobject types such as tables, columns, views, synonyms, stored procedures, and functions.Steps1. Click the namespace, folder, or segment you want to import into and, from the Actionsmenu, click Import Metadata.2. Follow the instructions in the Import wizard.• Select a data source connection.If the data source connection you want is not listed, you must first create it.• Select the check boxes for the objects you want to import.• Specify how the import should handle duplicate object names. Choose either to importand create a unique name, or not to import. If you choose to create a unique name, theimported object appears with a number. For example, you see QuerySubject andQuerySubject1 in your project.• Specify whether joins are generated based on indexes or keys. If necessary, change thecriteria to use to generate relationships.Import statistics showing a list of objects that could not be imported and a count of objectsthat were imported.3. Click Finish.After importing, you should check the usage and aggregation property values

Import from a Cognos ReportNet ModelYou can import metadata from an existing Cognos ReportNet model.Steps1. Click the namespace, folder, or segment you want to import into and from the Actionsmenu, click Import Metadata.2. Click Cognos ReportNet Model and click Next.3. Locate the Cognos ReportNet model (.cpf file) you want and click Open and click Next.4. Follow the instructions in the Import wizard:• Select the check boxes for the objects you want to import.• Specify how the import wizard should handle duplicate object names. Choose either toimport and create a unique name, or not to import.

Page 6: Framework Manager

If you choose to create a unique name, the imported object appears with a number. Forexample, you see QuerySubject and QuerySubject1 in your project.5. Click Next and click Finish.

Import from an Architect Model or an Impromptu CatalogTo import metadata from an Architect model or an Impromptu catalog, you must first convertthem to XML files.1. Ensure that you exported the Architect model or Impromptu catalog.2. Click the namespace, folder, or segment you want to import into and from the Actionsmenu, click Import Metadata.3. Click either Cognos Architect (.xml) or Cognos Impromptu (.xml) and click Next.4. Locate the Architect or Impromptu XML file that contains the metadata to import and clickOpen.A message in the XML Preview window confirms success.5. Click Import.A list of created objects appears.6. Click Finish.

Create a Data Source ConnectionWhen you create a data source, you also create a data source connection so that ReportNethas the connection and authentication information required to connect to the database.

You can include authentication information for the database in the data source connection bycreating a signon. This means that users need not enter database authentication informationeach time the connection is used. The authentication information is encrypted and stored on theReportNet server. The signon produced when you create a data source is available to theEveryone group. You can later modify who can use this signon or create more signons.

You can create data sources in the portal or in Framework Manager. Because they are stored onthe server, data sources appear in both Framework Manager and the portal, regardless ofwhere they were created. Existing data sources can only be managed in the portal.

The ReportNet administrator can set up the data sources before any models are created inFramework Manager so that all connections are available in the Framework Manager Importwizard.

Multiple Data Source ConnectionsIf you have access to more than one data source connection in a data source, you are promptedto select a data source connection when you open a Framework Manager project. You can usemultiple data source connections in a single data source to facilitate the migration from oneenvironment to another and maintain the integrity of a project.

Steps1. If you are not already using the Import wizard, click the namespace, folder, or segment youwant to import into, and from the Actions menu, click Import Metadata.2. In the Select Import Source window, click New.3. In the name and description page, type a unique name for the data source and, if you want,a description and screen tip. Select the folder where you want to save it, and click Next.4. In the connection page, click the type of database to which you want to connect, select anisolation level and click Next.The connection string page for the selected database appears.5. Specify any parameters that make up the database connection string, specify the timeout,

Page 7: Framework Manager

and select whether to create a signon.Tip: To test whether parameters are correct, click Test. If prompted, type a user ID andpassword or select a signon, and then OK.6. Click Finish.Tip: To test a data source connection, right-click the data source in the Data Sources folder andclick Test Data Source.

Isolation LevelsThe isolation level specifies how transactions that modify the database are handled. By default,the default object gateway is used. Not all types of database support each isolation level. Somedatabase vendors use different names for the isolation levels.For SAP BW data sources, the isolation level is read-only.

Connecting to an XML Data SourceIf you create an XML data source, you must use XML as the type of connection and specify thelocation of the XML document in the connection string.You can specify the connection string for an XML data source as• an HTTP URL that identifies the content store required to connect to the XML document.An example is HTTP://xmltestserver.cognos.com/XML/country.xml.Ensure that you create a Web alias for the directory that contains the XML file and that youenable directory browsing.• a file pathAn example is file:///C:/XML/country.xml.• a local fileAn example is C:\XML\country.xml;VALIDATE=ON.To access a local file, use a file path that uses platform-specific syntax.To test an XML connection string, you must type the following code at the end of the string:;VALIDATE=ONThe text of this code is not case sensitive.

Connecting to ODBC Data SourcesWhen you create data source connections to ODBC data sources, select the data source typefrom the Type drop-down menu in the New Connection Wizard. If ReportNet is running underWindows and you are connecting to an ODBC data source type that does not appear in themenu, select ODBC. If ReportNet is running under UNIX, select Other type and add theassociated database codes for the database vendor.Database vendor Database codeIBM Red Brick RBMicrosoft SQL Server SSNCR Teradata TD

Use a Project with Multiple Data SetsYou may have to use the same model and reports with different sets of actual data. The datasets may be different databases, accounts, or schemas in a single database. You mayencounter multiple data sets• when you use a different data set than used in production• in large enterprises, where each division has it own data set• in OEM applications, which have no direct control over customer dataThe tables and columns used by the project must be logically the same across all data sets. Youmust also ensure that the correct data set is identified in each case.

If different Cognos ReportNet content stores are in use, and a different version of the project isdeployed to each content store, you can specify the data source information in the project foreach site. If you have only one content store, you can publish each project as a separatepackage. These solutions require a lot of manual maintenance. To reduce this level of

Page 8: Framework Manager

maintenance, you can use one of the following options.Determining the Data Source InformationThe simplest solution is to determine the name of the data source in the Cognos ReportNetcontent store, the name of the catalog, if applicable, and the name of the schema in thedatabase. You can then use these names in all the data sets.If some data sets use the same content store, create a separate connection for each data set ina single content store.Using User-based Default Data Set IdentificationEach database user has access to a default schema and catalog, if applicable. If the schemaand catalog are not defined, or if they are blank in the Framework Manager project data source,the default is used. As in the previous solution, this option may be combined with multipleconnections so that different users can use different databases for the same Cognos ReportNetdata source.

However, when you edit a query subject, Framework Manager uses the catalog and schemanames in the data sources to match them to items that are dragged to the SQL windows fromthe data source tree. For this reason, the catalog and schema names cannot be blank in theproject data source while you are modeling.Steps1. Create a single session parameter whose value identifies whether you are in design mode.When you are in design mode, set the value of this session parameter to a specific value,such as design. Otherwise, leave the value empty.Tip: If you use a project or override value, you must set it each time you open the model forediting.2. For each catalog and schema in each project data source, create a parameter map thatcontains• an empty default value• a key whose name is the design value of the session parameter above, such as design,and whose value is the name of the design mode catalog or schema for that datasource.3. Select the data source, and replace the catalog and schema property values with a macrothat uses the corresponding parameter map and session parameter.

Modeling with Multilingual Data SourcesTo enable a project to work with multiple languages, you must set up data sources to supportmultiple languages.Multilingual Relational Data SourcesFor relational data sources, you can support multiple languages by using one or more of thefollowing:• Language-specific database tables• Language-specific columns• Language-specific rowsMultilingual Multidimensional Data SourcesFor SAP BW metadata, you do not need to use parameters to support multilingual reporting.Since SAP BW automatically provides data in the language that matches the logon settings forthe current user. If there is no metadata for the current user’s language, Framework Managerretrieves data in the default language.

Export MetadataYou can export your Framework Manager model as a Common Warehouse Metamodel (CWM)file. CWM is used for exchanging metadata between different data warehouse tools andrepositories. Each instance of the CWM metamodel is exchanged using XMI (.xml metadatainterchange) documents.You can export objects such as query subjects, query items, folders, namespaces, joins, andfunctions.When you export to CWM, we recommend that you use the default options, which optimize the

Page 9: Framework Manager

metadata export. If you change the options, you may see unexpected results.Steps1. Right-click the root namespace of the metadata you want to export, and click Export Model.You are prompted to save the project.2. Select the export target.3. Use the browse button to locate a file to use as the target and click Next.An example is GoSales_cwm.xml.4. In the Framework Manager Specific Export Options dialog box, click the options youwant.In the Option Description pane, you see a description of the options available. The optionsare based on the selected third-party data source.5. Click Next.6. In the Third-Party Specific Import Options dialog box, click the options you want. Foreach option, select a value from the available list.In the Option Description pane, you see a description of the options available. The optionsare based on the selected third-party data source. For more information, see the third-partydata source vendor documentation.Tip: To accept the default options, select the Use Defaults check box.7. Click Next.The input validation results from the export process appear.8. Click Next and click Finish.

Managing ProjectsYou should organize projects in a meaningful way so that you can easily find them. WithinFramework Manager, you can copy, move, rename, and delete projects. You can also perform these tasks from Windows Explorer or the file system.You can manage your projects in Framework Manager using repository control,segmenting, and linking. These project management features help maintainversion control, organize a project according to business rules and organizational needs, setrun-time processing options, and give other users access to sections of the project.You can also identify the vendor-specific functions that you want to use for each datasource you import into your project.If your project is segmented, the segments are treated as standalone projects.

Copy a ProjectWhen you copy a project, you create a replica of that project in another location. All files in theproject folder, including sub-folders, are copied to the new location. When you make changes tothe project in one folder, these changes are not reflected in copies of the project in other folders.Copying a segmented model copies all segments as well as the main project.You cannot create a copy of a project in the same folder as the original.Steps1. On the File menu, click Manage Projects and click Copy.2. In the From text box, click the browse button and select the .cpf file for the project you wantto copy.Note: The project folder name is shown in the text box.3. In the To text box, type the new location or click the browse button and select the newproject location.Note: If the target location is a new folder that does not exist, the copy command creates it.4. Click OK.

Move a ProjectYou may decide to move a project if your folder becomes so full that it is difficult to locateparticular projects. When you move a project, you are actually copying it to a new folder anddeleting it from the current folder. All files in the project folder, including sub-folders, are movedto the new location.

Page 10: Framework Manager

Moving a segmented model moves all segments as well as the main project.Before you can move a project, the project must be closed in Framework Manager.Steps1. On the File menu, click Manage Projects and click Move.2. In the From text box, click the browse button and select the .cpf file for the project you wantto move.Note: The project folder name is shown in the text box.3. In the To text box, type the new location or click the browse button and select the newproject location.Note: If the target location is a new folder that does not exist, the copy command creates it.4. Click OK.A confirmation box appears to confirm that you want to remove the folder and move its contentsto the Recycle Bin.5. Click Yes.

Rename a ProjectWhen you rename a project, you provide a new name for both the .cpf file and the folder itresides in. Secondary project files and log files keep their original name.If a project appears in the recent projects list on the Framework Manager Welcome page andyou proceed to rename it, you cannot open the project by clicking on the link. You must open theproject using the Open command on the File menu.Before you can rename a project, the project must be closed in Framework Manager.Steps1. On the File menu, click Manage Projects and click Rename.2. In the From text box, click the browse button and select the .cpf file for the project you wantto rename.Note: The project folder name is shown in the text box.3. In the To text box, type the new name for the project and click OK.If the original project folder and .cpf file have the same name, both the folder and .cpf file arerenamed. If the names are different, only the project folder is renamed.

Delete a ProjectYou may decide to delete a project because it no longer satisfies your requirements. When youdelete a project, the project folder and all its contents, including any user files, are deleted fromthe file system and sent to the recycle bin.If your project is segmented and you delete the main project, the segments are deleted as well.Before you delete a project, ensure that the project and all its segments are closed. FrameworkManager does not support a file locking mechanism so it is possible under certaincircumstances to delete an open project. If you delete an open project, the open project can nolonger be saved.If you accidentally delete a project, you can restore it from the recycle bin.Deleted projects still appear in the most recently used list on the File menu.Steps1. On the File menu, click Manage Projects and click Delete.2. In the Project Folder text box, click the browse button and select the .cpf file for the projectyou want to delete.Note: The project folder name is shown in the text box.3. Click OK.A confirmation box appears to confirm that you want to remove the folder and move its contentsto the Recycle Bin.4. Click Yes.The project folder and all its contents are deleted.

Repository ControlUse repository control to help manage your projects in Framework Manager. You controlversions of a project to ensure that each version of a file is recoverable. Repository control alsoensures that users in a large organization have access to the most recent changes or versions

Page 11: Framework Manager

of a project or segment. You can use Framework Manager to• create a connection to a Visual SourceSafe (VSS) or Concurrent Versions System (CVS)repository • add an existing project to a repository control• check in and check out a project• get the latest version of a project• view project history • label a projectIf you use Visual SourceSafe as your repository, we recommend that you connect to it usingyour Windows user name and password.You must set up the path to the source control system in Cognos Configuration before youcreate a repository connection in Framework Manager.Steps for VSS1. Start Visual SourceSafe Administrator.2. From the Tools menu, click Create Database.3. Specify where you want to create the database.4. Select the New 6.0 Database Format check box, and click OK.5. From the Users menu, click Open SourceSafe Database.6. Locate the srcsafe.ini file, and click Open.7. Click the database you just created, and click Open.A list of the users assigned to the database appears.8. Close Visual SourceSafe Administrator.9. Open the srcsafe.ini file, and type the following command at the end of the file:Update_No_Change=UpdateThis command ensures that the project is updated each time there is a check in.10. From the File menu, click Save, and click Exit.11. Start Framework Manager and, from the Welcome page, click Repository, ConnectionManager.Tip: If you have Framework Manager open, from the Repository menu, click ConnectionManager.12. Click the New button.13. In the Connection Name box, type a name for the connection.14. In the Type list box, click SourceSafe://.15. In the Settings window, click in the Value pane, and type the location of the srcsafe.ini file.16. Click Test.17. Click OK.Steps for CVS1. Copy the CVS executable file to the \crn\bin directory.2. Create a directory for the CVS repository.An example is C:\cvs_repository.3. Create a subdirectory named CVSROOT.An example is C:\cvs_repository\CVSROOT.4. Start Framework Manager and, from the Welcome page, click Repository, ConnectionManager.Tip: If you have Framework Manager open, from the Repository menu, click ConnectionManager.5. Click the New button.6. In the Connection Name box, type a name for the connection.7. In the Type list box, click SCCS://.8. In the Settings window, click in the Value pane, and type the path for the repository.Do not specify the CVSROOT in the path. The repository location must be different from thelocation where the new project is stored.An example is C:\cvs_repository.

Page 12: Framework Manager

9. Click Test.10. Click OK.Add a Project to a RepositoryYou can add an existing project to a repository.You must be connected to a repository before you can add a project.Steps1. On the Repository menu, click Add Project to Repository.2. In the Connection list box, select the repository connection.3. In the Location in Repository list box, select a location to add the project and click Select.4. To keep the project checked out from the repository, click the Keep checked out check box.5. Click OK.

Check In and Check Out a ProjectYou can also check your project in and out of one of the supported repositories.If you have a project checked in to a repository and you make a change, you are notified thatyou must check out the project or segment before you can make the change. We recommendthat you check out a project to one location at a time.Steps to Check In a Project1. In Framework Manager, in the Project Viewer, click the project or segment you want tocheck in.2. From the Repository menu, click Check In.Tip: To keep your project or segment checked out, select the Keep Checked Out checkbox.3. In the Description box, add a description.4. Click OK.Steps to Check Out a Project1. In Framework Manager, in the Project Viewer, click the project or segment you want tocheck out.2. From the Repository menu, click Check Out.The icon for the project or segment reflects that the object is checked out.Steps to Undo Check Out1. Click the project or segment for which you want to undo the check out.2. From the Repository menu, click Undo Check Out.A message warns about overwriting any edits made to the project.3. Click OK.

Get the Latest VersionWhen you use repository control in Framework Manager, you retrieve the most recent version ofthe project (.cpf), model.xml, customdata.xml, and log files.When an exclamation mark icon appears next to a project or segment, it indicates that thesegment was updated. Refresh the project or segment regularly by pressing F5. If the projectyou are working in is checked out, you must first check in the main projects and all segments.Steps1. Click the project or segment you want.2. From the Repository menu, click Get Latest Version.3. Click OK.

View HistoryEvery project or segment that is connected to a repository has a detailed record of its history.You can see version information, comments, and details about the history of the project.Steps1. Click the object you want to view.

Page 13: Framework Manager

2. From the Repository menu, click View History.3. If you want to return the object to a previous version, click the row of the version you want,and click Sync.4. Click Close.

Label a Project VersionIf you want to come back to a certain version of a project, you can assign a label to that version.The project must be checked in before you can assign a label.Steps1. In the Project Pane, click the project you want to label.2. From the Repository menu, click Label.3. In the Description box, type a label for the project and click OK.You can return to a previously labelled version of a project by viewing the transaction history forthe project.

Segmenting ModelsThe main project has access to the entire model, including the segments. This means that youcan make changes to the segments when working in the main project. If the segment is openwhen the main project is updated, the potential exists for updates to be lost. The changes thatwere last saved to the model overwrite previously saved changes. We recommend that accessto the main project be limited and that you avoid updating segments from the main project.When you work with a main project and segments in the main project, there are other things toconsider. If you create a main project that contains segments, and the main project is connectedto a repository, any new segments created are automatically added to the repository. If you havea project or segment checked in to a repository and you make a change, you are notified thatyou must check out the project or segment before you can make the change. If you makechanges in a segment, you are notified in the main project that changes were made in the mainproject.

Create a SegmentYou can create a segment so that you can• organize a project according to business rules and organizational requirements• share and reuse project informationBefore you create segments, you may want to consider dividing your project into business units.For example, you have a project named GoSales. You can create two folders, one namedProducts and the other named Orders. You can divide the GoSales project at the Products folderand at the Orders folder.You can also link the segments to other projects that contain the same information tomaintain consistency and reuse information.You create segments either at the folder or namespace level. You can create a new project in anew folder, complete with its own associated project files.When a new segment is created, any existing parameter maps from the main project are copiedto the new segment. After the segment is created, parameter maps are unique to each segmentand cannot be shared between segments. For example, if you are working in the main project,you can use a parameter map in a query subject belonging to a segment. However, if you openthe segment, the parameter map is not available.

Steps1. Click the folder or namespace you want to divide, and from the Actions menu, click CreateSegment.2. In the Create Segment dialog box, change any settings you want.3. Click OK.

Page 14: Framework Manager

Create a LinkA link is a shortcut to an existing project, segment, folder or namespace.You create links to help organize work across large projects, to maintain consistency,and to reuse information.For example, the project named Inventory contains the folder named Products. You can create alink from the GoSales Products to Inventory Products. If any changes or additions are made tothe Inventory Products folder, they are reflected in the GoSales Products folder.Links are defined in the project file (.cpf) that owns them. If the main project has a link to asegment, the link is part of the .cpf file for the main project.If you link to a namespace and a new data source is added to that namespace, you must add alink to that new data source.The projects you link must have the same languages defined and the same design language.You must create the project, folder, or namespace before you can link to it.Steps1. In the Project Viewer, click the object you want to link.Tip: You can create links only to folders, namespaces, and projects or segments.2. From the Actions menu, click Link Segment.3. Locate and click the .cpf file of the segment, folder, or namespace.4. If you want to add the link to a repository, click the Repository button.5. Click Open.6. Choose the project or segment to link to:• To link to another project, click Add Project, locate the .cpf file and click Open. Selectthe project and click Add.• To link to a segment, click the segment and click Add.7. Click OK.A new folder appears in the Project Viewer.

Using Functions to Create ExpressionsThe Expression Editor provides a list of functions that you can select to create an expression.This list includes:• common SQL99 functions• vendor-specific functions• functions imported from a data source• free-form functionsWhen you import metadata into Framework Manager, you import the functions from themetadata source. These functions are shown in a folder whose name matches the namespace.This folder is located at the bottom of the list of folders in Expression Editor.

Choose Function SetsA collection of database functions that are vendor-specific is called a function set. When youcreate a project that contains relational metadata, the Expression Editor lists the function setsfor all available vendors. However, you can restrict the function sets so that it lists only thevendors that you want to use in your project. You customize the function set by identifying thespecific vendor for each data source defined in the project.Note: When you create a project that contains SAP BW metadata, Framework Managerautomatically lists only the functions that apply to SAP BW data.Steps1. Click Project, Project Function List.2. Select the Set function list based on the data source type check box.Tip: To disable this filter, select the Include all function sets check box.3. In the Function set page, click the appropriate data source row.4. Select the function set you want to use with this data source.5. Repeat steps 2 and 3 until finished.6. Click OK.

Page 15: Framework Manager

Improve Performance by Setting Query Processing TypeFor relational metadata, you can improve performance by selecting the right type of queryprocessing.There are two types of query processing:• limited localThe database server does as much of the SQL processing and execution as possible.However, some reports or report sections use local SQL processing.• database onlyThe database server does all the SQL processing and execution. An error appears if anyreports or report sections require local SQL processing.Steps1. In the Project Viewer, click the data source you want to change.2. In the Properties pane, in the Query Processing list box, click either Limited Local orDatabase Only.

Multiuser ModelingMultiuser modeling means that multiple users can simultaneously access an application.Framework Manager supports multiuser modeling by using• segments Projects can be divided into segments so that different users can look at different parts ofthe same project at the same time. When you create a segment, you create a new project ina new folder, complete with its own associated project files.• links Links are created between projects so that different users can refer to a project at the sametime as another user is working on it.• repository control You can use repository control to help manage your projects across multiple modelers.

Recording Transactions in Log FilesIn Framework Manager, you can capture, view, and play back actions performed on the project.Each sequence of actions that you perform in Framework Manager is considered a transaction.Each transaction is recorded in the project or segment action log file.The action log file is an XML file that is designated by the project or segment name, date, andtime. The log file is stored in the project or segment logs folder. You can save individualtransactions to a separate log file.

View Transaction HistoryYou can view the transaction history in a project or segment action log file and then save it as ascript.Steps1. From the Project menu, click View Transaction History.Tip: To make the dialog box larger, double-click the caption. Double-click again to restore itsoriginal size.2. Click the transaction numbers you want.3. Click Save as Script, but do not save it in the logs folder.Tip: To view the details of a transaction, click the plus sign (+) next to a transaction number.4. Click Close.

Play Back Transactions From a Log FileYou can choose to play back a specific transaction or a combination of transactions in a project

Page 16: Framework Manager

or segment action log file.For example, you make changes to a project in a test environment. When it is time to move theproject to production, you can play back every action, or series of actions, that you performed inthe project in the test environment. This creates an identical project in the productionenvironment.Steps1. From the Project menu, click Run Script.2. Select the script you want, and click Open.The Script File box shows the name and location of the script file.Tip: To locate another log file, click the folder button.3. To view the details of a transaction, click the transaction.A list of the transaction details appears in the Status/Transaction Details box.4. Set the run options that you want.5. Using the toolbar buttons, choose the run action you want.6. Fix any errors encountered by the script either by retargeting objects or modifying thetemporary project as required.7. When the script has completed, click Accept to accept the changes.

Synchronize ProjectsYou can use Framework Manager log files to synchronize your project. You may choose tosynchronize your project if you• updated metadata in a third-party modeling tool• made changes to metadata using a multidimensional modeling tool, such as SAP BWIf your data source is a relational database, you can update only the query subjects (p. 87) anddo not need to perform a full project synchronization.When you synchronize your project, you create a new project by replaying from the log files, allthe actions you made in the original project. You can choose to accept the new changes andcreate a new project, or return to the original project. If you accept the new changes, the originalproject is replaced.Because every action that you made in your project is rerun, synchronization may take a longtime.Before synchronizing a project, you should understand how synchronization impacts segmentedand linked models. You should also ensure that data source connections have notchanged and that data sources are online. You can check your connections by testing a few keyquery subjects.

Segmented ModelsA segmented model should be synchronized only by synchronizing the main project. The resultsof synchronizing the entire project are written to the log file of the main project. The ability tosynchronize individual segments is lost after the first synchronization of the main project.If you are working in the main project and change a segment, the main log file is updated. If youare working in the segment and make changes, the segment log file is updated.Linked ModelsLog files are contained in the project that is open and not in the model that is updated.If you open a main project and make changes to a linked model, the actions are logged in thelog file of the main project. If you then synchronize the linked model, the change is lost becauseit did not appear in the set of log files that were used in the synchronization.Synchronization can be run only on the main project or a stand-alone segment. You cannotsynchronize linked projects or segments in the main project. If the segments are updated by thelinked project, the synchronization can produce unpredictable results in the main project.We recommended that you do not use model synchronization in combination with linked

Page 17: Framework Manager

projects.Steps to Synchronize1. From the Project menu, click Synchronize.2. We recommend that you create a backup of your Framework Manager project by selectingthe Backup project into this directory check box.3. To view the details of a transaction, click the transaction.A list of the transaction details appears in the Status/Transaction Details box.4. Set the run options that you want.• To set the starting point for running the script, select the script and then click the Set thestarting point button.You can do this at any time to skip an instruction or run instructions that have alreadybeen executed.• To set a stop point for the script, select the script and then click the Set the stop pointbutton.You can stop the script to make a manual fix and then continue on from that transaction.Tip: To remove the stopping point, click the Remove the stop point button.• To ensure that the project stops on any transaction error, select the Stop on Errorcheck box.5. Using the toolbar buttons, choose the run action you want.6. Fix any errors encountered by the script either by retargeting objects or modifying thetemporary project as required.7. When the script has completed, click Accept.The original project is replaced by the contents of the temporary project.Tip: To return the project to its previous state, click Revert..

Preparing Metadata for Use inReportsImport ViewTo ensure that the metadata is set up correctly in the import view, do the following:

Ensure that the relationships reflect the reporting requirements. Optimize and customize the data retrieved by query subjects. This includes handling

support for multilingual metadata. Control how data is used and formatted by checking query item properties.

Business ViewTo enhance the metadata in the business view, do the following:

Add business rules, such as calculation, filter, and prompts, that define the information users can retrieve.

Create separate views for each user group by creating a series of folders and shortcuts that reflect the business concepts familiar to your users.

Specify dimensional information. Create star schema groups .

Verifying RelationshipsWhen importing metadata, Framework Manager creates relationships between query subjectsbased on the primary and foreign keys in the data source. You can create or removerelationships between query subjects so that the model better represents the logical structure ofyour business. Creating or modifying a relationship in Framework Manager does not change thestructure of the data source. Cognos ReportNet does not write to the data source.

After you import metadata, verify that the relationships you require exist in the project. Toimprove performance, keep or create only the necessary relationships.If you are importing from a data warehouse, ensure that you verify all relationships and

Page 18: Framework Manager

cardinality. To increase processing speed, many primary and unique key constraints are notspecified in a data warehouse. Without these constraints, Framework Manager cannot generatethe necessary relationships between fact tables and dimension tables.

Framework Manager stores relationships in the nearest common parent of the query subjectsthat participate in the relationship. The parent can be either a folder or a namespace. If youmove one of the participating query subjects outside the common parent, the relationshipmoves to the next namespace that is common to both ends of the relationship. If you move arelationship to a different folder or namespace, the participating query subjects are also movedto the same folder or namespace.Custom Relationship ExpressionsIn Framework Manager, you can create complex expressions by taking two or morerelationships and joining them using an operator, such as <, >, or =. Use complex expressions tocreate custom relationships that help minimize the complexity of the data in your diagram.You can specify the operator by selecting one from the list or by manually changing theexpression in the Expression Editor.

CardinalityCardinality indicates the nature of the relationship between two query subjects, query items, orother model objects. Cardinality is used to ensure that, when the SQL is generated, aggregatesare calculated, derived tables are flattened out, and correct results are returned.Relationships work in both directions. You often must examine both directions to fullyunderstand the relationship.The different types of relationships are• one-to-one• one-to-many or many-to-one• many-to-manyAfter you import data or create a relationship in Framework Manager, you canrename the relationship, redefine cardinality, change the join type, or change the name of therelationship. You can also use the Expression Editor to create complex relationship expressions.Note: Relationships for SAP BW metadata are read-only and cannot be modified.Steps1. Click a relationship and, from the Actions menu, click Edit Definition.2. Modify the relationship.3. Click OK.4. If your metadata is from an OLAP data source, click Close.

Create a RelationshipYou create a relationship to join logically related query subjects that report authors want tocombine in a single report. This is useful for relationships between query subjects that were notselected during metadata import, were not joined in the data source, or are from multiplesources.You can directly create a relationship between the query items.You can also use Framework Manager to automatically generate relationships betweenquery subjects based on selected criteria.1. Ctrl+click two or more query subjects or query items.Tip: In the diagram view, you can also select a query item in a shortcut to create arelationship.2. From the Actions menu, click Create, Relationship.If this relationship is a valid target for a relationship shortcut, Framework Manager asks ifyou want to create a shortcut to that relationship.3. Click OK.The Relationship Definition dialog box appears. You can use this dialog box to modify therelationship.

Create a Relationship ShortcutA relationship shortcut references an existing relationship. You can use relationship shortcuts to

Page 19: Framework Manager

reuse the definition of an existing relationship. Any changes to the source relationship areautomatically reflected in the shortcut. You can also use relationship shortcuts to resolveambiguous relationships between query subjects.Framework Manager asks whether you want to create a relationship shortcut whenever youcreate a relationship and both of the following conditions apply:• At least one of the ends for the new relationship is a shortcut.• A relationship exists between the original query subjects.Steps1. Ctrl+click the query subjects that you want to participate in the relationship shortcut.2. From the Actions menu, click Create, Relationship.Framework Manager asks if you want to create a shortcut to that relationship.3. Click Yes.A list appears of all relationships in which one end is a model object and the other end iseither another model object or a shortcut to another model object.4. To retrieve all relationships in which both ends can be either a model object or a shortcut toa model object, click Find All.5. Click the relationship that you want to be the target of the relationship shortcut.6. Click OK.

Detect and Generate RelationshipsYou can use Framework Manager to detect and generate relationships between two or moreexisting query subjects in your model. This is useful when you import metadata in stages, orwhen you want to change the criteria that apply to existing relationships, such as whether theyinclude outer joins.When importing star schema metadata, avoid generating relationships based on matchingcolumn or query item names. Data warehouses often apply naming standards to columns, suchas surr_key as the default column name for surrogate keys in dimensions. In this case,generating relationships that are based on matching column names would generateinappropriate relationships between all dimension tables.Steps1. Ctrl+click two or more query subjects.2. From the Actions menu, click Detect Relationships.3. Select the rules you want to apply to each pair of tables.4. Indicate whether you want Framework Manager to detect relationships• between the selected query subjects• between each selected query subject and every query subject in the project that is notselected• between the selected query subjects and every other query subject in the project5. Identify whether you want Framework Manager to create outer joins or inner joins based onouter joins that exist in the data source.6. Click OK.

Working with Query SubjectsA query subject is the basic building block in Framework Manager.Each query subject that is based on relational metadata is defined by an SQL statement thatdescribes how to retrieve data from the data source.Each query subject that is based on multidimensional metadata represents a hierarchy in thedata source.

You use Framework Manager to modify query subjects to optimize and customize the data thatthey retrieve. For example, you can add filters or calculations. When you change the definition of

Page 20: Framework Manager

a query subject, Framework Manager regenerates the associated query items, ensuring thatany changes to query subject properties are reflected in all query items for that query subject.You can use different types of query subjects in Framework Manager:• relational data source query subjects• multidimensional data source query subjects• model query subjects • stored procedure query subjectsRelational Data Source Query SubjectsRelational data source query subjects directly reference data in a single data source.Framework Manager automatically creates a relational data source query subject for each tableand view that you import into your model.

Each relational data source query subject can reference data from only one data source at atime. However, the advantage of relational data source query subjects is that you can directlyedit the SQL that defines the data to be retrieved. This means that you can• insert parameters that control the data that the query retrieves• create query subjects based on arbitrary SQLMultidimensional Data Source Query SubjectsMultidimensional data source query subjects directly reference data in a multidimensional datasource such as SAP BW. Framework Manager automatically creates a query subject for eachhierarchy of a dimension that you import into your model.

Model Query SubjectsModel query subjects are not generated directly from a data source but are based on queryitems in other query subjects. The main purpose of model query subjects is to create queryitems that are oriented to reporting needs and that reuse the underlying data source queries.

Model query subjects can contain references to relational or multidimensional data sourcequery subjects as well as to other model query subjects. But one model query subject cannotreference both relational and multidimensional query subjects.Because model query subjects are based on the metadata in your model, they let you• reuse complex SQL statements that exist in the model• reference objects from different data sources in the same query subjectStored Procedure Query SubjectsStored procedure query subjects are generated when you import a procedure from a relationaldata source.When a query subject is based on a stored procedure that returns a result set, the storedprocedure must return a single uniform result set. If a stored procedure returns multiple resultsets, Framework Manager supports only the first result set. Each result set must return thesame form, such as the same number of columns.

Create a Query SubjectFor relational metadata, you can create the following types of query subjects:• Relational data source query subjects directly reference data in a single data source.• Model query subjects are based on metadata that exists in your model.• Stored procedure query subjects are generated from the stored procedures in a relationaldata source.Steps1. Select the namespace folder and, from the Actions menu, click Create, Query Subject.2. In the Name box, type a name for the new query subject.3. Select the type of query subject you want to create, and click OK.4. Do one of the following:• If the Query Subject Definition dialog box appears, specify which objects will be in themodel query subject.• If the New Query Subject wizard appears, complete the steps in the wizard. You can

Page 21: Framework Manager

then modify the data source query subject or the stored procedure query subject.

To ensure that the data source is uniquely identified for a data source query subject, donot exit the wizard before the Finish button appears.

Create a Model Query Subject Based on Existing ObjectsIn addition to creating query subjects from scratch, you can select existing model objectsand merge them into a new model query subject. This means you can reuse existing metadatato quickly create query subjects.The objects you can merge include• relational data source query subjects and their shortcuts• multidimensional data source query subjects and their shortcuts• model query subjects and their shortcuts• query items, filters, and calculations in model and data source query subjects• relationships and relationship shortcuts between model and data source query subjects

You can merge any number of the same type of objects into a new query in a single operation.The merge always creates a new model query subject.Steps1. Ctrl+click the objects you want to merge into a single query subject.2. From the Actions menu, click Merge in New Query Subject.If the query subjects are joined to other query subjects, you are prompted to recreaterelationships with the new query subject.3. To recreate relationships, click Yes.

Modify a Relational Data Source Query SubjectWhen query subjects are based on relational metadata, you can modify them to retrievedifferent data. You can test the query subject to view the results that it returns.When you embed a filter or calculation, the data source query subject musthave a relationship to any query subject referenced by the expression.To create this relationship, do one of the following:• ensure that there is a join path between the new query subject and the one that contains thefilter or calculation• base the embedded filter or calculation on a query item that is based on the data sourcequery subject you want• convert the filter or calculation to a stand-alone filter or calculation, so that it is not part ofthe query subject• create a stand-alone filter or calculation that references the embedded objectSteps1. Click the query subject you want to modify.2. From the Actions menu, click Edit Definition.3. Modify the query subject.4. Test the query subject to view the results that it returns.5. Click OK.

Modify a Multidimensional Data Source Query SubjectWhen query subjects are based on multidimensional metadata, you cannot edit the underlyingquery. However, you can• add calculations• add, delete, and define filters• use prompts in filters to prompt the user for variable values• test a query subject• conform or remove conformed query subjects.Steps1. Click the query subject you want to modify.2. From the Actions menu, click Edit Definition.

Page 22: Framework Manager

3. Modify the query subject.4. Test the query subject to view the results that it returns.You are prompted for values for the BW variables.5. Click OK.

Modify a Model Query SubjectAfter you create a model query subject, you can modify the list of query items it is based on, andadd any calculations and filters that already exist in the model. You can test thequery subject to view the results that it returns.If a model query subject is based on multidimensional metadata, do not include query itemsfrom different query subjects or hierarchies from the same dimension. This cause a run-timeerror.Steps1. Click the query subject you want to modify.2. From the Actions menu, click Edit Definition.3. Modify the query subject.4. Test the query subject to view the results that it returns.5. Click OK.

Conform SAP BW Query SubjectsWhen you import multiple InfoQueries or InfoCubes, conformed dimensions are the mechanismto join multiple cubes. There can be two or more query subjects that contain the sameinformation.

Steps1. From the Actions menu, click Generate Conform Dimensions.The Conformed Dimension wizard appears, listing all dimensionally aware SAP BW querysubjects that exist in the model.2. Select the query subject that you want to conform.If you want queries based on these query subjects to retrieve data from a specific datasource, select the query subject that references the preferred data source.3. Click Next.4. Identify the query subjects that you want to include in the conformed dimension, and clickNext.5. Click Finish.

Remove a Conformed SAP BW Query SubjectWhen you import SAP BW metadata into your project, you can select an option for FrameworkManager to automatically create conformed dimensions for any two or more hierarchies thathave a matching structure. If there are dimensions that you do not want conformed, you canremove them after the initial import.Steps1. Delete all instances of the query subject from the model.Tip: The easiest way to do this is to delete the one instance of the query subject that is nota shortcut. This removes all the shortcuts from the project.2. From each relevant data sources, reimport the query subjects that were deleted, ensuringthat the generate conformed dimensions option is not selected.3. Ensure that query subjects appear in the project as expected. No shortcuts should be usedfor these query subjects.

Modify a Stored Procedure Query SubjectAfter you import or create a stored procedure query subject, you can modify it. To avoidinconsistencies, the modified query subject should return the same result set structure as theoriginal.Note: Multidimensional metadata does not support stored procedure query subjects.

Page 23: Framework Manager

Steps1. Select the query subject you want to modify.2. From the Actions menu, click Edit Definition.3. Modify the query subject.4. Test the query subject to view the results that it returns.5. Click OK.

Update Query SubjectsIf the relational data source changes, you can update the data source query subjects and thestored procedure query subjects. You do not need to complete a full project synchronization.Notes:• The query subject is updated based on the definition in the data source.• Updating query subjects is available for relational metadata only.Steps1. Select one or more query subjects.2. From the Actions menu, click Update Query Subject.

Modify a Property for Multiple Query SubjectsYou can modify a property for multiple objects at the same time. These objects can be eitherquery subjects or query items.Steps1. Select the objects that you want to modify.Only the properties that are common to all objects are shown in the Properties pane.2. If you want to sort the property values, double-click the property heading.An arrow appears to indicate the direction in which values are sorted. You can togglebetween ascending and descending order.3. If you want to filter property values, click the arrow to the right of the property heading. Youcan select a value or click Custom to define the criteria for the rows you want to show.The objects are selected in the Project Viewer.4. Make any changes to the values of the property.

Test a Query SubjectYou can see the results that a query subject returns by testing it.For model and data source query subjects, you can change existing test settings to customizethe results that the test shows. Test settings control the number of rows returned and promptvalues.Steps to Test a Query Subject1. Select one or more query subjects.2. From the Actions menu, click Test Query Subject.The Test Result box shows the query results. Any result sets that contain Binary LargeObjects are shown as [blob].3. If you want more information about the results of model and data source queries, click theResults Information tab.4. Click Close.Tip: You can now fix problems. Double-click the query subject to open the Edit Definitiondialog box.Steps to Change Test Settings1. Select the query subject you want to change.2. From the Actions menu, click Edit Definition.3. Click the options button and then click the Test Settings tab.Most test settings are saved and used in your next session with this model. The Changeprompt values and Override session parameters settings are kept for the current sessiononly.4. Make the changes you want.5. Click the Test button.The Test Result box shows the query results. Any result sets that contain Binary Large

Page 24: Framework Manager

Objects are shown as [blob].6. If you want to read more information about the results of model and data source queries,click the Results Information tab.7. Click OK.

SQL Types• Cognos SQL• native SQL • pass-through SQL

Cognos SQLBy default, Framework Manager uses Cognos SQL to create and edit query subjects. CognosSQL adheres to SQL99 rules and works with all relational and tabular data sources. FrameworkManager generates the most optimized SQL possible. In this way, Cognos SQL is preferable.In general, using Cognos SQL is preferable because you can create query subjects that• can contain metadata from multiple data sources• have fewer database restrictions• interact more effectively with Cognos applicationsNative SQLNative SQL is the SQL the data source uses, such as Oracle SQL. You can not use native SQLin a query subject that references more than one data source in the project.Pass-Through SQLPass-through SQL lets you use native SQL without any of the restrictions the data sourceimposes on subqueries. This is because pass-through SQL query subjects are not processedas subqueries. Instead, the SQL for each query subject is sent directly to the data source wherethe query results are generated.

Because each query subject is sent to the data source as a separate statement, rather thanbeing optimized by Framework Manager, performance is slower. Therefore, in choosing betweennative SQL and pass-through SQL you must decide which is more important: performance orusing SQL that is not permitted in a subquery.

SQL GenerationYou can specify how Framework Manager generates the SQL that retrieves data from relationaldata sources. You can change how Framework Manager generates SQL when you edit a datasource or model query subject.

Supporting Multilingual MetadataFor models that will be published in multiple languages, you can view and modify model objectsin the different languages. We recommend that you handle multilingual support in the importview so that you can• reduce the number of query items contained in each query subjectWith fewer query subjects and query items, the model is more manageable.• ease maintenanceMultilingual work is done in one place instead of in different business views.• ensure consistencyLanguages are set up correctly for all modelers to use. This is particularly important forsegmented models. Modelers will not be setting up languages in their own way.

To support multilingual metadata, do the following: Import metadata from multilingual data sources. Define the languages the model supports. Define one or more parameter maps that translate the locale used when the report is run

in to the language values used by the data source. Use a macro to dynamically substitute language values from the language lookup

table using the runLocale session parameter as the key.

Page 25: Framework Manager

Export multilingual properties in translation tables, which translators use to enter the correct text for each language.

Import the table that contains the translated property values. Publish the metadata in the languages you specify.

Using a Macro to Model Multilingual DataYou can model multilingual data that is stored in multiple tables, columns, or rows, for eachsupported language. You can use macros with parameter maps and session parameters tocreate query subjects that retrieve data in the preferred language of the person viewing thereport.

Use a Macro to Define SAP BW CurrencyWhen modeling SAP BW metadata, you can use a macro to dynamically substitute SAP BWCurrency values when the report is run.The target language is defined when you import metadata. An InfoQuery contains a currencytranslation table. You can prompt users to select a language. Or you can use a macro to set thelanguage automatically based on the user’s locale.Steps1. Create a parameter map that contains the following:• keys that reflect the ISO standard for the supported model languages, such as EN-en• corresponding values that match the ISO standard for the SAP BW currency, such asUSDA sample currency translation file exists in the sample database.2. In the data source property list, select SAP BW Variables.3. In the Use Default Value property, set the value to true.4. In the Default Low Value property, enter a macro that uses the parameter map you created,such as #$CurrencyMap[$runLocale]#

Add a Language to a ProjectYou can add a language to a project at any time. For example, you do this if the values for alanguage were not translated earlier.When you add a language to a project, Framework Manager generates a new property value forevery multilingual property of each object in the project. A multilingual property is any textproperty that appears in a report, such as Name, Description, and Screen Tip.Each project contains two types of language definitions:• Design LanguageThis is the language in which the model was originally created. This value is stored in themodel and cannot be changed. It serves as the default language value.• Active LanguageThis is the language in which model content is currently shown. This value is not stored inthe model and you can change it at any time.Steps1. From the Project menu, click Languages, Define Languages.2. In the Available languages box, select each language you want to add and click the arrowbutton to move it to the Project languages box.Tip: To remove a language, select it in the Project languages box and click the arrowbutton to move it to the Available languages box.3. If you want to change the active language, in the Project languages box, click a languageand click Set as Active.4. Click OK.You are prompted to accept the changes you made to the project.5. Click OK.

Export a Translation TableYou can generate and export a translation table to make the task of translating model objects

Page 26: Framework Manager

easier. The translation table contains a list of all the text strings defined for multilingualproperties, such as Name, Description, and Screen Tip. Translators can then use an externalapplication, such as Microsoft Excel, to type the required information in the table.Steps1. If you want to export only selected objects, select those objects.2. From the Project menu, click Languages, Export Translation File.3. In the Project Languages box, click the languages you want to export, and click the arrowbutton to move them into the Languages to be exported box.4. In the Model objects to be exported box, select whether you want to export all modelobjects, or export only preselected objects and their children.5. Enter the location to which you want to export the translation table.6. Click OK.

Import a Translation TableYou can add text property values for each language defined in your model by importingtranslated data from a file. The imported file must be a translation table that was given totranslators who then entered the required translated values.The translation file can contain a subset of the languages defined for the project.Steps1. From the Project menu, click Languages, Import Translation File.2. In the Project Languages box, click the languages in the translation table, and click thearrow buttons to move them to the Translate from and Translate into box.3. In the Apply translation to box, select whether you want to apply the translation to allmodel objects, or only to preselected objects and their children.4. Enter the location of the translation file.5. Click OK.

Example - Create a Multilingual ProjectYou want to create a model that can be used by English, French, and German report authors.You also want the reporting tool to automatically show metadata in the language required by thereport author.In the gosales_goretailers sample, you need to do the following:• translate metadata• use macros to create a multilingual projectYou can modify the query subjects to show multilingual content by using theLanguage_lookup parameter map and the runLocale session parameter.Steps1. Open the gosales_goretailers project.2. Ensure that English, French, and German are supported languages:• From the Project menu, click Languages, Define Languages.• Ensure that the Project languages pane contains English, French, and German.• In the Project Viewer pane, click a query item and, at the top of the Properties pane,click Languages.For the name, description, and tool tip text, you see one entry per language.3. Export all the languages and objects in the project to a comma-separated value file (.csv)named GOSales ML.csv.• From the Project menu, click Languages, Export Translation File.• In the Project Languages box, Ctrl+click English, French, and German, and click thetop arrow to move them to the Languages to be exported box.• Enter the location to which you want to export the translation table.4. Open the GOSales ML.csv file in Microsoft Excel, and translate the strings.Note that each column represents a given language, and the file contains only the textstrings that exist in the model.

Page 27: Framework Manager

5. In Framework Manager, import the translated file:• From the Project menu, click Languages, Import Translation File.• In the Project Languages box, Ctrl+click French and German, and click the arrow tomove them into the Translate into box.• Enter the location from which you want to import language metadata.6. In the Project Viewer, double-click the Language_lookup parameter map.Note that the keys match the possible values for the runLocale session parameter, whichidentifies the language of the current user. These keys are mapped to the language valuesthat are defined in the gosales_goretailers database.7. Ensure that the parameter map contains the following information.Key Valueen ENfr FRde DE8. Select a query subject that contains multilingual columns, such as Order method, and, fromthe Actions menu, click Edit Definition.Note that the language identifier that was appended to the query item name is replaced by aparameter map and runLocale session parameter:SelectORDER_METHOD.ORDER_METHOD_CODE,#'ORDER_METHOD.ORDER_METHOD_' + $Language_lookup{$runLocale} # as Order_methodfromORDER_METHOD

9. Click the Test button to preview the results.10. From the Project menu, click Session Parameters and change the runLocale sessionparameter value to fr.11. Test the Order method query subject again to view the results.

Modifying the Properties of Query ItemsBecause reports are composed of different query items from one or more query subjects, queryitem properties control many aspects of the final report. When you create a model querysubject, the query items inherit the properties of the data source query items on which they arebased.For relational metadata, you can modify the properties of query items by• setting Usage and Aggregation properties to reflect the intended use of the queryitem• formatting query items to control how data appears in a report• identifying a column as a prompt, and controlling how the prompt information is presented tothe report author

Format Query ItemsYou can specify how query item values appear in a report. Use the Format property to choose aformat type, such as Text, Date, and Currency. Each format type contains properties that furtherspecify how the data appears.Steps1. In the Project Viewer pane, select the query item you want to format.2. In the Properties pane, click the Format property.3. Select the appropriate Format type.For SAP BW metadata with currency values, do the following:• Set the format type to currency to ensure that currency formatting is applied to all typesof reports.• In the Currency scope box, specify the type of currency. If you do not see the currencyyou want to use, click the Add button.4. If you want to format the property for every language defined in the project, select the All

Page 28: Framework Manager

Languages check box.5. In the Properties box, select or type the appropriate property value.6. Click OK.

Define a Prompt ControlPrompts help users quickly find the information they need in a report. Prompts are generallydefined in the reporting tool. However, you can change the definition of the query subject in themodel so that a prompt appears automatically when report authors create filters. This is usefulfor query items, such as ProductTypeCode, whose values are not shown in a report but areuseful for filtering data.Prompt TypesThe Prompt Type property sets the type of prompt control that the reporting applicationgenerates when running a report, such as an edit box or a pull-down list. Use this property tohave the prompt show one query item but use a different one. For example, the prompt canshow Employee Name but use Employee Number.Parent Item in a CascadeThe Cascade on Item Reference property indicates that the generated prompt is part of a seriesof generated cascading prompts. The query item that you reference in this property is the parentitem in the cascade. The system prompts the user for the cascade item before prompting themfor the current query item.Query Item to ShowThe Display Item Reference property identifies the query item that the prompt shows if it isdifferent from the query item whose properties you are editing.This property is used only for data driven prompt controls whose Prompt Type properties are setto either Select Value or Select With Search.Alternative Query Item for FiltersThe Filter Item Reference property identifies an alternative query item that is used by anyCognos Report Studio or Query Studio filters. This property is used only when the reportingtools generate a filter. This property helps create more efficient queries, because it is moreefficient to filter on an indexed numeric column than a non-indexed string column.Steps1. Click the query item.2. In the Properties pane, click the plus sign (+) next to the Prompt Info property.3. Modify the prompt properties to reflect the behavior you require.

Modifying How Query Items Are AggregatedWhen importing metadata, Framework Manager assigns usage and aggregation propertyvalues to each query item you import. When you create a model query subject, each query iteminherits the usage and aggregation properties of the query item on which it is based.You can change existing Usage and Regular Aggregate property values by either:• automatically regenerating the values of selected objects. • modifying the values in the Properties paneUsage PropertyThe Usage property identifies the intended use for the data represented by each query item.During importing, the Usage property is set according to the type of data that the query itemsrepresent in the data source.Regular Aggregate PropertyThe Regular Aggregate property identifies the type of aggregation that is associated with thequery item or calculation when you publish it. The report author can either use this defaultsetting to perform calculations on groups of data, or use the reporting application to apply adifferent type of aggregation.Semi-Aggregate PropertyFor relational metadata, the Semi-Aggregate property value is set to unsupported and isread-only.If the semi-aggregate value is set to unsupported in Framework Manager, the semi-aggregatebehavior is ignored in the reporting application.

Page 29: Framework Manager

Rules Governing the Aggregate PropertiesHere are some rules that govern how the Regular Aggregate and Semi-Aggregate propertiesare set by Framework Manager:• if the type of a query item is numeric or a time interval and the item is a fact, the RegularAggregate and Semi-Aggregate properties are both set to sum.• if the type of a query item is numeric or a time interval and the item is a calculation, theRegular Aggregate and Semi-Aggregate properties are both set to automatic.• if the type of a query item is numeric or a time interval and the item is not a fact, the RegularAggregate property is set to count and the Semi-Aggregate property is set to unsupported.• if the type of a query item is not numeric or a time interval, the Regular Aggregate and theSemi-Aggregate property are both set to unsupported.Regenerate Usage and Aggregation Property ValuesUsing Framework Manager to regenerate usage and aggregation property values ensures thatthey reflect the transformation rules. It is useful to regenerate these values before you publish apackage to ensure that these properties reflect modifications to your model.Steps1. In the Project Viewer pane, select one or more query subjects.2. In the Properties pane, change the following values:• the Usage property to unknown• the Regular Aggregate property to unsupported3. From the Actions menu, click Determine Usage.4. From the Actions menu, click Determine Aggregation Rules.

Modify a Property for Multiple Query ItemsYou can modify a property for multiple objects at the same time. These objects can be eitherquery subjects or query items.Steps1. Select the objects that you want to modify.Only the properties that are common to all objects are shown in the Properties pane.2. If you want to sort the property values, double-click the property heading.An arrow appears to indicate the direction in which values are sorted. You can togglebetween ascending and descending order.3. If you want to filter property values, click the arrow to the right of the property heading. Youcan select a value or click Custom to define the criteria for the rows you want to show.The objects are selected in the Project Viewer.4. Make any changes to the values of the property.

Adding Business RulesYou can add business rules to the query subjects in your model to refine the data retrieved andensure that the right information is available for report authors.You can• add calculations so that report authors can include calculated data in their reports • create and apply filters so that you can limit the data that a query subject retrieves• add prompts so that users are prompted to filter data when they open a report • use session parameters and parameter maps in macros todynamically resolve expressionsAdvantagesCreating business rules and storing them in the model has several advantages:• They save time.• They ensure consistency.• They are easy to update.• They enhance security.

Create a CalculationYou can create calculations to provide report authors with calculated values that they regularlyuse.

Page 30: Framework Manager

Stand-alone CalculationsUse a stand-alone calculation when you want to reuse the expression. You can apply astand-alone calculation to one or more query subjects to provide calculated data to a report, orinclude it in a package to make it available to your report authors. By moving a stand-alonecalculation or a shortcut to it into a folder, you can better organize your model objects.Embedded CalculationsYou may want to use a calculation with only one query subject. You can create an embeddedcalculation when modifying a relational data source query subject, multidimensional datasource query subject, or model query subject.If you start with an embedded calculation, you can later convert it into a stand-alone expressionthat you can apply to other query subjects.Tip: Right-click the calculation expression in the query subject editor and click Convert toStand-Alone Calculation.Steps1. Do one of the following:• If you want to create a stand-alone calculation, click the model folder and, from theActions menu, click Create, Calculation.• If you want to create an embedded calculation, double-click the query subject that willcontain the calculation, and then click the calculation button.2. Define the expression.3. Click OK.4. Modify the Data Type property to identify the type of data the calculation returns.The reporting application uses this information to format the data that the calculationreturns.

Create a FilterA filter is an expression that specifies the conditions that rows or instances must meet to beretrieved for the query subject, calculation, or report to which the filter is applied.

Framework Manager supports two types of filters: stand-alone and embedded.

Stand-alone FiltersUse a stand-alone filter when you want to reuse the expression. You can add a stand-alone filterto one or more query subjects to limit the data that the query retrieves when the filtered querysubject is used in a report, or you can include it in a package to make it available to your reportauthors.Embedded FiltersYou may want to use a filter with only one query subject. You can create an embedded filterwhen modifying a relational data source query subject, multidimensional data sourcequery subject, or model query subject.Steps1. Do one of the following:• If you want to create a stand-alone filter, click the model folder and, from the Actionsmenu, click Create, Filter.• If you want to create an embedded filter, double-click the query subject that will containthe filter, and then click the filter button.2. Define the expression.3. Click OK.

Applying a FilterTo apply a filter, you must modify the data source query subject or model query subject.The query subject must either contain the query items that the filter references, or havea relationship path to the query subjects that contain the query items.If a filter is defined as mandatory (Usage is set to always) in some places and as optional inother places, all instances of that filter are considered to be mandatory. If you need the filter tobe mandatory in some places and optional in others, create different versions of the filter, each

Page 31: Framework Manager

with its own name.

Example - Create and Apply a FilterYou want to create a query that shows the currency name for a specific country. To do this, youcreate a filter that returns data for a specific country code, and apply the filter to a model querysubject that retrieves the currency name for each country.Steps1. Open the gosales_goretailers sample model.It is located ininstallation_location/crn/webcontent/samples/Models/gosales_goretailers/gosales_goretailers.cpf.2. Create a filter to limit the retrieval of data to only those country codes in the conversion ratetable whose value is "2":• Click the Filters folder and, from the Actions menu, click Create, Filter, and name thenew filter ConversionRateCountryCode.• Click the Model tab.• In the Available Components box, open the Database view folder and then open theGoSales folder.• Select Conversion rate.Country code, click the arrow to add it to the Expressiondefinition box, and type = '2' at the end of the expression.• Click OK.3. Create a model query subject named ISO Code, and apply theConversionRateCountryCode filter:• In the Available model objects box, open the Database view folder.• Drag Country.Country and Country.ISO 3-letter code into the Query Items andCalculations box.• Open the Filters folder, drag ConversionRateCountryCode to the Filters box.4. Click Preview.The generated SQL contains the filter, even though it does not affect the result set.5. Change the usage of the ConversionRateCountryCode filter to Optional.The default usage is Always.6. Click Preview.

Using Prompt Values to Filter DataYou can substitute a prompt for a value so that users can filter data by typing a value when thereport opens.In general, it is better to use the reporting application to define type-in prompts to make use ofthe additional prompt features. However, report authors cannot modify some variables. Forthese variables, you can use Framework Manager to define type-in prompts.You can use prompts in:• parameter maps• session parameters• stored procedure arguments• expressions, including filters, calculations, and relationshipsThe syntax for using a prompt as a value is?<PromptName>?

Create a Parameter MapUse parameters to create conditional query subjects that allow for substitutions when the reportis run. Parameter maps are objects that store key-value pairs. Parameter maps are similar todata source look-up tables. Each parameter map has two columns, one for the key and one forthe value that the key represents. Keys and values can be manually entered, imported from afile, or based on existing query items in the model.All parameter map keys must be unique so that Framework Manager can consistently retrievethe correct value. Do not place quotation marks around a parameter value.Steps to Manually Create a Parameter Map

Page 32: Framework Manager

1. Click the Parameter Maps folder and, from the Actions menu, click Create, ParameterMap.2. In the Name box, type a name for the new parameter map.3. Click Manually enter the parameter keys, and/or import them from a file and click Next.4. Choose how to enter values:• To manually enter values, click New Key, type a key, and press Tab to enter a value forthat key.• To import keys and values, click Import File and identify the location of the appropriate.csv file. You can import from a .txt file only if the values are separated by tabs ratherthan commas.5. Modify existing parameters as required.6. Click Finish.Steps to Create a Parameter Map Based on Existing Query Items1. Click the Parameter Maps folder and, from the Actions menu, click Create, ParameterMap.2. In the Name box, type a name for the new parameter map.3. Click Base the parameter map on existing Query Items and click Next.4. In the Select Query Items for Parameter Map box, select the query item to use as the key.,and then select the query item to use as the value.Both query items must be from the same query subject.5. Click Next.6. Click Finish.

Create a Session ParameterA session parameter is a variable that Framework Manager associates with a session. Forexample, user ID and preferred language are both session parameters. Because sessionparameters are key and value pairs,value to test the results that value returns. The override value is valid only when you have themodel open, and is not saved when you save the model. If no override value exists, FrameworkManager uses the default value when it executes a query that contains a session parameter.The rules governing the use of parameters include the following:• All possible return values must have the same data type.• Only one value can be defined.There are two types of session parameters: environment and model.Environment Session ParametersEnvironment session parameters are predefined and stored in Content Manager. They arelimited to• account.defaultName• account.personalInfo.userNameThis is only applicable if a user did not log on anonymously.• runLocaleModel Session ParametersIf you need a session parameter that does not exist, you can create a model session parameter.Model session parameters are stored in a parameter map named _env. They are set in theproject and can be published with a package.Model session parameters must have their values set within the scope of objects in theFramework Manger model. The scope can include the use of existing environment sessionparameters, as well as static values.Steps1. From the Project menu, click Session Parameters.2. Click New Key and type a session parameter key and value.

Page 33: Framework Manager

3. Choose how to handle the override value.• To avoid having to set the override value every time you edit the project, set the sessionparameter as a value.• To avoid having to remove the project setting each time before you publish it, set thesession parameter as a session override.4. Modify existing parameters as required.5. Click Finish.

Using Parameters with Relational Data Source Query SubjectsModel objects do not reflect changes to the data source objects on which they are based.Therefore, when you add a parameter to a data source query subject, consider whether youwant to create a model object that references the parameter. If so, you must assign an alias tothe parameterized object in the data source query subject. This ensures that any model querysubjects, filters, or calculations that reference the object return the correct results when theparameter value changes.

Using Query Macros to Create PromptsMacros are fragments of code that you can insert anywhere in the Select statement that definesa query subject. You can include references to session parameters, parameter maps, andparameter map entries. Parameter values are set when the query is run.For example, you can use the language session parameter to show only the data that matchesthe language setting for the current user.Macros can be used in these different ways:• They can be inserted in the SQL.An example is Select * from Country where Country.Name = #$myMap{$runLocale}#• They can supply an argument to a stored procedure query subject.If a value is not hardcoded for the argument, the stored procedure query subject can beused to return different data.• They can be inserted in expressions, such as calculations and filters.An example is a filter [gosales].[Sales staff].[Staff name] = #$UserLookUpMap{$UserId}#• They can be used to dynamically complete the properties of a data source query subject.This enables different users to supply different connection information and thus accessdifferent data sources. The properties that can contain macros are: Content ManagerDatasource, Catalog, Cube, and Schema.An example using the Content Manager Datasource Property is #$DataSourceMap{$UserId}#• They can be used as a parameter wizard.Parameters can reference other parameters. An example is Map1, Key = en-us, Value =#$myMap{$UserId}#

• They can be used in the Session Parameter dialog box.An example is MySessionParameter, value = #$myMap{$UserGroup}#Do not insert macros between existing quotation marks or square brackets because FrameworkManager does not execute anything within these elements.Steps1. In the Query Subject Definition dialog box, click the insert macro button to start the MacroEditor.2. In the Available components box, click the parameter maps, session parameters, orfunctions you want to use, and drag them to the Macro definition box.3. Insert single quote or double quote functions.Tip: Click the arrow next to these buttons for a menu of choices for placing the quotationmarks.4. If you want to edit a parameter map or session parameter, in the Macro definition box, clickit.The Parameter Map or Session Parameters dialog box appears. You can set override

Page 34: Framework Manager

values for session parameters, add new items, or change values.5. Check the macro in the Information box.If a macro is incorrect, an error message appears.Tip: To clear a macro, click the clear current expression button.6. Click OK.

Creating a Business View of the MetadataWhen you create a business view of the metadata, you make it easier for your users to find andunderstand the data contained in the model. The business view represents an organizationalstructure that mirrors your business and your decision-making processes.You can• include metadata in several folders by using shortcuts• organize objects by creating folders or namespaces• organize query subjects by creating query item folders

Use ShortcutsA shortcut is a reference to an object, either a relationship, a query subject, or a folder. Werecommend that you use shortcuts in the business view when there is an overlap betweengroupings and you want to include the metadata in more than one folder. With shortcuts, youcan have multiple references to an object.

For example, you create folders named Orders, Products, and Customers. If you want bothOrders and Customers to contain the same query subject, you must create a shortcut to thequery subject and add it to both folders.

If there is more than one shortcut to the same object in the same folder or namespace, theshortcuts act as aliases.Shortcuts and RelationshipsWhen you decide where to place shortcuts, consider how the scope of the shortcut affectsrelationships.Shortcuts in a different folder from the target query subject use the relationships of the targetquery subject.Shortcuts in the same folder as the target query subject ignore the relationships of the targetquery subject and use only those specified for the shortcut.You can specify a different relationship for a shortcut than the relationships of the target querysubject. By creating relationships from the shortcut to other query subjects, you avoid cross-joinerrors in the model.Shortcuts and Query SubjectsShortcuts result in fewer query subjects to maintain. You can keep query subjects in the importview and keep shortcuts in the business view.When you create a shortcut to a query subject, you cannot customize which query items is inthe shortcut. The entire query subject is included in the shortcut.Shortcuts are useful when creating star schemas. A fact table and its dimension tables arestored in the import view. If you have multiple star schemas, only one query subject must existfor a dimension table. All other instances of the query subject are shortcuts to the original. Byusing shortcuts, you can build queries involving multiple fact tables that are related throughshared dimension tables.The security you specify for an object is passed to shortcuts that reference the secured object. Ifyou have a shortcut to a secured object, only users with permission to see the secured objectcan see the shortcut in the published package.Steps• Right-click the query subjects or folders that you want to create shortcuts to, and clickCreate Shortcut.

Create a Folder or NamespaceYou can create folders to organize objects by subject or functional area. This makes it easier foryou to locate metadata in projects that have many query subjects. You can nest folders by

Page 35: Framework Manager

creating new folders in an existing folder.Create separate namespaces when you want to reuse identical objects with the same nameIf you set security on a folder and then move objects into the folder, confirm thatexclusions are set correctly.Steps1. From the Actions menu, click Create, Folder.2. In the Name box, type a name for the new folder.3. Click Next.4. Choose whether to create shortcuts to the objects or actually move the objects:• To create shortcuts that reference selected objects, click Create a shortcut for theselected items.Do not select all the objects in the namespace to avoid creating a recursive structure inthe reporting application.• To move selected objects to the folder, click Move the selected items to the newfolder.When you move an object that participates in a relationship, the relationship may alsomove. 5. Select the objects you want to add to the folder.6. Click Finish.

Create a Query Item FolderYou can create query item folders to organize query subjects that contain a large number ofquery items. A query item folder can contain only query items and query item folders.Steps1. In the Project Viewer, click a query subject.2. From the Actions menu, click Create, Query Item Folder.A new query item folder appears in the Project Viewer, under the query items that belong tothat query subject.3. Drag the query items that you want into the query item folder.You cannot add query items that do not exist in the parent query subject.

Create a Star Schema GroupingA dimensional model often uses a star schema design. Numeric, transactional data is containedin a central fact table. Related dimension tables radiate out from the fact table.The biggest advantage of star schema groupings is that they make it easier for report authors tobuild valid reports by avoiding double-counting and misleading associations between dimensiondata occurrences. In addition, performance can be faster when there are fewer tables to join.Star schema groupings also reduce the risk of users creating huge queries by mistake, and theyare easier to manage, maintain, and enhance.

Selecting One or More Query SubjectsWhen you create a grouping, you can select one or more query subjects. Generally, you select asingle query subject when the query subject is a fact that has a relationship to every querysubject that you want in the star schema group. When you create a star schema grouping that isbased on one query subject, the following occurs:• Framework Manager shows a list of query subjects with which it has relationships so thatyou can quickly select the query subjects that you want in the grouping.• The name of the group is based on the name of the fact table.• The new group is created under the same parent as the selected query subject.Steps1. Identify the fact and dimension tables.2. From the Actions menu, click Create Star Schema Grouping.3. If you want to exclude a query subject from the group, in the Selected query subject box,

Page 36: Framework Manager

clear the check box next to the query subject.4. Choose one of the following:• To add shortcuts to the grouping, click Create a shortcut for all selected objects.• To move the objects to the grouping, click Create shortcuts only for objects that areused outside the star schema.5. Move the selected objects to a separate namespace:• Ensure that the Create a new namespace for this grouping check box is selected.• In the Namespace name box, type the name of the new namespace.6. Click OK.7. If there are multiple relationships, also known as role-playing dimensions, createrelationship shortcuts for them.Resolve Multiple Conformed Star SchemasIn dimensional models, you may have fact tables that share dimensions.If you use multiple dimensions without any items from the fact tables, joins become ambiguous.You must create shortcuts when you create star schema groupings and keep the groupings inseparate namespaces.Steps1. Select one of the fact tables.2. From the Actions menu, click Create Star Schema Grouping.3. If you want to exclude a query subject from the group, in the Selected query subject box,clear the check box next to the query subject.4. Click Create a shortcut for all selected objects.5. Move the selected objects to a separate namespace:• Ensure that the Create a new namespace for this grouping check box is selected.• In the Namespace name box, type the name of the new namespace.6. Click OK.7. Repeat these steps for the other fact table.Model a Snowflaked Dimension as a Star DimensionA snowflake removes low-level cardinality attributes from the dimension tables and places themin secondary dimensions that are linked back to the original dimensions by artificial keys.You can model a snowflake as a star dimension.Steps1. Select the data source query subjects that are required to access the data, and put them ina new namespace.2. Ensure that all relationships are correct.3. Handle multilingual metadata.4. Create a model query subject for each snowflaked dimension:• Select the query subjects you need for the dimension.• From the Actions menu, click Merge in New Query Subject.• When prompted, click Yes to recreate all relationships.• Rename the new model query subject. By default, its name is composed of theconcatenated names of the original query subjects.5. If multiple levels are stored in a single query subject, specify dimensional information.You now have a star dimension query subject.

Making Metadata Available toReport AuthorsA package is a subset of the query subjects and other objects defined in the project. You thenpublish the package to the Cognos ReportNet server so that the report authors can use themetadata.

To publish a project:

Page 37: Framework Manager

Check the project to ensure that the contents are consistent and do not contain any errors.

Set governors for reports. Create custom packages to suit different reporting requirements. Add security to the package. Analyze the effect of any changes you made to a package on the reports that were

created using the published packages. Specify languages in the package. Publish the package to a location that report authors can access.

Check a ProjectAt any point in the modeling process, you can check the validity of your project. Before youpublish a package you can also ensure that there are no invalid objects that can breakqueries in the published package.Invalid RelationshipsFramework Manager identifies query subjects whose relationships are invalid, so that you candelete them. Invalid relationships include• many-to-many relationships• orphaned query subjects (query subjects with no relationships)• multiple relationships (or relationship shortcuts) between query subjects (or query subjectshortcuts)Invalid ReferencesInvalid references exist when an object references another object to which it does not haveaccess or which no longer exists in the project.Invalid Object DefinitionFramework Manager warns you when your changes to an object will mean it cannot beexecuted. If you proceed, these are marked as invalid. When you verify a project, FrameworkManager identifies any query subjects, shortcuts, filters, calculations, and relationships thatwere previously marked as invalid so that you can repair them.Invalid Aggregation RulesFramework Manager identifies any aggregate settings that are invalid for the data type of thequery items to which they are applied. For example, if Product_Name has a character data type,its aggregate property cannot be set to either sum, count, or average. To repair the error,Framework Manager resets the aggregate property to unsupported.Steps1. From the Project menu, click Verify Model.Tip: To check a few objects, right-click the objects and click Verify Selected Objects.2. Click each error you want to correct.Tip: The complete error messages are shown in the Message Details box.3. Click Repair.A dialog box shows the number of objects repaired, and identifies the number of brokenreferences that need to be retargeted.4. To fix broken references, click Yes.When you repair a filter that contains an invalid reference, you must check its expression toensure that the query items it now references do not contain invalid references. Anyexpression components that are invalid are underlined in red. 5. Identify which references you want to appear:• To show every reference that exists for the selected object, click Show all references.Use this option to view valid relationships in which the object participates for morecontext about how that object is used.• To show only the references that are broken for this object, click Show only brokenreferences.Use this option to reduce the number of references that are displayed to only those thatneed to be repaired.6. Click the Retarget/Delete Value column, and choose how to fix the broken reference:

Page 38: Framework Manager

• To locate the object you want to reference, click Browse.• To delete the object that contains the broken reference, click Delete Object.• To clear an existing value, click None.• To use a reference that you have assigned to another object during this repair session,click the name of the reference.7. Click the Apply to column and choose where you want to apply the reference:• To apply the change to this object only, click This Reference Only.• To apply the change to every object that references the same object, click EntireProject.8. Click OK.After fixing invalid relationships, if the relationships still appear as broken in the Verify dialogbox, close and re-open the model.

Set GovernorsGovernors control SQL generation. Use them to reduce system resource requirements andimprove performance.Steps1. From the Project menu, click Edit Governors.2. Specify the limits that you want to use when retrieving data.3. Click OK.

Create or Modify a PackageYou create a package to make metadata available to report authors. A package is a subset of aproject. It must contain all the information that a specific user or group of users needs to createreports.A package contains query subjects whose SQL defines the query items and relationships thatthe package retrieves. When you create a package, you select the objects that a user will wantto report on. When you create or modify a package, you can also apply security to the packageSteps to Create a Package1. Click the Packages folder, and from the Actions menu, click Create, Package.2. In the Provide Name page, type the name for the package and, if you want, a descriptionand screen tip. Click Next.3. Specify whether you are including objects from existing packages or from the project andthen specify which objects you want to include.Tip: If you created other packages, we suggest that you add package references by clickingUsing existing packages.4. Choose whether to use the default access permissions for the package:• To accept the default access permissions, click Finish.• To set the access permissions, click Next.5. Specify who has access to the package, and click Next.You can add users, groups, or roles.6. Move the language to be included in the package to the Selected Languages box, and clickNext.7. Move the sets of data source functions you want available in the package to the Selectedfunction sets box.8. Click Finish and choose whether to publish the package.Steps to Modify a Package1. Right-click the package you want to modify, and then click Edit Definition.2. Click the objects you want to add to or remove from the package.Tip: To toggle through the options for an object, click the object icon, or select an optionfrom the list. 3. Click OK.4. If you want to add or remove package references to the package you are modifying, clickEdit.

Page 39: Framework Manager

5. Click OK.

Controlling Access to Metadata and DataIn Framework Manager, security is a way of restricting access to metadata and data acrossCognos ReportNet products. There are different types of security in Framework Manager:• data securityYou create a security filter and apply it to a specific query subject. The filter controls the datathat is shown to report authors when they set up their reports.• object securityYou secure an object directly by allowing users access to the object, denying users accessto the object, or keeping it hidden for all users.• package securityYou apply security to a package and identify who has access to that package.Each type of security uses users, groups, and roles to define access.

Add a User, Group, or RoleUsers and groups are created for authentication and authorization purposes. You can use usersand groups created in third-party authentication providers, as well as create your own, inCognos ReportNet.In Framework Manager, you add data security and metadata security usingthese users, groups, and Cognos groups.UsersA user entry is created and maintained in a third-party authentication provider to uniquelyidentify a human or a computer account. You cannot create users in Cognos ReportNet.

Users can become members of groups defined in third-party authentication providers andgroups defined in Cognos ReportNet. A user can belong to one or more groups. If users aremembers of more than one group, their access permissions are merged.Groups and RolesExamples of groups are Employees, Developers, or Sales Personnel. Members of groups canbe users and other groups. Group membership is part of the users’ basic identity. When userslog on, they cannot select a group they want to use for a session. They always log on with all thepermissions associated with the groups to which they belong.

A role is a special group. It represents a collection of users that have similar responsibilities andsimilar privileges in the organization. Members of roles can be users, groups, and other roles.Role membership is not part of the users’ basic identity.You create Cognos groups when• you cannot create groups in your authentication provider• groups are required that span multiple namespaces• portable groups are required that can be deployed• you want to address specific needs of Cognos ReportNet administration• you want to avoid cluttering your organization security systems with information used only inCognos ReportNet

Steps to Create a New Group or Role1. Right-click the package you want, and click Edit Package Access.2. Click New.3. Follow the instructions in the New Group wizard.4. Click Finish, and then click OK.Steps to Remove a Group or Role1. Right-click the package you want, and click Edit Package Access.2. Click the user, group, or role you want to remove, and click Remove.3. Click OK.

Page 40: Framework Manager

When you remove Cognos groups or roles, you do not delete them from the third-partyauthentication provider or Cognos ReportNet.Steps to Add a Group or Role1. Right-click the package you want to modify, and click Edit Package Access.2. Click Add.Tip: To view all the users in a group, select the Show users in the list check box, and clickthe group you want.3. Specify the users or groups.• To add entries by selecting the names from the list, on the Navigate tab, select thecheck box next to the appropriate user, group, or role, and then click Add.• To search for users, groups, or roles in a namespace you are currently using, on theSearch tab, type the search criteria, and click Search. When the entry appears in theSearch results box, select it and click Add.• To add entries by typing the names, on the Type tab, in the Type the names text box,type the names of users, groups, and roles, in the following format, and then click Add.namespace_name;namespace_name/group_name;namespace_name/user_nameFor example, you add a Report Authors group and a user named scarter by typing thefollowingLDAP;Cognos/Report Authors;LDAP/scarter.Separate each entry using a semicolon (;).The entries that you add appear in the Entries to be added box.Tip: Select all or Deselect all applies to the current page, which may not represent allavailable entries.4. Click OK twice.

Add Data SecurityYou can restrict the data represented by query subjects in a project by creating a security filter.The security filter controls the data that is shown to the report authors when they set up theirreports.You can base the security filter on existing security filters. If you choose this option, the securityfilter inherits the filter, and all the filter properties.When you create a security filter, you can also use existing project filters, or create new filtersusing the Expression Editor.Steps1. Right-click the query subject you want, and click Specify Data Security.2. To add new users, groups, or roles, click the Add Groups button.3. If you want to base the group on an existing group, click a group in the Based On column.Tip: If you do not see the group you want in the list, you must add the group to the securityfilter.4. If you want to add a filter to a group, in the Filter column, click either Create/EditEmbedded Filter or Insert from Model.5. Click OK.

Add or Remove Object SecurityMetadata security can be applied directly to objects in a project. When you add object-basedsecurity, you apply a specific user, group, or role directly to the object. You choose tomake the object visible to selected users or groups.

When you secure an object, a package is automatically created in Framework Manager. Thepackage name consists of an underscore (_) and the name of the secured object. Theseobject-based packages are visible in the Object Explorer. You can use this package to see whichobjects in the project are included, hidden, or excluded from a specific user group.Scope of Object SecurityThe security you specify for an object is passed to shortcuts that reference the secured object. Ifyou have a shortcut to a secured object, only users with permission to see the secured objectwill be able to see the shortcut in the published package.

Page 41: Framework Manager

Steps to Add Object-Based Security1. Right-click the object you want to secure, and click Specify Object Security.Tip: You can select more than one object and then right-click them.2. Select the users, groups, or roles you want to change. Or, click the Add button to add newusers, groups, or roles.3. Specify security rights for each user, group, or role by doing one of the following:• To deny access to a user, group, or role, select the Deny check box next to the name forthe user, group, or role. Deny takes precedence over Allow.• To grant access to a user, group, or role, select the Allow check box.Tip: To allow everyone to see all objects unless specifically denied access, select the Allowcheck box for the Everyone role.4. Click OK.A list of new and updated object-based packages appears.Steps to Remove Object-Based Security1. Right-click the secured object and click Specify Security Rights.2. Remove security rights by clearing both the Allow and Deny check boxes for all users,groups, or roles.3. Click OK.A list of packages that will be affected by these changes appears.

Add Package SecurityYou can define metadata security when you create and publish packages in FrameworkManager. You can also define metadata security after creating the package.A package is a secured subset of a project. A package can be published and can be included inother packages.You can add entries that were created in both third-party authentication providers and CognosReportNet as members of a Cognos group.Steps1. Right-click the package you want and click Edit Package Access.2. If you want to create, add, or remove a user, group, or role, click the User Access tab.3. If you want to grant administrative access to a user, group, or role, click the AdministratorAccess tab.4. Click OK.

Explore a PackageWhen you have a large number of projects and object-based security in a project, it can bedifficult to keep everything organized. You can use explore packages to see the packages androles in a project.Steps1. Right-click the Packages folder and click Explore Packages.2. Choose what you want to do.3. Click Close.

View the Distribution of an Object in PackagesWhen you view the package inclusion of an object, you see, by package, where that objectexists and whether it is selected, unselected, or hidden in that package.Steps1. Right-click the object you want to see and click View Package Inclusion.2. To edit the package, click Edit Package.3. Click OK.

Specify LanguagesYou can specify which languages are published with each package. You can create severalpackages based on the same model, each using a different language.

Page 42: Framework Manager

Steps for One Package1. Right-click a package, and click Specify Languages.2. Click one or more languages and use the arrow buttons to move them from the AvailableProject Languages box to the Selected Languages box.Tip: To select more than one language, use Ctrl+click.3. Click OK.Steps for All Packages1. Right-click the Packages folder, and click Specify Package Languages.2. Select the check box for the language you want for each package.3. Click OK.

Externalize Query SubjectsWhen publishing a package, you have the option to externalize query subjects so that you canuse them in Cognos Series 7 Transformer or other applications.You first define how the query subjects will be externalized. Then you specify that the querysubjects are to be externalized when you publish the package. You have these optionsfor the externalize method:• defaultThe query subject will not be externalized.• csvUse to generate a query expression that can be used as a data source in Transformer. Thecomma delimited file that is generated contains the metadata. This option is intended foruse only with Transformer. For any other purpose, we recommend that you use the taboption.• tabUse to generate a query expression that can be used directly as a data source. Thegenerated file contains data based on Unicode using UTF-16 encoding.• iqdUse to generate an Impromptu Query Definition file. Native SQL is generated in themodel.xml file as a custom property.• embeddedUse if the query subject does not require any local processing. To avoid including securityfilters in the query, set the design mode to false. Cognos SQL and Native SQL aregenerated in the model.xml file as custom properties.One file is generated for each query subject that is set to be externalized.Steps1. Select a query subject.You set the externalize method for one query subject at a time.2. In the Properties pane, in the Externalize Method box, select the method you want.When you publish the package, the query subjects you selected will be externalized.

Publish a PackageYou can publish a package to the Cognos ReportNet Server for report authors andbusiness authors to use. Report authors use the published package in Cognos Report Studio tocreate standardized reports. Business authors use the package in Query Studio to create adhocqueries.

Steps1. Select the package you want to publish.2. From the Actions menu, click Publish Packages.3. Choose where to publish the package:• To publish the package to the Framework Manager repository, click Cognos ReportNet

Page 43: Framework Manager

Server.• To publish the package to a network location, click Location on the network.4. To enable model versioning, select the Enable model versioning check box.5. In the Number of model versions to retain box, select the number of model versions ofthe package to retain.Tip: To delete all but the most recently published version on the Cognos ReportNet server,select the Delete all previous model versions check box.6. If you want to use query subjects in Transformer, select the Generate the files forexternalized query subjects check box.When you are externalizing query subjects, you must publish the package to a networklocation.7. To troubleshoot the package for errors before publishing, select the Verify the packagebefore publishing check box.8. Click Publish.If you chose to externalize query subjects, Framework Manager lists which files werecreated.9. Click Finish.

Analyze the Effects of Changes to a PackageAfter you create and publish a package in Framework Manager, you cananalyze the effects of any changes you made to the package on the reports that were createdbased on it and saved in the public folder.Steps1. Select the published package you want to analyze and, from the Actions menu, clickAnalyze Publish Impact.2. Choose what you want to view.3. Click Close.