This discussion is archived
1 Reply Latest reply: Nov 22, 2012 9:11 AM by Nasar RSS

Creating a DWMQY DIMENSION using Analytic Workspace Manager

975217 Newbie
Currently Being Moderated
Hi everyone,

I need some help creating a "time aware" (DAY, WEEK, MONTH, QUARTER, and YEAR) dimension using Analytic Workspace Manager.

Let me give you some background. I'm coming from a traditional "Oracle Express" OLAP background where all our data is stored in cubes and these are defined, populated and operated on using OLAP DML, there is no SQL or traditional relational tables involved.
I now want to pull data from relational tables into some OLAP cubes and am using Analytic Workspace Manager to do this (maybe this is not the best way?)

Let me explain what I'm trying to achieve. In OLAP worksheet I can type the following DML commands:

DEFINE MY_DAY DIMENSION DAY
MAINTAIN MY_DAY ADD TODAY '01JAN2011'

What this will do is create a "day dimension" and will populate it with values for each and every day between 1st Jan 2011 and today. It will be fully "time aware" and thus you can use date functions such as DAYOF to limit the MY_DAY dimension to all the Fridays etc. Similarly if I define a "month dimension" there will be an automatic implicit relationship between these two dimensions, this relationship and time aware cleverness is built into Oracle.

However, a dimension defined using DML commands (and indeed all objects created using DML language) is not visible in Analytic Workspace Manager (as there is no metadata for them?) and for the life of me I cannot work out how to create such a dimension using AWM. If I create a "Time Dimension" then, as far as I can tell, this is not a proper time dimension but merely a text dimension and I, presume, I have to teach it time awareness.

Can anyone help me? I have no issues creating, and populating cubes from relational tables using Analytic Workspace Manager, the only issue I have is creating a "proper" time aware dimension.

Many thanks in anticipation.

Ian.
  • 1. Re: Creating a DWMQY DIMENSION using Analytic Workspace Manager
    Nasar Journeyer
    Currently Being Moderated
    When a dimension is of type "TIME" in AWM, then for each member of that dimension, you need END_DATE and TIMESPAN attributes in addition to the key column and description column.

    So in your case, if there are 5 levels: DAY->WEEK->MONTH->QTR->YEAR
    then you will need atleast 15 columns in your source sql table/view
    or 20 columns if you have separate column for description.

    For example the columns in your source table/view could be:
    DAY_ID,
    DAY_DESC,
    DAY_END_DATE, (which will be that day's date)
    DAY_TIMESPAN, (which will be 1)
    WEEK_ID,
    WEEK_DESC,
    WEEK_END_DATE,
    WEEK_TIMESPAN,
    MONTH_ID,
    MONTH_DESC,
    MONTH_END_DATE,
    MONTH_TIMESPAN,
    QTR_ID,
    QTR_DESC,
    QTR_END_DATE,
    QTR_TIMESPAN,
    YEAR_ID,
    YEAR_DESC,
    YEAR_END_DATE,
    YEAR_TIMESPAN


    Just "map" this table/view to the 5-level time dimension in AWM.


    NOTE that behind-the-scenes lot of useful structures are automatically defined to support time-series measures,
    and there are lot of calculation templates available also.

    Since you came from Express background, I have to say that try to use new OLAP Expression Syntax when creating calculated measures instead of OLAP DML.
    Its very rare these days that we need OLAP DML.

    Edited by: Nasar on Nov 22, 2012 12:11 PM

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points