Olap question

hi all,
whenver i execute the below query in olap(excel 2007), it gives error "sql command not ended properly"
i am completely new to olap,:( and i have to generate a report based on this
Private Sub Calendar1_Click()
End Sub
Private Sub Calendar2_Click()
Sql = "   SELECT employee_number,act_hour,floor(tot/60)||':'||mod(tot,60) tothours  FROM (SELECT employee_number,   "
Sql = Sql & "    act_hour   ,  "
Sql = Sql & "  SUM(to_number(regexp_substr(act_hour,'[^:]+',1,1))*60+to_number(regexp_substr(act_hour,'[^:]+',1,2))) over (partition BY employee_number) tot "
Sql = Sql & " FROM nap_PUNCH_DATA_EMP_LIST trn  WHERE DATE_ENTRAY between '23-AUG-2009' and  '24-AUG-2009');"
Sql = Sql & "and   DATE_ENTRAY between '%1' and  '%2' "
Sql = Replace(Sql, "%1", Format(Calendar1.Value, "DD-MMM-YYYY"))
Sql = Replace(Sql, "%2", Format(Calendar2.Value, "DD-MMM-YYYY"))
ActiveSheet.PivotTables(1).PivotCache.CommandText = Sql
Range("B16").Select
ActiveWorkbook.ShowPivotTableFieldList = False
End Subthanking in advance ,any help will be appreciated,please let me know if i have to post more details on this
regards
oracle user

Remove semicolon (;)
And you'll get another error:
This is your query:
SELECT employee_number, act_hour, floor(tot/60)||':'||mod(tot,60) tothours 
  FROM (
    SELECT employee_number, act_hour, SUM(
                                        to_number(
                                              regexp_substr(act_hour,'[^:]+',1,1)
                                                  )*60 +
                                        to_number(
                                              regexp_substr(act_hour,'[^:]+',1,2)
                                         ) over (partition BY employee_number) tot
      FROM nap_PUNCH_DATA_EMP_LIST trn 
     WHERE DATE_ENTRAY between '23-AUG-2009' and  '24-AUG-2009')
and   DATE_ENTRAY between '%1' and  '%2' In the last row you should replace AND with WHERE...
Max
[My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/02/query-gerarchiche/]
Edited by: Massimo Ruocchio on Jan 5, 2010 10:17 AM
Added next error

Similar Messages

  • Discussions relating to MDX and other Analysis Services or OLAP questions

    In my Analysis services i have DimGeography, DimCustomer, DimDate dimemsions and Sales measure group. 
    By using above cube i have created SSRS report for the Area wise sales. 
    DimGeography will contains the region values.(East, West, North, Souuth,.....)
    DimGeography will contains the Customers details.
    Now the the requirment is for few customers we have to devide the Region wise sales based on customers. 
    For example 
    in case of Customer_1, the sales will be 10% East, 30% West, 25% Notrth, 35% South..  
    in case of Customer_2, the sales will be 15% East, 40% West, 20% Notrth, 55% South..
    in case of Customer_n, the sales will be 30% East, 30% West, 25% Notrth, 15% South..
    The above persentage values will change for every quarter. We will generate report as per new values only. We are not considering old values. We will store these values in Table and will update every quarter These table not having in Cubes.
    Can you please suggest me how to impliment this logic in Report.
    Sudhan

    Thank you both for your comments, I had previous discussed this & the issue with the wrist strap, I'll have to find those comments & repost as advised by nokia support.
    So the sensor isn't idea, the inner ear canal exists unfortunately the sensor cannot deal with it when the sensor goes over the ear under those circumstances. I'll have to repost those comments soon.
    I'll have to check out Slide Answer to see if it helps, thanks.
    Remember, Questions and Answers are required by this Nokia support board. It's very strict, don't complain, criticise or express opinions which does not answer question or your post could be deleted. My friendly warning.

  • Oracle 10g olap cube connectivity issue using Crystal Reports 2008

    Hi
    Kindly help me out with a solution. I have created a cube in oracle 10gR2 database using Oracle Analytic Workspace Manager. I am trying to connect to this cube using Crystal report Olap datasorces. But I am only getting 4 options to connect to Hyperion Essbase, HOLOS Cube, Microsoft OLEDB, Microsoft OLAP Analysis Services 8.0 and 9.0.  I am not getting any option for connection to Oracle OLAP. How do I do that or if it does not support kindly let me know.
    Thanks in advance
    Troyee

    Hi Troyee,
    I have discussed the issue with OLAP engineer and he told me that connectivity to OLAP cube is not supported.
    and please next time address OLAP questions to the following category:
    Expert Forums » Business Objects » Other Business Objects Products
    (see the relevant category description)
    Vitaly Izmaylov
    Crystal Reports Design forum moderator

  • Is there a spreadsheet add-in 9i OLAP

    Is there a spreadsheet add-in available to access OLAP cubes for the 9i database. Oracle Express has a spreadsheet add-in that allows ad hoc queries. Is there something similar for the new 9i OLAP option?

    Dear Nathan,
    Regarding to OLAP question, you should post your question to OLAP forum @ OLAP
    Thanks
    KK

  • Let end user to set up the query

    Hi all!
    Is there a way to let end user to set up a query/report with forms?
    = users can use a form (whit predefined values) to determine which column(s) shows in the result and can add filters before submit.
    Because a cube is stored in relational tables i think it's not an olap question.
    But here is why i asked this:
    I make an application that query an olap cube. I can make reports with apex from the cube view and from dimension views. But i want to let users to select from the available dimensons and measures and set filters on selected dimensions (on first page) using a form. When user submit the form the second page shows the result.
    Thanks
    Edited by: qenchi on 2009.08.09. 7:27

    Hi,
    This is what I've done in that application example.
    1 - I have two pages. Page 1 is the select columns and filters page and Page 2 is the report
    2 - On page 1, I have created a PL/SQL page process, called P1_CREATE_COLLECTION, that runs "Before Header". This is unconditional and has a Source Process of:
    BEGIN
    IF NOT APEX_COLLECTION.COLLECTION_EXISTS('FILTERING') THEN
      APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY('FILTERING', 'SELECT COLUMN_NAME, DATA_TYPE, ''Y'' SHOW_YN, '''' FILTER FROM ALL_TAB_COLUMNS WHERE OWNER = ''#OWNER#'' AND TABLE_NAME = ''EMP3'' ORDER BY COLUMN_ID');
    END IF;
    END;ALL_TAB_COLUMNS contains records for all columns in all tables. In this example, I'm retrieving a list of all of the columns in the EMP3 table (which is just a copy of EMP plus a few extra fields). I'm also getting the data type for the column, setting the "Show" value to Y and starting with an empty filter string for each column. The actual data is retrieved into a collection called FILTERING. In this way, I can store all of the user's selections for use on Page 2. The IF test just ensures that I don't overwrite the collection if it already exists - that is so that I can keep any settings that the user made when they were last on Page 1.
    This collection gives allows me to store the following:
    SEQ_ID - the collection's sequence ID
    C001 - The COLUMN_NAME
    C002 - The DATA_TYPE
    C003 - The Y/N flag for SHOW_IN_REPORT
    C004 - The filter to be applied to the column
    3 - I created a "SQL Query (updateable report)" report. To do this you need to create a report using the SQL Wizard - any SQL statement will do - then you can change the report type from "SQL Query" to "SQL Query (updateable report)". I haven't found another way to do this.
    The report's SQL was changed to:
    SELECT APEX_ITEM.HIDDEN(1, SEQ_ID) || C001 COLUMN_NAME,
    C002 DATA_TYPE,
    APEX_ITEM.SELECT_LIST(3, C003, 'Yes;Y,No;N') SHOW_IN_REPORT,
    APEX_ITEM.TEXT(4, C004) FILTER
    FROM APEX_COLLECTIONS
    WHERE COLLECTION_NAME = 'FILTERING'
    ORDER BY SEQ_IDThis is a "manual tabular form" and is based on the collection created by my process.
    4 - I then created a button on the page called P1_CREATE_REPORT. This is just a normal submit button - the branch for this is to Page 2. On the branch, I ticked the option to "reset pagination for this page"
    5 - Finally, on Page 1, I created a PL/SQL process, triggered by my button, and in the "On Submit - After Computations and Validations" process point. The Process code for this is:
    BEGIN
    FOR x IN 1..APEX_APPLICATION.G_F01.COUNT
    LOOP
    APEX_COLLECTION.UPDATE_MEMBER_ATTRIBUTE(p_collection_name=>'FILTERING', p_seq=>APEX_APPLICATION.G_F01(x), p_attr_number=>3, p_attr_value=>APEX_APPLICATION.G_F03(x));
    APEX_COLLECTION.UPDATE_MEMBER_ATTRIBUTE(p_collection_name=>'FILTERING', p_seq=>APEX_APPLICATION.G_F01(x), p_attr_number=>4, p_attr_value=>APEX_APPLICATION.G_F04(x));
    END LOOP;
    END;This loops through the tabular form after it is submitted and updates the collection with the Y/N Show values and the filters
    Now onto Page 2
    1 - I created a SQL Query report using *SELECT 1 FROM DUAL".  When created, I changed the report type to "SQL Query (PL/SQL function body returning SQL query)" and change the Region Source to the following code:
    DECLARE
    vSQL VARCHAR2(8000);
    vQ CHAR(1);
    vSEP1 VARCHAR2(2);
    vSEP2 VARCHAR2(6);
    BEGIN
    vQ := CHR(39);
    vSEP1 := '';
    vSEP2 := 'WHERE ';
    vSQL := 'SELECT ';
    FOR x IN (SELECT SEQ_ID, C001, C002, C003, C004 FROM APEX_COLLECTIONS WHERE COLLECTION_NAME = 'FILTERING' ORDER BY SEQ_ID)
    LOOP
      IF x.C003 = 'Y' THEN
       vSQL := vSQL || vSEP1 || x.C001;
       vSEP1 := ', ';
      END IF;
    END LOOP;
    vSQL := vSQL || ' FROM EMP3 ';
    FOR x IN (SELECT SEQ_ID, C001, C002, C003, C004 FROM APEX_COLLECTIONS WHERE COLLECTION_NAME = 'FILTERING' ORDER BY SEQ_ID)
    LOOP
      IF LENGTH(x.C004) > 0 THEN
       IF x.C002 = 'VARCHAR2' THEN
        vSQL := vSQL || vSEP2 || x.C001 || '=' || vQ || x.C004 || vQ;
       ELSIF x.C002 = 'DATE' THEN
        vSQL := vSQL || vSEP2 || x.C001 || '=TO_DATE(' || vQ || x.C004 || vQ || ',' || vQ || 'DD/MM/YYYY' || vQ || ')';
       ELSE
        vSQL := vSQL || vSEP2 || x.C001 || '=' || x.C004;
       END IF;
       vSEP2 := 'AND ';
      END IF;
    END LOOP;
    RETURN vSQL;
    END;This loops through the FILTERING collection twice. The first time to build up a SQL SELECT statement containing all of the columns in EMP3 that the user wants to show
    The second loop then builds up a WHERE clause for the statement based on any filters the user wants to apply. I have used the DATA_TYPE values stored in the C004 field to identify the format of the value in the WHERE clause - either VARCHAR2, which puts the string in quotes, DATE, which casts the string as a date using DD/MM/YYYY format and then any other value (which should be NUMBER), which just outputs the value entered.
    Note that I've used vQ to hold the quote character (CHR(39)) as I find this easier than trying to work out how many single, double or triple quotes I need to get quotes within the string.
    All of this just builds up a string (vSQL) which is returned to Apex at the end of the code so that it can build the report.
    Note that I have also ticked the option under the Region Source setting to show "Use Generic Column Names (parse query at runtime only)". This needs to be done as the columns are changeable.
    2 - I created a button called P2_BACK_BUTTON which branches back to Page 1
    Obviously, this is a very basic example. You could, for instance, go one step further and allow the user to pick the table (SELECT TABLE_NAME FROM ALL_TABLES) or view (SELECT VIEW_NAME FROM ALL_VIEWS). As the final report is being constructed as a string, it doesn't matter how the table/view name is derived. You could also add popups for calendars and calculators, where appropriate, on Page 1.
    Andy

  • OLAP design questions

    We are planning on using Olap 9.2.0.6.0 against a 9.2.0.6.0 EE database.
    We have a Fact table with the following structure (let's call it the "deep" structure):
         D1_KEY (dimension 1 key)
         D2_KEY (dimension 2 key)
         D3_KEY (dimension 3 key)
         VALUE (fact value)
    The desired structure for end user querying is (let's call it the "wide" structure):
         D1_KEY
         D2_KEY
         VALUE_FOR_D3_VALUE1
         VALUE_FOR_D3_VALUE2
         VALUE_FOR_D3_VALUE3
         VALUE_FOR_D3_VALUEn
    We are able to create the wide structure for a reasonable number of values of D3. But, as D3 values become more (more than 500, more than 1000), it may not be practical to build the wide table. We are aware we could do this with dynamically built SQL statements, but the performance of "sum(decode(" statements suffers when you have a huge number of D3 values to do it on, and also, users would like to perform further calculations once data is available in the "wide" format, not to mention we're limited by the max number of columns in an Oracle database table (1000). We are hoping OLAP will help in this situation.
    The requirement is: let users choose what D3 values they would like to report on (5/100/1000), and the report is delivered in a wide format (one column for each D3 value).
    So, given this requirement, and a fact table with the "deep" structure, (and also given that I am fairly new to OLAP!), I have the following questions:
    (1) where do I start - I mean, can I create a cube with the D1, D2, D3, and the VALUE and then create a "wide" format in the cube? What are the main steps for doing that?
    (2) is OLAP still going to use the "sum(decode(" functionality to "widen" the data from the "deep" structure? If so, what is the performance impact if the number of values for D3 is in the range of 2000?
    Based on the answers from the experts, I am sure I will have some follow-up questions. Thanks for your time.

    Hi,
    When I first read this I thought you were trying to create a table based on the Query requirements. The fact table you have now will create a nice OLAP Analytic Workspace Cube which can render the correct report with a command such as:
    report down D1_KEY, D2_KEY across: D3_KEY VALUE
    You'll still get a report with one column for each value even if you select a large number of D3 members. This is also possible with Oracle Discoverer (OLAP), the OLAP Spreadsheet Add-In Tool, and likely Oracle Reports or other third party tools.
    Is OLAP still going to use the "sum(decode(" functionality to "widen" the data from the "deep" structure? - Actually when you load up the analytic workspace you can define the aggregation type, calc-on-the-fly or stored, or a combination of both. So performance will depend on how much needs to be calculated at query time.
    Hope this helps,
    Bill

  • Newbie question: Binding very large strings ( 4k) to OLAP query

    Hi there guys
    I am using Oracle 10.2 and I am trying to bind string variables to olap literals in my query string:
    SELECT TRUNC(IND-TO_DATE('01011900','ddmmyyyy')+2),VAL1
                   FROM (
                        SELECT *
                        FROM TABLE(
                             OLAP_TABLE(
                                  'OLAPFAME.MAG_CRD DURATION SESSION',
                                  :1 ))
                             MODEL
                                  DIMENSION BY(IND)
                                  MEASURES(VAL1,R2C1)
                                  RULES UPDATE SEQUENTIAL ORDER())
                   WHERE OLAP_CONDITION( R2C1, :2, 1 )=1
    I try and setString() to params 1 and 2, but it doesnt seem to work. The reason I am trying this is because when I pass large (>4K) DML string literals inline, I get ORA-01704. Hence me trying to bind to the variables via prepared statements (not even sure if this will get me past this 4k problem)!
    I have also read that I can store these large strings in variables and use those as a OLAP DML string via the ampersand syntax (not sure how to do this, ensuring that they would just have statement scope).
    Sorry if this is obtuse, but I'm at my wits end after a long days "trying stuff" :(
    Thanks in advance
    Adam

    Once again, I answer my own question. -_-;;
    The second process (fetch_comments) seems to be unnecessary. The Automated Row Fetch seems to be able to handle the 32K by itself. I'm still curious why the second process didn't work though....

  • OLAP Universe creation process questions and proposals

    We have created an OLAP universe based on a BW-Query. The automatical creation of the OLAP universe does not produce a satisfying result.
    We are working with the latest available releases (BOE XI 3.1 SP2 and SAP Integration KIT SP2, SAP BI 7 EHP1).
    We have detected that all dimension objects store the name instead of the key field.
    Example:
    Customer Dimension Object (L01 Customer) = Customer Name
    Customer Key Detail Object (L01 Customer Key) = Customer Number
    Customer Name Detail Object (L01 Customer Name) = Customer Name
    This is not usable for end user because of the following reasons:
    1. The detail objects can not be used for merge dimensions, so it is not possible to merge on the supplier number.
    2. If you filter on the dimension object you will only see the text in the list of values (LOV) and it is not possible to edit the list of values in the universe to add the supplier number to the LOV as it is possible in relational universes
    3. If the user select the detail object always the dimension object in inserted into the report query
    4. The "Business Explorer" general setting "Display" of an InfoObject has no effect on the OLAP universe dimension object. If you change it to key always the text is shown. Even if you change the "ValueDisplay as" in the underlying BW Query to "key" is has no effect.
    5. The renaming of the L01 object to blank is not possible. You need to rename to " " and then remove on each object the blank.
    So we need to modify manually every universe to change the "detail key object" to a "dimension object" and the "detail name object" to reference the new "dimension object" with the key. This manual process has a huge work effort in time. Is there a better solution or enhancements planned in the next releases?
    Additionally there should be an option to disable the automatic creation of each characteristic as a subclass in the universe. A wizard should ask if a subclass should be created or not for each characteristic. Currently there are to many subclasses generated which were mostly not needed.

    Hi,
    First of all I would say u are lucky to start with SP2. Because whatever modifications you do in Universe those are retained.
    We had a big trouble in using BOXIR3.1 FP1.7.
    Anyways.. Back to your Questions and My asnwers for those:
    1. The detail objects can not be used for merge dimensions, so it is not possible to merge on the supplier number.
    Ans: True, Dimension object always shows Short text values by default. but if you can create the logic at SAP BI query level to map short text with keys then your problem will be solved.
    2. If you filter on the dimension object you will only see the text in the list of values (LOV) and it is not possible to edit the list of values in the universe to add the supplier number to the LOV as it is possible in relational universes.
    Ans: True u cannt edit LOV, but alternate solution to it is create the variable in SAP BI Query, that will appear as prompt in universe which will display the List of values with Key as well as Description.
    3. If the user select the detail object always the dimension object in inserted into the report query.
    Ans: Logically its correct, because Detail object is always associated with Dimension. Buit if you dont want that dimension in query you can remove that dimension by dragging back.
    4. The "Business Explorer" general setting "Display" of an InfoObject has no effect on the OLAP universe dimension object. If you change it to key always the text is shown. Even if you change the "ValueDisplay as" in the underlying BW Query to "key" is has no effect.
    Ans: In Query designer even if you ValueDisplay as "Key", but at Object level  if there is Text and Key associated for perticulat Infoobject, then so by default the dimension will show the Text and there will be seperate Detail object in universe for Key.
    5. The renaming of the L01 object to blank is not possible. You need to rename to " " and then remove on each object the blank.
    Ans: Yes this is a big trouble.
    Regards,
    Nisha

  • OLAP DML question

    Hello,
    I have a question on OLAP DML. Please consider the following example (this is from the sample PERMIT_READ from the supplied global schema). It is an sql import statement which is supposed to be faster than a fetch loop.
    sql import c1 into -
    :_item -
    :_family -
    :_class -
    :_totprod then <product_isvisible (product _item) =  true -
    product_isvisible (product _family) =  true -
    product_isvisible (product _class) =  true -
    product_isvisible (product _totprod) =  true -
    >
    The assumption here is that the cursot c1 has been defined earlier that selects some relational table in four variables.
    The statement then assigns isvisible attribute with true for the different members of product dimension.
    Now here - if the any of the variables (_item, family, class or _totprod) have fetched a value that does not find a match in the dimension I get the following error -
    ERROR: (MXXEQ35) %a %k %j
    %1p is not a valid %2p.
    ERROR: (ORA-34370) Permission to attach analytic workspace GLOBAL.GLOBAL denied by a PERMIT program.
    How can I ignore such errors? and continue with the import execution? If possible, i do not want to use fetch loop.
    THanks.
    pxsheth.

    Here's the full text of the PERMIT_READ program. I added the MATCHSKIPERR but I still get the same errors. I am actually dealing with different dimension here. But that should not matter for the sake of this discussion.
    "* This program scopes the available business_unit dimension members.
    "* This program is called automatically whenever this AW has been attached read-only,
    "* regardless of the mechanism (thru SQL,Discoverer, Spreadsheet Addin, third parties, etc.)
    "* Fine grained access control has been applied to the gc_sec_bu_opr view.
    "* This program reads this table
    "* to determine the business_units and nodes that should be visible to the user
    vrb _bu text
    trap on error
    oknullstatus = yes
    permiterror = no "Do not throw error when attempting to access scoped data
    limit bu to all
    bu_isvisible = NA
    SQL DECLARE c1 CURSOR FOR -
    select business_unit -
    from gcdemo.gc_sec_bu_opr
    sql open c1
    if sqlcode ne 0
    then show sqlerrm
    sql begin
    sql import c1 into -
    :MATCHSKIPERR bu then <buisvisible (bu _bu) =  true>
    sql exception
    sql when others then
    sql null
    sql end
    if sqlcode eq -1
    then show sqlerrm
    SQL close c1
    SQL CLEANUP
    cns bu
    permit read when nafill(bu_isvisible, no)
    alldone:
    return true
    error:
    return false
    "****************************************************************************************

  • R KIMBALL & OLAP DML QUESTIONS

    Hi. I'm a OLAP DML student and like a lot of you (i guess it) i have read Ralph kimbal Books, specifically "The Data Warehouse Lifecycle Toolkit" to undertand multidimesional modeling.
    So.... here i a´m questioning to me how do i put all my multidimensional modeling into Analytic Workspaces Objects. My questios are:
    1) Does exist some documents that teach how to pass from teory to practice, i mean from multidimensional modeling to AW objetcs? (i can pay for it !!!). (I have read all Oracle Examples - SH and Global) and them always show the same - everyiting is ready to work and work-.
    2) Puntually, how do i represent non-hierarchial attributes and how do i use them. I feel that non-hierarchial attributes are not useful to make analysis.... please correct me.
    3) How do i define a default herarchy using OLAP DML and if my dimension have more than one hierarchy how do i work wiht them.

    Hello Lisandro,
    1) The easiest way to create AW objects is to use the AWM application, that comes with online documentation. You can start creating the basic objects (dimensions, cubes, measures, and simple calculations) using the AWM GUI, and continue with the OLAP Worksheet for the other objects, eg. models, aggregation/allocation maps, relations etc. At least the first part of this is also within the scope of a present or upcoming OLAP 10g course from Oracle University.
    2) I'm not sure what you mean by your question. Attributes are global to a dimension (which is obvious if you use a value based dimension), otherwise AWM etc. lets you define attribute projections (limit attributes) to hierarchies and levels.
    3) You can specifically assign a default hierarchy using AWM, or the OLAP AW Java API, Hierachy setIsDefault() method. Also, there is a Normal Form relation DEFAULT_HIER between a dimension and its default hierarchy, but I don't know if you can just add to this relation to make it work.
    Regards, Hans Henrik
    Message was edited by:
    hheriksen 17-Oct-2005 09:53 CET

  • 9iR2 OLAP Reporting Server Capacity Question

    9iR2 OLAP Reporting Server Capacity Question
    We are running Oracle 9iR2 with OLAP.
    OS - RHEL3 AS
    SERVERS - Dell Poweredge 6600's
    cpu 4 x 2.4ghz
    24GB RAM
    1.5 TB space
    Our AWs are typically 30GB in size. My question is, what is my capacity of jdbc thin client user sessions per box? I haven't been able to find much documentation on scalability with large AWs and a large user base. We will need to host reports for 6000 users moving to 16000 by next year.
    We will be switching to 2x 1.6ghz 64bit opteron boxes this year sometime as well.

    9iR2 OLAP Reporting Server Capacity Question
    We are running Oracle 9iR2 with OLAP.
    OS - RHEL3 AS
    SERVERS - Dell Poweredge 6600's
    cpu 4 x 2.4ghz
    24GB RAM
    1.5 TB space
    Our AWs are typically 30GB in size. My question is, what is my capacity of jdbc thin client user sessions per box? I haven't been able to find much documentation on scalability with large AWs and a large user base. We will need to host reports for 6000 users moving to 16000 by next year.
    We will be switching to 2x 1.6ghz 64bit opteron boxes this year sometime as well.

  • OLAP kinda dumb question....

    Ok, I know its no longer required in OLAP 10g to create a CWM cube first, but if I have a relational cube with associated CWM entries, is it even possible to create an AW based on it any more? Or do I have to recreate all the dimensions, cubes, measures, etc.?
    p.s. there used to be a wizard to do this, but I don't see it any more.
    Thx,
    Scott

    Hi,
    I did this recently in a project. If its the the 100% right way to do it I'm not sure but it worked for me. I did it only for the dimensions however as I wanted to be 100% sure that the cube was created how I wanted.
    First I created an AW using AWM where I wanted all the dimensions. Next I populated and ran this script:
    set serveroutput on
    execute cwm2_olap_manager.set_echo_on;
    DECLARE
    v_dimension_owner VARCHAR2(20):='DW_DM_TEST';
    v_dimension_name VARCHAR2(20):='DIM_TEST';
    v_aw_owner VARCHAR2(20):='DW_OLAP';
    v_aw_name VARCHAR2(20):='AW_ORDER';
    v_aw_dimension_name VARCHAR2(30):='AW_DIM_TEST';
    v_AWDimload_spec_name VARCHAR2(20) := 'order_test_load';
    BEGIN
    dbms_aw.AW_ATTACH(v_aw_name,true);
    DBMS_AWM.CREATE_AWDIMENSION( p_Source_Dimension_Owner =>
    v_dimension_owner,
    p_source_Dimension_Name => v_dimension_name,
    p_AW_Owner => v_aw_owner,
    p_AW_Name => v_aw_name,
    p_Target_Dimension_Name => v_aw_dimension_name);     
    DBMS_AWM.CREATE_AWDIMLOAD_SPEC(
    p_AWDimLoad_Spec_Name =>v_AWDimload_spec_name,
    p_Dimension_Owner => v_dimension_owner,
    p_Dimension_Name => v_dimension_name,
    p_LoadType_Name =>'FULL_LOAD');
    DBMS_AWM.REFRESH_AWDIMENSION (v_aw_owner, v_aw_name,
    v_aw_dimension_name, v_AWDimload_spec_name);
    DBMS_AW.AW_DETACH(v_aw_name);
    COMMIT;
    END;
    This also populates the AW dimension. What I noticed if I didn't populate the dimension, the dimension had to be mapped in AWM. So for me it was easier to run this script, and maintain the dimension in AWM again, selecting the delete options for the dimension members.
    I think theres a similar script for cubes also, but not sure if this allows you to set partitioning.
    Hope this answers your question.
    Regards Ragnar

  • Disco 4 OLAP dimension limit question

    Hello!
    Small question about Disco. Is it possible to do a limit on dimension simmilar to this:
    limit dim1 to HIERARCHY DEPTH 4 SKIP 3 'ONE_TOP_MEMBER'
    limit dim1 keep top 500 BASEDON SALES
    The problem is that in Disco we can not limit Current selection if we are doing top/bottom query. It allows to select only full level of hierarchy but we need only several members of that level. Are there any other aproach?
    Thank you in advance!
    Regards,
    Kirill Boyko

    You're right.. It was interesting :-)
    I couldnt get it to work using just OLAP DML commands..
    ++++++++
    "SUBCAT level
    limit articles to articles_levelrel eq 'SUBCAT'
    "NOTE: DOES NOT WORK for EACH subcat. Adds 20% children of first sub-category in status
    limit articles add limit(limit(articles to children using articles_parentrel articles(articles articles)) keep top npcent percentof total(sales, articles))
    sort articles hierarchy articles_parentrel
    rpr down articles articles_parentrel heading 'SALES' sales heading 'Pct_Parent' sales(articles articles)/sales(articles articles_parentrel(articles articles)) heading 'TopNpcent_Children' limit(limit(articles to children using articles_parentrel articles(articles articles)) keep TOP 20 PERCENTOF total(sales, articles))
    ++++++++
    You can create a DML program and use the Limit function with Top N PERCENTOF based on expression to perform the needful.
    ****** OLAP DML program temp1 ******
    arg _npcent integer
    vrb npcent integer
    vrb vset1 valueset articles
    if _npcent eq na
    then npcent = 20
    else npcent = _npcent
    limit vset1 to na
    limit articles to articles_levelrel eq 'SUBCAT'
    tempstat articles
    DO
    FOR articles
    DO
    limit vset1 add limit(limit(articles to children using articles_parentrel articles(articles articles)) keep top npcent percentof total(sales, articles))
    DOEND
    DOEND
    limit articles add vset1
    sort articles hierarchy articles_parentrel
    temp1 20
    rpr down articles articles_parentrel Heading 'SALES' sales Heading 'Pct_Parent' sales(articles articles)/sales(articles articles_parentrel(articles articles)) Heading 'TopNpcent_Children' limit(limit(articles to children using articles_parentrel articles(articles articles)) keep TOP 20 PERCENTOF total(sales, articles))

  • OWB 10.2 Design questions - OLAP objects - worth using? too buggy?

    I am designing a 2 tiered data warehouse. I have a staging schema where numerous staging tables and key mapping tables are kept and a data warehouse schema where I have relationally implemented dimensions and cubes. I want the dw layer to be made up of conformed dimensions and facts as per Kimball.
    For the DW layer, my plan was to create cubes and dimensions which would be implemented as ROLAP. I would then selectively create MOLAP cubes for subsets of the data warehouse.
    My first question - does this much make sense or should I avoid the logical constructs of dimensions and cubes like the plague and simply build star schemas as Oracle tables directly?
    Assuming I can use cubes and dimensions - how do I control the column names for the cube foreign keys? I have one cube with several date dimension foreign keys. Using the cube editor I get nonsensical names like time_dim_key, time_dim_key1, time_dim_key2. I want these to be creation_date_fk, expiration_date_fk, etc so that they are readable. I don't see any way with the cube editor to control this.
    Also, please see my other posts about errors with the role concept on dimensions.
    And lastly, have any of you had success in deploying a large scale DW with OWB using dimensions and cubes?

    So far the verdict is TOO BUGGY. There is a documented bug in metalink:
    DATA COLLECTED
    ===============
    Deployment output
    ATLAS_TIME_DIM
    Create Error
    ORA-06550: line 960, column 95:
    PLS-00123: program too large (Diana nodes)
    ISSUE CLARIFICATION
    ====================
    Dimension deployment (with 5 or more roles) results in a PLS-00123 error.
    ISSUE VERIFICATION
    ===================
    Verified the issue by the deployment output which show the PLS-00123 error.
    CAUSE DETERMINATION
    ====================
    Defect in OWB 10g R2
    CAUSE JUSTIFICATION
    ====================
    Bug 5066108 (CWM2 CODE GEN USES A SINGLE ANONYMOUS PLSQL BLOCK)
    POTENTIAL SOLUTION(S)
    ======================
    Possible workarounds:
    Reduce the number of roles associated with the dimension.
    Use relational vs. multidimensional
    POTENTIAL SOLUTION JUSTIFICATION(S)
    ====================================
    Deployment is successful with fewer roles associated.
    Looking at the recommended solutions it appears that I can:
    1) limit the cube to very few dimensions making it useless for anything major
    2) Use relational - My first interpretation of this was that I could generate the cube but use the "data objects only" deployment. No such luck. When the roles are added to the cube, the designer window locks up when the roles exceed 8 for the time dimension.
    So, the "use relational" workaround seems to imply that cubes and dimensions should be avoided. Anyone have any contrary experiences?
    Specifically has anyone done any of the following successfully with OWB 10.2:
    1. Have you implemented a time dimension with more than 10 roles associated with it?
    2. Have you implemented a cube (relationally or otherwise) with more than 5 roles of a single dimension against it?
    3. Have you implemented a cube with more than 10 dimensions of any kind associated with it?

  • Oracle OLAP cube build question

    Hello,
         I am trying to build a reasonably large cube (around 100
    million rows from the underlying relational fact table). I am using
    Oracle 10g Release 2. The cube has 7 dimensions, the largest of which
    is TIME (6 years of data with the lowest level day). The cube build
    never finishes.
    Apparently it collapses while doing "Auto Solve". I'm assuming this
    means calculating the aggregations for upper levels of the hierarchy
    (although this is not mentioned in any of the documentation I have).
    I have two questions related to this:
    1. Is there a way to keep these aggregations from being performed at
    cube build time on dimensions with a value-based hierarchy? I already
    have the one dimension designated as level-based unchecked in the
    "Summarize To" tab in AW manager (TIME dimension).
    2. Are there any other tips that might help me get this cube built?
    Here is the log from the olapsys.xml_load_log table:
    RECORD_ID LOG_DATE AW XML_MESSAGE
    1. 09-MAR-06 SYS.AWXML 08:18:51 Started Build(Refresh) of APSHELL Analytic Workspace.
    2. 09-MAR-06 SPADMIN.APSHELL 08:18:53 Attached AW APSHELL in RW Mode.
    3. 09-MAR-06 SPADMIN.APSHELL 08:18:53 Started Loading Dimensions.
    4. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Started Loading Dimension Members.
    5. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Started Loading Dimension Members for ACCOUNT.DIMENSION (1 out of 9 Dimensions).
    6. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Finished Loading Members for ACCOUNT.DIMENSION. Added: 0. No Longer Present: 0.
    7. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Started Loading Dimension Members for CATEGORY.DIMENSION (2 out of 9 Dimensions).
    8. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Finished Loading Members for CATEGORY.DIMENSION. Added: 0. No Longer Present: 0.
    9. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Started Loading Dimension Members for DATASRC.DIMENSION (3 out of 9 Dimensions).10. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Finished Loading Members for DATASRC.DIMENSION. Added: 0. No Longer Present: 0.
    11. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Started Loading Dimension Members for ENTITY.DIMENSION (4 out of 9 Dimensions).
    12. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Finished Loading Members for ENTITY.DIMENSION. Added: 0. No Longer Present: 0.
    13. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Started Loading Dimension Members for INPT_CURRENCY.DIMENSION (5 out of 9 Dimensions).
    14. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Finished Loading Members for INPT_CURRENCY.DIMENSION. Added: 0. No Longer Present: 0.
    15. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Started Loading Dimension Members for INTCO.DIMENSION (6 out of 9 Dimensions).
    16. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Finished Loading Members for INTCO.DIMENSION. Added: 0. No Longer Present: 0.
    17. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Started Loading Dimension Members for RATE.DIMENSION (7 out of 9 Dimensions).
    18. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Finished Loading Members for RATE.DIMENSION. Added: 0. No Longer Present: 0.
    19. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Started Loading Dimension Members for RPTCURRENCY.DIMENSION (8 out of 9 Dimensions).
    20. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Finished Loading Members for RPTCURRENCY.DIMENSION. Added: 0. No Longer Present: 0.
    21. 09-MAR-06 SPADMIN.APSHELL 08:18:54 Started Loading Dimension Members for TIME.DIMENSION (9 out of 9 Dimensions).
    22. 09-MAR-06 SPADMIN.APSHELL 08:18:55 Finished Loading Members for TIME.DIMENSION. Added: 0. No Longer Present: 0.
    23. 09-MAR-06 SPADMIN.APSHELL 08:18:55 Finished Loading Dimension Members.
    24. 09-MAR-06 SPADMIN.APSHELL 08:18:55 Started Loading Hierarchies.
    25. 09-MAR-06 SPADMIN.APSHELL 08:18:55 Started Loading Hierarchies for ACCOUNT.DIMENSION (1 out of 9 Dimensions).
    26. 09-MAR-06 SPADMIN.APSHELL 08:18:55 Finished Loading Hierarchies for ACCOUNT.DIMENSION. 1 hierarchy(s) ACCOUNT_HIERARCHY Processed.
    27. 09-MAR-06 SPADMIN.APSHELL 08:18:55 Started Loading Hierarchies for CATEGORY.DIMENSION (2 out of 9 Dimensions).
    28. 09-MAR-06 SPADMIN.APSHELL 08:18:56 Finished Loading Hierarchies for CATEGORY.DIMENSION. 1 hierarchy(s) CATEGORY_HIERARCHY Processed.
    29. 09-MAR-06 SPADMIN.APSHELL 08:18:56 Started Loading Hierarchies for DATASRC.DIMENSION (3 out of 9 Dimensions).
    30. 09-MAR-06 SPADMIN.APSHELL 08:18:56 Finished Loading Hierarchies for DATASRC.DIMENSION. 1 hierarchy(s) DATASRC_HIER Processed.
    31. 09-MAR-06 SPADMIN.APSHELL 08:18:56 Started Loading Hierarchies for ENTITY.DIMENSION (4 out of 9 Dimensions).
    32. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Hierarchies for ENTITY.DIMENSION. 2 hierarchy(s) ENTITY_HIERARCHY1, ENTITY_HIERARCHY2 Processed.
    34. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Hierarchies for INPT_CURRENCY.DIMENSION. No hierarchy(s) Processed.
    36. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Hierarchies for INTCO.DIMENSION. 1 hierarchy(s) INTCO_HIERARCHY Processed.
    37. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Hierarchies for RATE.DIMENSION (7 out of 9 Dimensions).
    38. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Hierarchies for RATE.DIMENSION. No hierarchy(s) Processed.
    39. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Hierarchies for RPTCURRENCY.DIMENSION (8 out of 9 Dimensions).
    40. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Hierarchies for RPTCURRENCY.DIMENSION. No hierarchy(s) Processed.
    41. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Hierarchies for TIME.DIMENSION (9 out of 9 Dimensions).
    42. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Hierarchies for TIME.DIMENSION. 2 hierarchy(s) CALENDAR, FISCAL_CALENDAR Processed.
    43. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Hierarchies.
    44. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Attributes.
    45. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Attributes for ACCOUNT.DIMENSION (1 out of 9 Dimensions).
    46. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Attributes for ACCOUNT.DIMENSION. 6 attribute(s) ACCTYPE, CALC, FORMAT, LONG_DESCRIPTION, RATETYPE, SCALING Processed.
    47. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Attributes for CATEGORY.DIMENSION (2 out of 9 Dimensions).
    48. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Attributes for CATEGORY.DIMENSION. 2 attribute(s) CALC, LONG_DESCRIPTION Processed.
    49. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Attributes for DATASRC.DIMENSION (3 out of 9 Dimensions). 50. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Attributes for DATASRC.DIMENSION. 3 attribute(s) CURRENCY, INTCO, LONG_DESCRIPTION Processed.
    51. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Attributes for ENTITY.DIMENSION (4 out of 9 Dimensions).
    52. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Attributes for ENTITY.DIMENSION. 3 attribute(s) CALC, CURRENCY, LONG_DESCRIPTION Processed.
    53. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Attributes for INPT_CURRENCY.DIMENSION (5 out of 9 Dimensions).
    54. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Attributes for INPT_CURRENCY.DIMENSION. 2 attribute(s) LONG_DESCRIPTION, REPORTING Processed.
    55. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Attributes for INTCO.DIMENSION (6 out of 9 Dimensions).
    56. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Finished Loading Attributes for INTCO.DIMENSION. 2 attribute(s) ENTITY, LONG_DESCRIPTION Processed.
    57. 09-MAR-06 SPADMIN.APSHELL 08:18:57 Started Loading Attributes for RATE.DIMENSION (7 out of 9 Dimensions).
    58. 09-MAR-06 SPADMIN.APSHELL 08:18:58 Finished Loading Attributes for RATE.DIMENSION. 1 attribute(s) LONG_DESCRIPTION Processed.
    59. 09-MAR-06 SPADMIN.APSHELL 08:18:58 Started Loading Attributes for RPTCURRENCY.DIMENSION (8 out of 9 Dimensions).
    60. 09-MAR-06 SPADMIN.APSHELL 08:18:58 Finished Loading Attributes for RPTCURRENCY.DIMENSION. 2 attribute(s) LONG_DESCRIPTION, REPORTING Processed.
    61. 09-MAR-06 SPADMIN.APSHELL 08:18:58 Started Loading Attributes for TIME.DIMENSION (9 out of 9 Dimensions).
    62. 09-MAR-06 SPADMIN.APSHELL 08:20:26 Finished Loading Attributes for TIME.DIMENSION. 3 attribute(s) END_DATE, LONG_DESCRIPTION, TIME_SPAN Processed.
    63. 09-MAR-06 SPADMIN.APSHELL 08:20:26 Finished Loading Attributes.
    64. 09-MAR-06 SPADMIN.APSHELL 08:20:26 Finished Loading Dimensions.
    65. 09-MAR-06 SPADMIN.APSHELL 08:20:26 Started Updating Partitions.
    66. 09-MAR-06 SPADMIN.APSHELL 08:20:26 Finished Updating Partitions.
    67. 09-MAR-06 SPADMIN.APSHELL 08:20:40 Started Loading Measures.
    68. 09-MAR-06 SPADMIN.APSHELL 08:20:40 Started Load of Measures: SIGNEDDATA from Cube FINANCE.CUBE.
    69. 09-MAR-06 SPADMIN.APSHELL 10:54:06 Finished Load of Measures: SIGNEDDATA from Cube FINANCE.CUBE. Processed 100000001 Records. Rejected 0 Records.
    70. 09-MAR-06 SPADMIN.APSHELL 10:54:06 Started Auto Solve for Measures: SIGNEDDATA from Cube FINANCE.CUBE.

    Hi, I've taken a few minutes to do a quick analysis. I just saw in your post that this isn't "real data", but some type of sample. Here is what I'm seeing. First off, this is the strangest dataset I've ever seen. With the exception of TIME, DATASOURCE, and RPTCURRENCY, every single other dimension is nearly 100% dense. Quite truthfully, in a cube of this many dimensions, I have never seen data be 100% dense like this (usually with this many dimensions its more around the .01% dense max, usually even lower than that). Is it possible that the way you generated the test data would have caused this to happen?
    If so, I would strongly encourage you to go back to your "real" data and run the same queries and post results. I think that "real" data will produce a much different profile than what we're seeing here.
    If you really do want to try and aggregate this dataset, I'd do the following:
    1. Drop any dimension that doesn't add analytic value
    Report currency is an obvious choice for this - if every record has exactly the same value, then it adds no additional information (but increases the size of the data)
    Also, data source falls into the same category. However, I'd add one more question / comment with data source - even if all 3 values DID show up in the data, does knowing the data source provide any analytical capabilities? I.e. would a business person make a different decision based on whether the data is coming from system A vs. system B vs. system C?
    2. Make sure all remaining dimensions except TIME are DENSE, not sparse. I'd probably define the cube with this order:
    Account...........dense
    Entity..............dense
    IntCo...............dense
    Category.........dense
    Time...............sparse
    3. Since time is level based (and sparse), I'd set it to only aggregate at the day and month levels (i.e. let quarter and year be calculated on the fly)
    4. Are there really no "levels" in the dimensions like Entity? Usually companies define those with very rigid hierarchies (assuming this means legal entity)
    Good luck with loading this cube. Please let us know how "real" this data is. I suspect with that many dimensions that the "real" data will be VERY sparse, not dense like this sample is, in which case some of the sparsity handling functionality would make a huge benefit for you. As is, with the data being nearly 100% dense, turning on sparsity for any dimension other than TIME probably kills your performance.
    Let us know what you think!
    Thanks,
    Scott

Maybe you are looking for