Wednesday, 6 January 2016

Creating and Publishing Packages

Creating and Publishing Packages

Once all the layers of the model have been created, we have to present the model to the report authors for them to use. This chapter covers the creation of the package, or packages, including setting up security.
The following topics are covered in this chapter:
  • Creating packages
  • Publishing packages
  • Creating externalized query subjects
  • Using package versions
  • Applying security settings to packages
By the end of this chapter you will be able to create and publish a package to allow report authors to use the data model to design their reports in IBM Cognos Studios.
After creating our Framework Manager model we must now make our model available to report authors. To do this we need to create a package; the items within the package are what the report author uses to create their reports.
Once we have created the package we need to publish the package to the IBM Cognos Business Intelligence Server. During the publishing process there are various options available, including the ability to create external queries, to create versions, to add security, and to specify whether the package should use Dynamic Query Mode.
To illustrate some of the features of creating and publishing packages we will use the following model. In this model the Import Layer is called Foundation Layer, and the Modeling Layer is called Business Layer.
Creating and Publishing Packages

Creating a package

The first step in making our model available to report authors is the creation of a new package. A package can be created as follows:
  1. In the Package Viewer pane of our model, select Packages.
  2. Right-click and select Create | Package, or from the menu choose Actions | Create | Package
  3. This will launch the Create Package wizard.
  4. Creating a package
  5. The first thing we must do is provide a name for the package and optionally a description and screen tip, and then click on Next.
  6. We must now define the objects to be included in our package.
  7. Creating a package
  8. The current project is the default for choosing what to include in the package.
  9. We do not want to include all objects in this package so click on the down arrow next to theFoundation Layer name; we now have the following choices:
    • Select Component and Children (this is the default option)
    • Hide Component and Children
    • Unselect Component and Children
  10. Creating a package
  11. Use the Hide Component and Children option for the Import (Foundation) Layer, and repeat this choice for the Modeling (Business) Layer.
  12. NOTE

  13. If you use the Unselect Components and Children option this will cause the model to generate information messages about components that need to be included in the package, because they are referenced by the components being published.
  14. We do not want all the folders in the Presentation Layer to be in our package, so expand the Presentation Layer by selecting the + sign next to the layer name.
  15. Creating a package
  16. Exclude the folders we do not want in the final package by selecting the Unselect Components and Children option, and include folders by selecting the Select Components and Childrenoption. Items inside the folders can be included and excluded in the same way.
  17. When all objects to be included in the package have been selected, click on Next to continue.
  18. We can now select the vendor's database functions to be included in the package.
  19. Creating a package
  20. The function lists are selected from the Available function sets list on the left and transferred to the Selected function sets list on the right by selecting the function set and clicking on the right-pointing arrow. Unwanted function sets can be removed from the Selected function sets list by selecting them and pressing the left-pointing arrow.
  21. NOTE

  22. You should only select the function lists for the database vendor you are using, for example SQL Server, Oracle, or Sybase. If your database is not in the list of available function sets then do not include any vendor functions.
  23. If you include vendor functions that are not supported by your database then your report authors may use these functions, which could result in errors with their reports.
  24. Click on Finish to complete your package definition.
  25. When prompted to publish the newly created package, select No.

Making changes to a package

We can also make changes to our package as follows:
  1. Right-click on the package and choose Edit Package from the pop-up menu; this will show the following dialog:
  2. Making changes to a package
  3. Click on the drop-down arrow next to the folders and choose whether to include or exclude the item, in the same way as when creating your package.
  4. After making all the changes required, click on OK to save them.

2 comments: