Examples of using OLAP Worksheet to define dimensions & facts

Hi - Does anybody have examples of how to use the olap worksheet to define dimensions & facts and then load them from database tables and views? The manuals are OK, but I feel like I'm feeling my way blindly and not sure if I'm doing it right. A good set of examples would do wonders to make me more confident that I can do what I want to do.
Using AWM is out of the question, unfortunately. It simply doesn't do what I want it to do for semi-additive measures (i.e. count distinct).
Thanks!

Two minutes make no difference.
We may say that we gave the response together.
This forum is not a race area
Yvan KOENIG (from FRANCE vendredi 15 mai 2009 11:00:18)

Similar Messages

  • How to use negation in user defined rules?

    Hi,
    Can you please show me an example to use negation in user defined rule? I created a rule like below (the rule says if a patient has a fever problem and not have penicillin hypersensitivity, then recommend medication1):
    INSERT INTO mdsys.semr_myMedicineRB VALUES('rule1',
    '(?p rdf:type :Patient) (?p :present ?c1) (?c1 rdf:type :Fever) (?c2 rdf:type :Penicillin_Hypersensitivity)',
    '(NOT_EXISTS(p :present c2))',
    '(?p :recommendation :medication1)',
    SEM_ALIASES(SEM_ALIAS('','http://www.example/medicine#')));
    The rule successfully inserted into the rulebase. However, I cannot pass the entailment creation phase and got the errors:
    ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    ORA-06512: at "MDSYS.SDO_SEM_INF_INTERNAL", line 16453
    ORA-06512: at "MDSYS.SDO_SEM_INFERENCE", line 302
    ORA-06512: at "MDSYS.SDO_SEM_INFERENCE", line 352
    ORA-06512: at "MDSYS.RDF_APIS", line 118
    ORA-06512: at line 2
    29532. 00000 -  "Java call terminated by uncaught Java exception: %s"
    *Cause:    A Java exception or error was signaled and could not be
               resolved by the Java code.
    *Action:   Modify Java code, if this behavior is not intended.
    According to the post built-in primitives(noValue,remove) for user defined rules, it seems negation is not supported in user defined rules. Can you please advice how to implement negation in user defined rules?  Thanks a lot in advance.
    Hong

    Hi Hong,
    Let's look at this similar but simplified problem:
      if (?p  rdf:type  :Patient) and (NOT_EXISTS(?p  :present  :c2)) ==> (?p :recommendation :medication1)
    You can use something like this in the user defined inferencing:
    -- First get the numeric IDs for the relevant URIs
    recomID := sdo_sem_inference.oracle_orardf_add_res('http://..../recommendation');
    medID := sdo_sem_inference.oracle_orardf_add_res('http://..../medication1')
    rdfTypeID := sdo_sem_inference.oracle_orardf_res2vid('... full URI for rdf:type');
    patientID := ...
    presentID := ...
    c2ID := ...
    -- Now this query will find out ?p that satisfy (?p  rdf:type  :Patient) but not
    -- (?p  :present  :c2)
    sqlStmt := '
      select ids1.sid  sub
         from ' || src_tab_view || ' ids1
        where ids1.pid= ' || to_char(rdfTypeID,'TM9') || '
          and not exists (
             select 1
               from ' || src_tab_view || '
              where sid = ids1.sid
                and pid = ' || to_char(presentID, 'TM9') || '
                and oid = '|| to_char(c2ID,'TM9') || '
    insertStmt := '
      insert /*+ parallel append */
       into ' || output_tab || '(sid, pid, oid)
      select sub, '||to_char(recomID,'TM9') || ',' || to_char(medID,'TM9') || '
       from (' || sqlStmt || ')'
    More details can be found in
    http://docs.oracle.com/cd/E16655_01/appdev.121/e17895/inference_extension.htm#CHDDBGEC
    Hope it helps,
    Zhe Wu

  • Can we define the objects (varibales, etc) in the OLAP Worksheet and use it

    Hi,
    I am using AWM 11g ( AWM 11.2.0.3 ). I am trying to build cube for financial data. I tried to define variables, relations in the express backend (rather OLAP worksheet) for refering it into OLAP expressions 9frontend measure. However, whenever I define some object and save it (upd command). I am not finding the same object at the next loging. Is there any way I can do this?
    Thanks,
    Sam

    You can define objects using the OLAP Worksheet. Make sure that you run "commit" after the "update".

  • Olap worksheet and sql commands

    Im trying to test some sql commands or better im playing with some cursor, but it does not metter what I do the lines get executed one at the time; and the part that is supossed to be translated as program just gives errors; even got an error that define is not a command.
    So I was wondering if anyone can give me a simple example of a "define sql.test program..." that contains a cursor.
    Thank you in advance

    You can execute some commands from the command line in OLAP worksheet (but do not check the SQL Mode option box in OLAP worksheet because that is something completely different). Commands that involve looping are obviously not allowed at the command line.
    The easiest way is to create a program and use the OLAP DML help and work through the examples listed. BUT - do not try to cut & paste the code from the examples into your program. For some reason, and I have no idea why, the code gets corrupted when copied, even you if you paste it into notepad first then into your program. As a result your programs will not compile or execute even though the code looks perfect.
    In fact if you cut & paste the code from the Help examples into Word and enable viewing of all hidden characters you will see a funny round circle at the start of each word. This is what causes the corruption and means nothing will compile.
    Best to just write the code into your program manually.
    Hope this helps
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • Defining Dimensions, Attribute Hierarchies for a Link Table(Many to Many)

    I have 3 Tables in the Database
    Table 1: Transactions (Fact Table) - PK(TransactionId)
    Table 2: Relationship (Dimension1) - PK(Relationship Id), FK_TransactionId, FK_CompanyId, RelationshipType
    Table 3: Companies (Dimension 2) - PK(CompanyId)
    Table 2: Relationship table is a link table between Transactions & Companies to facilitate many to many relationship. 
    I defined Fact and Dimension tables accordingly but having issues defining Dimension & Attributes for Relationship tables
    Relationship Dimension:
    I have 3 hierarchy groups defined
    Hierarchy 1 - Relation -Relationship Type,Relationship Id(PK)
    Hierarchy 2 - Transaction - Transaction, Relationship Id(PK)
    Hiearchy 3 - Company - CompanyId, Relationship Id(PK)
    Defined the attribute relationship in the following way
    RelationshipID(PK) ---> CompanyId , RelationshipID(PK) ---> TransactionId, RelationshipID(PK)
    ---> RelationshipTYpe
    I am getting incorrect results when I deploy the cube. Not all the types are being displayed only 4 types are being displayed out of 27 types though there exists Transactions for all the Types.
    To fix the incorrect results, I tried to break the Relationship Dimension into 2 dimensions seperating Transaction(Relationship Dim) & Company,Type (Companies Dim). I tried to configure a many
    to many Relationship type between my  Companies Dim & Fact Table Transaction. But I get the error that says 
    "Companies Dim many to many dimension in the Tansaction measure group requires that the granularity of the Relationship dimension is lower than that of the Relationship measure group "
    Any help regarding how to difine Dimensions & Attribute Hierarchies on a Many to many link table is appreciated.

    Hi Jaya,
    According to your description, you are experiencing the issue when implement many to many relationship by using a bridge table in your SQL Server Analysis Services project, right?
    Generally, a bridge table will have a surrogate key for the dimension and a surrogate key to the fact table or a degenerate dimension based on the fact table. Here are some blogs which describe how to implement many to many relationship using a bridge
    table.
    http://bifuture.blogspot.com/2011/06/ssaskimball-modeling-nm-relation.html
    http://www.sqlchick.com/entries/2012/1/22/data-modeling-tip-when-using-many-to-many-bridge-tables-in-s.html
    http://social.technet.microsoft.com/wiki/contents/articles/22202.a-practical-example-of-how-to-handle-simple-many-to-many-relationships-in-power-pivotssas-tabular-models.aspx
    Regards,
    Charlie Liao
    TechNet Community Support

  • Problem in drilling out to relational from OLAP worksheet

    Hi,
    I am using level based hierarchy for my dimensions and trying drill out to relation worksheet from OLAP worksheet.
    The problem I am facing is that the way OLAP stores data is always sufixed with the "_LEVELNAME". Now when passing parameters from OLAP we have two option (i) pass the label (ii) pass the value
    a) We cannot pass the value as the value will be appended with the _levelname. and will not match to the relational data.
    b) On the disco report it displays the long description which in our case is code_description value which is again not same data as stored in relational table.
    My question is how can I make the short description visible in the report? Excel addin has feature through which you can either show long or short description.
    Your help is much appreciated.
    Thanks
    Brijesh

    Issue resloved now.
    Thanks
    Brijesh

  • Olap worksheet copy and paste fails hard parse

    Hi
    i've noticed something strange in the AWM olap worksheet that may help anyone using it.
    when you copy and paste some code to be executed it fails with strange errors however if you then type the code it runs without problem.
    bizarrely if you copy and paste the code in again it works..
    shown below is the console: 1st is pasted, 2nd typed, 3rd pasted... had me bashing my head against the screen a few times before i worked out what was going on.
    ->ROW 'SMOOTHING' FCQUERY(fc smoothing trial loopindx)
    ERROR: (ORA-33776) ROW is not a command.
    ORA-33776: ROW is not a command.
    ->ROW 'SMOOTHING' FCQUERY(fc smoothing trial loopindx)
    SMOOTHING no
    ->ROW 'SMOOTHING' FCQUERY(fc smoothing trial loopindx)
    SMOOTHING no
    ->
    I assume this is a parsing problem (i'm cutting and pasting from notepad btw).
    Once typed and parsed properly it doesn't do a hard parse again perhaps.
    In any case watch out for it, especially when copying example programs from the help text :), you have to type them a la spectrum48k. (10 print 'start' .....;)

    If you are copying and pasting from the OLAP DML Help then this is a known issue. The DML Help contains hidden characters that stop the code from executing.
    Keith Laker
    Oracle EMEA Consulting
    BI Blog: http://oraclebi.blogspot.com/
    DM Blog: http://oracledmt.blogspot.com/
    BI on Oracle: http://www.oracle.com/bi/
    BI on OTN: http://www.oracle.com/technology/products/bi/
    BI Samples: http://www.oracle.com/technology/products/bi/samples/

  • How to pass parameter to a Discoverer Plus OLAP Worksheet??

    Hi,
    I have used discoverer plus OLAP and portal to develop executive dashboards in my company. I put my date dimension in Page Item of discoverer plus OLAP worksheet to view a specific week/month/year of analysis i.e. Jul-07.
    Now I have to open all the worksheets and change the page item value when week/month ends. If it was 'Jul-07' then I have to change it as 'Aug-07'.
    In discoverer plus OLAP we can't pass parameters as we can in discoverer relational.
    Can someone help me how I can set the new values without opening discoverer worksheets?
    Regards,
    Shahid

    Dear Shahid,
    I downloaded the Oracle Application Server SOA Suite 10.1.3.1.0. While installing It gave me two options
    1. Basic Install
    Install J2EE server and SOA suite of applications including BPEL, ESB
    and OWSM.
    2. Advance Install (This gives 4 options)
    a. J2EE Server, Web Server and SOA suite
    b. J2EE Server and Web Server
    c. J2EE Server
    d. Web Server\
    According to your instructions I need to install it as Insfrastructure, BI and portal. Now can you tell me which option of the install I should select in order to meet the requirements of Infrastructure, BI and Portal.
    Because I am very new in this technology so If you can guide to me to get started at least then I can follow the Oracle Tutorial for further training.
    Thanks very much in this regards.
    __Asif

  • How to use the Table Function defined  in package in OWB?

    Hi,
    I defined a table function in a package. I am trying to use that in owb using Table function operator. But I came to know that, owb R1 supports only standalone table functions.
    Is there any other way to use the table function defined in a package. As like we create synonyms for functions, is there any other way to do this.
    I tryed to create synonyms, it is created. But it is showing compilation error. Finally I found that, we can't create synonyms for functions which are defined in packages.
    Any one can explain it, how to resolve this problem.
    Thank you,
    Regards
    Gowtham Sen.

    Hi Marcos,
    Thank you for reply.
    OWB R1 supports stand alone table functions. Here what I mean is, the table fucntion which is not inculded in any package is a stand alone table function.
    for example say sample_tbl_fn is a table function. It is defined as a function.It is a stand alone function. We call this fucntion as "samp_tbl_fn()";
    For exampe say sample_pkg is a package. say a function is defined in a package.
    then we call that function as sample_pkg.functionname(); This is not a stand alone function.
    I hope you understand it.
    owb supports stand alone functions.
    Here I would like to know, is there any other way to use the functions which are defined in package. While I am trying to use those functions (which are defined in package -- giving the name as packagename.functionname) it is throwing an error "Invalid object name."
    Here I would like know, is there any other way to use the table functions which are defined in a package.
    Thank you,
    Regards,
    Gowtham Sen.

  • How to find which all workbook is using Database function ( User Defined)

    Hi All,
    Is it possible to find out which all workbook is using Database function( User Defined).
    Thanks,

    Hi,
    If I had to do this detective work, I would probably do the following:
    1. Activate for a period of time the function, eul5_post_save_document. This function when activated is triggered at the time a workbook is saved. If you look at its columns, it save the worksheet's SQL.
    2. Next, I would parse the EUL5_WORKSHEET_SQL.SQL_SEGMENT column which is a varchar2(4000) column. There are many effective Oracle functions which could aid you in this effort (e.g. instring or perhaps a regular expression function).
    I hope this helps.
    Patrick

  • I want to use variation funtion without define the characteristic...

    Dear.
    I want to use variation funtion without define the characteristic into general data selection in making report painter.
    Finally hopeful thing is, The extract data which contain that characteristic group should be used in the whole sub-hierarchy
    automatically such as I did that in general data selection.
    For example, supposing the profit center group A is composed like below,
       A
      └─ B
    └─ C
    .....└─ D
    When I make report painter, if the profit center positioned in lead column not general data,
    I can't use variation funtion in profit center. So, I must save extract data each profit center group manually. (A,B,C,D..)
    It is so uncomfortalble.(Guess the profit center group composed over hundreds.)
    You know, the profit center located in general data, I just need to extract data only once in A. Then B,C,D also saved automatically.
    Why can't do this in former case ? If possible, please let me know.

    Replace af with h.
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <%@ page contentType="text/html;charset=UTF-8"%>
    <%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
    <%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
    <f:view>
    <h:messages id="m1"/>
    <h:form id="f1">
    <h:outputText value="#{inputValue}" id="ot1"/>
    </h:form>
    </f:view>

  • Creating KPI using OLAP DML

    Hi all,
    How do we develop KPI (Key Performance Indicators) using OLAP DML in AWM 10g R2 (Analytical Workspace Manager)? I am new to this tool. Can anybody help me with a sample code. If there is any other way of implementing KPI in Oracle BI, kindly quote that example as well.
    Kieth, if you can answer my question and give me a sample OLAP DML code, i will be more than happy.
    Thanks in advance

    In 10g this is not quite as simple as 11g. To create a custom measure that calls an OLAP DML program you need to either:
    1) Download the Excel Utility from the OLAP home page on OTN:
    http://download.oracle.com/otn/java/olap/SpreadsheetCalcs_10203.zip
    but check the readme first:
    http://www.oracle.com/technology/products/bi/olap/OLAP_SpreadsheetCalcs.html
    or
    2) Use Warehouse Builder to manage your AWs. OWB allows you to automatically create custom calculations that call OLAP DML programs.
    If you look at this posting on the Oracle OLAP Blog you will find an example of how to create an OLAP DML program and reference it from a calculated measure:
    http://oracleolap.blogspot.com/2008/03/creating-calculated-measure-cube.html
    Keith Laker
    Oracle EMEA Consulting
    OLAP Blog: http://oracleOLAP.blogspot.com/
    OLAP Wiki: http://wiki.oracle.com/page/Oracle+OLAP+Option
    DM Blog: http://oracledmt.blogspot.com/
    OWB Blog : http://blogs.oracle.com/warehousebuilder/
    OWB Wiki : http://wiki.oracle.com/page/Oracle+Warehouse+Builder
    DW on OTN : http://www.oracle.com/technology/products/bi/db/11g/index.html

  • Facing problem in loading table using IKM Oracle Slowly Changing Dimension

    Hi,
    I am facing problem in loading dimension table using IKM Oracle Slowly Changing Dimension
    Following is the setup :-
    SRC :- source_table (MSSQL)
    Staging :- staging_table (MSSQL)
    TRGT :- target_table (Oracle)
    -------- source_table
    group_id     int
    group_version_id     int
    name     varchar (255)
    description     varchar (255)
    comments     varchar (2000)
    ref_number     varchar (255)
    is_latest_version     decimal (5)
    is_deleted     decimal (5)
    --------- target_table
    id     number (38,0) - Mapped to <%=odiRef.getObjectName( "L" , "SEQ_NAME" , "D" )%>.nextval
              - Executed on target
              - defined the column as SK in model
    group_id     number (38,0) - defined the column as NK in model     
    group_version_id     number (38,0) - defined the column as NK in model     
    name     varchar (255) - undefined on the model description
    description     varchar (255) - Add row on change
    comments     varchar (2000) - Add row on change
    ref_number     varchar (255) - Add row on change
    is_latest_version     number (1,0) - Add row on change
    is_deleted     number (1,0) - Add row on change
    start_datetime     date     - SYSDATE
                   - Executed on target
                   - Starting Timestamp
    end_datetime     date     - NULL
                   - Executed on target
                   - End Timestamp
    I am using following KM's:-
         LKM SQL to SQL
         IKM Oracle Slowly Changing Dimension
         CKM SQL
    it gives me the following error -
    920:Invalid relational operator

    Hi,
    Yes, this is a run-time error. Currently I am debugging it by checking SNP_SESS_TXT_LOG based on sess_no ID.
    Now, I get the following error.
    I just see the following in the operator:-
    911 : 42000 : java.sql.BatchUpdateException: ORA-00911: invalid character
    911 : 42000 : java.sql.SQLException: ORA-00911: invalid character
    java.sql.BatchUpdateException: ORA-00911: invalid character
         at oracle.jdbc.driver.DatabaseError.throwBatchUpdateException(DatabaseError.java:342)
         at oracle.jdbc.driver.OraclePreparedStatement.executeBatch(OraclePreparedStatement.java:10720)
         at com.sunopsis.sql.SnpsQuery.executeBatch(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    So, I do not get any idea of the exact step that is causing failure.
    Is there any setting in the operator that I am missing on?

  • PROMPT(SELECTINPUT, ...) and user defined dimensions

    Hi,
    I created a custom package that should enable the user to select members of  the TIME, Account and Category dimensions and also members of some user defined dimension called "Costcent". After that, a scriptlogic file should be called.
    I tried:
    1)
    PROMPT(SELECTINPUT, ... %TIME_DIM%%ACCOUNT_DIM%%CATEGORY_DIM%"Costcenter")
    which doesn't work, bc. compiler doesnt seem to like %var%"fixedexpression"
    2)
    PROMPT(SELECTINPUT, ... "Costcenter")
    PROMPT(SELECTINPUT, ... %TIME_DIM%%ACCOUNT_DIM%%CATEGORY_DIM%)
    running the package only allows to select a costcenter, 2nd prompt ignored?
    3) similar, the other way round.
    Any ideas?
    Moreover, I need to be able to access the selection of the Costcenter members in the script logic. For the std. dimensions, there is %TIME_SET%, %CATEGORY_SET% etc.I am using successfully, but how to define or access the set (or list) for the selected members of user-def. "CostCent" dimension ?
    Thanks for your help!

    Clear Bug: Using the DataManager to modify the .dtsx file sometimes modifies the prompt lines in an unpredictable way... So the file that is safed doesn't get the content it is intended to get... - Guess "this should never happen", but it is...

  • Numbers assigned to user defined dimensions

    Dear Experts
    I have created application set from APPSHELL and created three user defined dimensions viz., A, B and C
    Then removed all not required dimensions including 'P_ACTIVITY' which was a User defined dimension.
    System has assigned numbers as U4, U8 and U9 to these dimensions on its own (I do not know what is the logic system is following to assign numbers to these dimensions)
    Questions:
    1. What is the logic system is following for assignment of the numbers to User defined dimensions?
    2. Can I change these numbers to U1, U2 and U3 (for ease in ad-hoc reporting). If YES how can I do that?
    Thanks

    Hi,
    The userdefined dimensions are named Sequentially as they are created and these are not constant for them, the same dimension may have different names in different applications.
    Also the user defined dimensions are named as Ua to Ux in NW.
    For example, in App1 some dimension X may be named as Uc, the same dimension X in App2 may be named as Ud or some other.
    We need to manually work betweeen "a to x" with the below macro to find the exact name for the user defined dimension in the application.
    "MNU_eTOOLS_MEMBERSELECTOR_X"
    Eg:
    MNU_eTOOLS_MEMBERSELECTOR_Ua
    Also as suggested in earlier replies i dont think this naming can be changed.
    Hope this helps,
    Regards,
    G.Vijaya Kumar

Maybe you are looking for

  • Update Z-Field in EKPO with BAPI_PO_CHANGE

    Hello! I need to update my field - called ZSERNR - in the table EKPO. I found the FM BAPI_PO_CHANGE, but I do not know how it works. I tried it so, but I just get the message (table RETURN), that no datas got changed. I found some threads but I didn'

  • No save option available

    I just purchased a new computer with Windows 7 OS.  Adobe Reader came preinstalled.  I can view files that are in a pdf format, but I cannot save a pdf to the computer.  The save icon is not present, and save is not an option when I right click.  I c

  • Ibook G3 doesn't recognize HDD

    I dropped my computer few weeks ago. Since then my ibook doesn't recognize hdd. It works only on starting up sounds and just shows grey display and question marked folder and apple logo. I tried to reinstall osx again with installation cd. It was pro

  • Ungodly slow down load

    I am downloading an 1.64gb movie and it is saying 34 hours to download i can get 15mbs on steam why not itunes any ideas on how to fix it, it is a collage connection so no router should be direct line.

  • Itunes freezes, runs super slow

    I had been away for some time, so had missed several updates. Therefore I don't know at what point some of these issues might have arose, all I know is that they are all here now. I recently updated Itunes to 12.0.1.26 and I am absolutely miserable w