Creating data source query subjects

Data source query subjects directly reference data in a single data source. IBM® Cognos® Framework Manager automatically creates a data source query subject for each table and view that you import into your model. You can create additional data source query subjects.

You can add any combination of objects to a query subject, such as query items, other query subjects, or dimensions. You can add stand-alone calculations and filters, and you can also embed calculations and filters in the query subject.

You can also create model query subjects, which are based on metadata that exists in your model, and stored procedure query subjects, which are generated from the stored procedures in a relational data source.

Procedure

  1. Select the namespace folder, and click Actions, Create, Query Subject.
  2. In the Name box, type a name for the new query subject.
  3. Click Data Source, OK.
  4. Complete all the steps in the New Query Subject wizard.

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

  5. Click Finish.
  6. Right-click the query subject you created and click Edit Definition.
  7. Click the SQL tab, and from the Available database objects box, drag objects to the SQL box.

    If your project contains multiple data sources and you want to add objects from different data sources to the query subject, click Insert Data Source, select the required data source, and click OK.

    You can also insert a macro, embed a calculation, and embed a filter. For more information, see Creating calculations orCreating filters.

  8. Choose the action you want:

    Goal

    Action

    Provide control over granularity

    Click the Determinants tab. See Specifying determinants.

    Test the query subject

    Click the Test tab. See Testing query subjects or query sets.

    View the SQL

    Click the Query Information tab. SeeEditing the SQL.

    View the system tables from the data source

    Select the Show System Objects check box.

  9. Click OK.

    A warning displays if any modifications invalidated relationships, other query subjects, calculations, or filters.

  10. Ensure that the Usage and Regular Aggregate properties are set correctly. See Modifying how query items are aggregated.