Using Db2 Cube Views

Topics:

The Adapter for Db2 supports Cube Views as an object type. You can specify Cubes as the object type for which you want to create synonyms.

Before you can use the Adapter for Db2 with Cube Views, you must define Db2 connections for the database(s) containing the Db2 cube views.

For details, see Creating Synonyms.

Mapping Metadata for Db2 Cubes Views

Synonyms are generated for Cubes (not Cube Models). These synonyms reflect the structure of the cube and its attributes and measures, rather than the structure of the underlying Db2 tables and their columns.

The Master File synonym component has several segments:

  • The root segment corresponds to the Cube Facts.
  • The children segments correspond to the Cube Hierarchies.

The fields in the root segment reflect the Cube Measures. Field names and titles are generated based on measure business names, while aliases are generated based on measure names.

  • The PROPERTY attribute for these fields contains the word Measure (or Calculated Measure for calculated measures).
  • The REFERENCE attribute contains the aggregated expression for measures that are based on simple columns (not expressions) and have aggregations that match those available in the DML.

Example: Sample Db2 Cube View Master File

FILENAME=BASEAPP/COMPLEX_MEASURES__C_, SUFFIX=DB2CV   , $
  SEGMENT=SALESCF, SEGTYPE=S0, $
    FIELDNAME=4ADDS, ALIAS=4adds, USAGE=I11, ACTUAL=I4, MISSING=ON,
      TITLE='4adds', REFERENCE=CNT.4ADDS, PROPERTY=MEASURE,  $
    FIELDNAME=POWEROFADDS, ALIAS=powerofadds, USAGE=D21.2, ACTUAL=D8,
      MISSING=ON, TITLE='powerofadds', PROPERTY=MEASURE,  $
    FIELDNAME=PROFIT_CONST, ALIAS=profit*const, USAGE=D21.2, ACTUAL=D8,
      MISSING=ON, TITLE='profit*const', PROPERTY=MEASURE,  $
    FIELDNAME=RANDOM, ALIAS=random, USAGE=I11, ACTUAL=I4, MISSING=ON,
      TITLE='random', REFERENCE=CNT.RANDOM, PROPERTY=MEASURE,  $
    FIELDNAME=3_COLS_WITH_MIXTUREOF_FUNC, 
      ALIAS='3 cols with mixtureof FUNC', USAGE=D21.2, ACTUAL=D8,
      MISSING=ON, TITLE='3 cols with mixtureof FUNC',
      PROPERTY=MEASURE,  $
    FIELDNAME=ROUND_OF_ANOTHER_MEAS, ALIAS='round of another meas',
      USAGE=D21.2, ACTUAL=D8, MISSING=ON, TITLE='round of another meas',
      PROPERTY=MEASURE,  $
  SEGMENT=PRODUCT__CH_, SEGTYPE=U, PARENT=SALESCF, $
    FIELDNAME=PRODUCT_GROUP_ID, ALIAS=product_group_ID, USAGE=I11,
      ACTUAL=I4, MISSING=ON, TITLE='product_group_ID',
      WITHIN='*product (CH)', $
    FIELDNAME=PRODUCT_LINE_ID, ALIAS=product_line_ID, USAGE=I11, ACTUAL=I4,
      MISSING=ON, TITLE='product_line_ID', WITHIN=PRODUCT_GROUP_ID, $
    FIELDNAME=PRODUCT_LINE_NAME,
      ALIAS='12  product_line_ID   product_line_name', USAGE=A25V,
      ACTUAL=A25V, MISSING=ON, TITLE='product_line_name',
      REFERENCE=PRODUCT_LINE_ID, PROPERTY=CAPTION,  $
  SEGMENT=STORE__CH_, SEGTYPE=U, PARENT=SALESCF, $
    FIELDNAME=STORE_LOCATION_ID, ALIAS='**** store_location_ID_1',
      USAGE=I11, ACTUAL=I4, MISSING=ON, TITLE='store_location_ID',
      WITHIN='*store (CH)', $
    FIELDNAME=STORE_ADDRESS,
      ALIAS='store_location_ID_1   _store_address', USAGE=A25V,
      ACTUAL=A25V, MISSING=ON, TITLE='store address',
      REFERENCE=STORE_LOCATION_ID, PROPERTY=UDA,  $
    FIELDNAME=STORE_CITY, ALIAS='store_location_ID_1   _store_city',
      USAGE=A45, ACTUAL=A45, MISSING=ON, TITLE='store_city',
      REFERENCE=STORE_LOCATION_ID, PROPERTY=UDA,  $
    FIELDNAME=STORE_ID, ALIAS=store_ID, USAGE=I11, ACTUAL=I4, MISSING=ON,
      TITLE='store_ID',WITHIN=STORE_LOCATION_ID, $

WebFOCUS

Feedback