You can add attributes to an existing view or table in a data model by using the HCL®
Cognos® Report Studio.
Before you begin
Make sure you have completed the following tasks:
- Created the offer attribute in the UA_OfferAttribute table.
- Added the offer attribute to the Campaign Custom Attributes reporting schema.
- Used the Reports SQL Generator to generate the view creation script.
- Run the generated script in the Campaign
database to update the Offer Custom Attribute reporting view,
UARC_OFFEREXTATTR.
About this task
The following example task shows how to add an item to an existing view in the HCL
Cognos model. For this example, assume that you need to add
a custom offer attribute to the Campaign
database and include it in a report.
To add the new offer attribute to the Cognos
Campaign model, complete the following
steps.
Procedure
-
Make a backup of the Campaign model.
Browse to the Cognos/models directory and copy the
CampaignModel subdirectory.
In a distributed Cognos environment, the
models directory is on the system running the Content Manager.
-
In Framework Manager, open the Campaign.cpf file (the project) and expand
the Import View node.
-
Under Import View, select the query object that represents the reporting
view for custom offer attributes: .
-
Select .
Cognos refreshes the columns that are listed under the
node for the view so they reflect all columns currently present in the
UARC_OFFEREXTATTR
reporting view in the Campaign database.
-
Expand the Model View and select the node that represents custom offer
attributes in this view: .
- Double-click the Offer Custom Attributes node
to open the Query Subject Definition dialog
box.
-
Locate the new column and add it to the Model View.
-
Edit the name of the query item so it can be read easily.
For example, the column that is named LASTRUNDATE in the
Import View of the Campaign data model appears as Last Run
Date in the Model View.
Note: Because the Business View contains a shortcut to the Offer
Custom Attributes node in the Model View, the new query item now
available in the Business View.
- Save the model.
- Publish the package to the Cognos content
store.
You can add the attribute to the appropriate report by using HCL
Cognos Report Studio.