Regarding Logical level key and row wise initialization

Hi Gurus,
What is the purpose of row wise initialization in external table authentication and when we have to go for row wise initialization.
Why we have to enable logical level key in hierarchy is this only for getting drill down to the next level if we make two columns as logical level key what will happens. If we want to enable a column as a logical level key what are the character sticks that column should satisfy.
Thanks,

1) Row Wise Initialization used to hold multiple values in a variable. Let says SQL gives 4 rows (A,B,C,D) as output. Now I want to hold 4 value in a variable to get this happen we need to go for RowwiseIniziation. If you do not do this at any point in time Variable holds only value A not others. Simply it works as Array.
2) Level keys define the unique elements in each level and provide the context for drill down. You can make two logical columns as logical key but you need to make sure what to be displayed in your hierarchy by selecting DISPLAY. If you make to as separate logical keys and set Display for both you get two columns in the hierarchy
http://gerardnico.com/wiki/dat/obiee/hierarchy_level_based

Similar Messages

  • Row wise Initialization - Huge LOV

    We use External table for Authentication & uses row wise Initialization. It is working perfectly fine, but the issue is the list of values (output) from row wise initialization is pretty large (the output SQL will be at least 30 pages). This is alarming the management and mainly the DBA's and atleast once in a week we are experiencing issues with these SQL's. And in near future, the SQL will be extending drastically as the company has acquired another 2 companies and once the integration is completed, the LOV's from row wise initialization will easily go upto 90 to 100 pages. Let me explain you what I did... We have around 10 Init blocks used for Authentication, but I am mainly concerned about 2 (cf_visibility & sc_visibility) as these are used in Security/Group/Permissions/Report Filters. Each report will for sure have these filters attached. Here cf_visibility Init SQL is (SELECT DISTINCT 'cf_list', CHILD_COMPANY_ID FROM COMPANY_VISIBILITY CV, CLIENT_FACILITY CF WHERE CV.ANCESTOR_COMPANY_ID=(SELECT SUBSTR(':USER', 0, (INSTR(':USER', '.')) - 1) FROM DUAL) AND CV.CHILD_COMPANY_ID=CF.CLIENT_FACILITY_ID AND CV.DW_DELETE_DATE IS NULL UNION SELECT DISTINCT 'cf_list', 0 FROM DUAL) and
    sc_visibility Init SQL is (SELECT DISTINCT 'sc_list', CHILD_COMPANY_ID FROM COMPANY_VISIBILITY CV,SERVICE_CENTER SC WHERE CV.ANCESTOR_COMPANY_ID= (SELECT SUBSTR(':USER', 0, (INSTR(':USER', '.')) - 1) FROM DUAL) AND CV.CHILD_COMPANY_ID=SC.SERVICE_CENTER_ID AND CV.DW_DELETE_DATE IS NULL
    UNION SELECT DISTINCT 'sc_list', 0 FROM DUAL)
    and both are row wise initialization blocks. The filter used for all the Groups is [(DEP.Jobs."Client Facility ID" =  VALUEOF(NQ_SESSION."cf_list")) AND (DEP.Jobs."Service Center ID" =  VALUEOF(NQ_SESSION."sc_list"))]. This output LOV for this filter is huge as I said earlier.
    My main goal here is to reduce the size of the SQL to 1 page, I am planning to do that by replacing the LOV list by SQL (Kind of sub query). I started experimenting with only cf_visibility for now. I replaced the existing SQL with (select 'cf_list',
    'SELECT DISTINCT CHILD_COMPANY_ID FROM COMPANY_VISIBILITY CV, CLIENT_FACILITY CF WHERE CV.ANCESTOR_COMPANY_ID=(SELECT SUBSTR('':USER'', 0, (INSTR('':USER'', ''.'')) - 1) FROM DUAL) AND CV.CHILD_COMPANY_ID=CF.CLIENT_FACILITY_ID AND CV.DW_DELETE_DATE IS NULL UNION SELECT DISTINCT 0 FROM DUAL'
    from dual)
    this returns only 1 row, with 1column as cf_list and the next column with the ('SELECT DISTINCT CHILD_COMPANY_ID FROM COMPANY_VISIBILITY CV, CLIENT_FACILITY CF WHERE CV.ANCESTOR_COMPANY_ID=(SELECT SUBSTR('':USER'', 0, (INSTR('':USER'', ''.'')) - 1) FROM DUAL) AND CV.CHILD_COMPANY_ID=CF.CLIENT_FACILITY_ID AND CV.DW_DELETE_DATE IS NULL UNION SELECT DISTINCT 0 FROM DUAL') Note: USER will be replaced with actual User Name.
    But when I run a report in Answers, it throws me an error [nQSError: 17001] Oracle Error code: 1722, message: ORA-01722: invalid number at OCI call OCIStmtExecute. I understand the error as it is clearly mentioned, but my question is "Is there any way not to get that huge list in the SQL"
    Let me show you the SQL generated along with the error. As this is a Report filter I am only attaching the where clause of the Query. (where ( T38857.CLIENT_FACILITY_ID in ('SELECT DISTINCT ''cf_list'', CHILD_COMPANY_ID FROM COMPANY_VISIBILITY CV, CLIENT_FACILITY CF WHERE CV.ANCESTOR_COMPANY_ID=(SELECT SUBSTR(''5700.abcde'', 0, (INSTR(''5700.abcde'', ''.'')) - 1) FROM DUAL) AND CV.CHILD_COMPANY_ID=CF.CLIENT_FACILITY_ID AND CV.DW_DELETE_DATE IS NULL UNION SELECT DISTINCT ''cf_list'', 0 FROM DUAL') ).
    So I also thought if I use REPLACE function and replace 'Single Quote' before and after the SQL statement with 'Space', it may work. So I edited one of the Group's report filter ((DEP.Jobs."Client Facility ID" = Replace('VALUEOF(NQ_SESSION."cf_list")', ''', ' ') but it is throwing an error in the expression builder itself.
    Now I ran out of ideas and seeking any help/guidance from you folks.
    I know this is a very lengthy post as I tried to explain the situation as clearly as possible. I hope someone can assist me in resolving this. Thanks for your Time...
    -Dinee

    can't you make a custom table in the DWH? or use a VPD? Maybe a parameterised database view? What I mean is try to push your logic to the database.
    regards
    John
    http://obiee101.blogspot.com

  • Logical Difference of defining Multiple Logical level keys

    Hi All,
    We add logical level keys in BMM layer by right cliking the logical level column of a dimesional hierarchy, doing so defines a new logical key, i already have another logical level column defined as logical level key.
    When i double click on logical level hierarchy, it has keys tab where i have two keys now.
    say the two keys are: "channel desc key" and "channel id key"
    My question is in one key say "channel id key" if we click edit, i am getting all the columns including channel desc column, so if i click it as key, it forms a composite key of (channel id) + (channel desc) inside "channel id key". Then what is the use of maintaining another key = "channel desc key"
    Is there any logical difference of ("maintaining two keys having single column defined as key in either of them") and ("maintaining one key having two logical columns defined as keys in a single logical level key")?
    Thanks in Advance.
    Regards,
    Sreekanth.

    Hey got the answer, there is a difference, if i add multiple columns as keys under a single logical level key, they both come under one key and its drill down on both the columns, i cannot select selectively out of which column of the two drill down is applicatble.
    If i create two different logical keys for two columns i can selectively choose which column drill down is applicable to.
    Drill Down is based on "Logical Level Key" not on Logical Level Column selected as key.
    Thanks,
    Sreekanth.

  • Use Session Variable with row-wise initialization

    Hello,
    I use an initialization block in order to load some translations in my repository (version is 11.1.1.6.BP1) :
    SQL :
    SELECT CODE_KEY, STRING_VALUE FROM "TABLES" WHERE  LANGUAGE_KEY= 'VALUEOF(NQ_SESSION.USERLOCALE)'
    Values :
    CN_INCOMING, Incoming, en
    CN_OUTGOING, Outgoing, en
    CN_INCOMING, Réception, fr
    CN_OUTGOING, Emission, fr
    etc ...
    I checked the row-wise intialization.
    The query is correct and returns the right values (I check in the log file ..).
    So far, So good.
    But when I want to use session variables in a column expression (in repository) like  :
    CASE WHEN "column"="xx" THEN VALUEOF(NQ_SESSION."CN_INCOMING")  ELSE VALUEOF(NQ_SESSION."CN_OUTGOING") END
    I got the error: [nQSError: 23006] The session variable, NQ_SESSION.CN_OUTGOING, has no value definition.
    If I used the same formula directly in Answers it's working correctly.
    Do I have to necessarily do this in answers or is there a way to do this in the repository.
    Thanks in advance
    Regards
    Benjamin

    Yes I already tested this point, when I don't use a row wise initialization it's working, but I don't want to create one variable for each translations that I need to use in column formula if you know what I mean.
    I don't understand why we can't use this kind of variable in this context ..but if I have to create the column in my analysis, I will do that, but it's not really user friendly
    Anyway thanks for your time.

  • Row wise Initialization - "Session Variable has no value Definition"

    Hi,
    I have gone through other posts relating to this error, but could not find a solution.
    I have defined an initialization block with 'Data Source' as SELECT 'TEST_VARIABLE', cost_center from XX_COST_CENTER.
    In the 'Edit Data Target', i have selected the 'Row Wise Initialization' option.
    When i 'Test' this initialization block, using the 'Test' button, i get the exected output, with all the different Cost Centers being defined.
    However, in the Presentation Services when i add a column and change its formula to VALUEOF(NQ_SESSION.TEST_VARIABLE), i get an error
    +[nQSError: 23006] The session variable, NQ_SESSION.TEST_VARIABLE, has no value definition.+
    Would appreciate some input, to check if i have missed any steps, or am doing something wrong
    Thanks & Regards,
    Ab
    Edited by: obiee_user_ab on Jan 16, 2012 6:25 AM

    Hi,
    Error is caused because no value is returned from the sesision variable for the logged in user, you may check the NQquery.log file to see if the initblock was successfull and if that returned any rows, try setting default value in the session variable
    It might also happen when
    1. You created the variable as Repository variable in RPD and referring as session variable in Answers
    2. It may also happen when you are referring the Session variable Name wrongly in Answers. E.g "Current Week" in RPD (2 Words) and CurrentWeek in Answers (Single word).
    Try to use the same letter case for the name of the variable (upper and lower).
    Hope this helps.
    Regards
    MuRam

  • Handling Null Row wise initialization

    Hi,
    I am creating row wise initialization block to restrict the number of records returned by a Answers.
    I am populating a session variable called, REPS_LIST. When I put the condition,
    Fact.REP_ID = VALUEOF(NQ_SESSION."REPS_LIST") the group filter works fine.
    I want to handle a situation where REPS_LIST is NULL.In that case,I would to get all the rows from my fact. For this, I put the filter like
    Fact.REP_ID = IFNULL( VALUEOF(NQ_SESSION."REPS_LIST"), "Fact".REP_ID)
    However when i run the Answers report, it says no value definition for REPS_LIST. How can I handle the null condition here?
    Thanks,
    Vivek.

    John,
    It appears that the row-wise session variables can be used only with the equality(=) sign. We can't put them in any other function in that the server convert these variables into comma separated string and replaces the = by IN operator. So if I had following filter
    Fact.REP_ID = VALUEOF(NQ_SESSION."REPS_LIST")
    then it actually gets translated into something like
    Fact.REP_ID IN (1001, 1002, 1003....)
    As you suggested, I played with the SQL than going behind the above syntax and was able to achieve what I wanted.
    Thanks,
    Vivek.

  • Row wise initialization

    Hi,
    Can anyone explain how row wise initialization works in OBIEE in steps wise.
    Thanks,
    Lakshmipathi.

    Go through the link
    http://108obiee.blogspot.com/2009/03/external-table-authentication-and-row.html

  • In alvs how to do totals by colum wise and row wise

    hi,
    in alvs how to do totals by colum wise and row wise
    could u plz explain clearly with coding

    Hi Rajesh,
    Go through these links...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    Reward Points if this helps,
    Satish

  • Abt Row - Wise initialization

    Hi Gurus,
    What is the use of row wise initialization when we have go for this can i have one scenario for better under standing.
    Thanks,

    Check these
    http://gerardnico.com/wiki/dat/obiee/row-wise
    http://docs.oracle.com/cd/E12103_01/books/admintool/admintool_Variables6.html
    http://obiee10grevisited.blogspot.com/2012/03/row-wise-initialization.html

  • Row-wise Initialization: Use caching

    We have the 'Use Caching' check box available for row-wise initialized system variables. Although I do understand how this is useful as it shortens the login time for users who have logged in before by initializing the session variable from the cache instead of firing the query on the database everytime, I need to understand how this cache mechanism works especially when the overall server caching is disabled.
    I have faced a situation where the session variable was initialized from the cache although the server caching was disabled. Is there any way to purge this cache or set a refresh frequency? As of now I had to uncheck the 'Use Caching' check box to fetch the refreshed results in the session variable. But I believe this is undesirable in the long term.
    Thanks,
    Gaurav

    Had thought so. But then it means that you can use row-wise initialization with caching, only when the underlying data is never going to change. Restarting the BI server is not a viable option to clear the cache in systems which require 100% availability.
    But any ways, thanks for the input Dhar.
    Thanks,
    Gaurav

  • Use of New logical Level Key in OBIEE

    Hi all,
    can anybody tell me what is the use of newlogicallevel key in hierarchies(OBIEE).
    why we need to set a newlogical level key for each level in hierarchies.
    pls explain in detail....
    regards
    bharath

    You may get info as below if you use Admin tool help file
    Level keys. Each logical level (except the topmost level defined as a Grand Total level) needs to have one or more attributes that compose a level key. The level key defines the unique elements in each logical level. The dimension table logical key has to be associated with the lowest level of a dimension and has to be the level key for that level.
    A logical level may have more than one level key. When that is the case, specify the key that is the primary key of that level. All dimension sources which have an aggregate content at a specified level need to contain the column that is the primary key of that level. Each logical level should have one level key that will be displayed when an Answers or Intelligence Dashboard user clicks to drill down. This may or may not be the primary key of the level. To set the level key to display, select the Use for drill down check box on the Level Key dialog box.
    Be careful using level keys such as Month whose domain includes values January, February, and so on—values that are not unique to a particular month, repeating every year. To define Month as a level key, you also need to include an attribute from a higher level, for example, Year. To add Year, click the Add button in this dialog and select the logical column from the dialog that is presented.

  • Cell wise and row wise check box in oops alv

    Normally column wise check box are possible in oops alv but how to possible check box in first row only in oops alv and Cell wise check box in oops alv?

    Hi,
    Try like changing  this
    insted of
    g_layout-f2code = ' '.
    use this
    g_layout-f2code = 'DISP'. " Sets fcode for when double
    and
    g_layout-f2code = '&ETA'. " it will display POPUP screen
    Best Regards
    Ranga
    Edited by: Ranga Swamy on Nov 1, 2008 11:07 PM
    Edited by: Ranga Swamy on Nov 1, 2008 11:17 PM

  • URGENT: Issue with hierarchy level keys and report drill down

    Hi,
    BASIC STRUCTURE:
    I have created a subject area with 3 facts (FACT_A, FACT_B, FACT_C) and 4 dimesnions (TIME_DIM,DIM_2,DIM_3,DIM_4). Each fact table also has additional aggregate tables aggregated along levels of the time dimension. Also our timw dimension has aggregated dimension tables like TIME_DIM_WEEK, TIME_DIM_MONTH, TIME_DIM_QUARTER and TIME_DIm_YEAR.
    GOAL:
    All 3 facts have the same measures M_1 and M_2 in them but may not have data for the same dimension values selected.
    For example
    For month JAN 2000 FACT_A.M1=100$ and no data exists for JAN 2000 in FACT_B and FACT_C. Then in the report
    for JAN2000 it should show FACT_A.M1= $100, FACT_B.M1 = 0 and FACT_C.M1 =0. In this case I should be able to drill down to the lowest level.
    ISSUE:
    The time dimension TIME_DIM has the following levels - Total -> Year -> Quarter -> Month -> Week -> Day
    However I am having an issue with drill down in the reports whenever I pull metrics from more than 1 fact at a time. I have defined the level keys but not sure if I need to do anything in addition since I am using aggregates.
    I have to fix this issue quickly. Please help me.

    Alastair,
    All the fact tables have aggregated facts as sources.
    I have checked the levels set for each of the sources to the time dimesnion table in BMM and they look okay. So the Time dim table in BMM has 4 source tables
    Time_Day (level set to day, table key is "day"),
    Time_month (level set to month, table key is "Fiscal_Month_Code"),
    Time_Quarter(level set to quarter, table key is "Fiscal_Quarter_Code") and
    Time_Year(level set to year, table key is :Fiscal_Year_Code").
    Note: No time week aggregate added as logical source.
    Again the time dim hierarchy based off of this table has levels: Total -> Year ->quarter -> Month -> week -> day
    The levels keys set for each level are
    Year -> Primary key is Year_Name (YYYY)(Checked as chronological key) and another key is Year_Num (YYYY)(Checked as chronological key)
    Quarter->Primary Key is Quarter_Name (YYYY Qn), another key is Quarter_Number (Format n where n can assum values 1,2,3,4). Both keys are set as chronological keys
    Month -> Primary key is Month_Name (MON YYYY), another key is Month_Num (Format n where n can assume values from 1 to 12) Both keys are set as chronological keys
    Week -> Primary Key is week name (YYYY Wk nn, where nn can have values from 1 to 53), another key is week num (nn, where nn can have values from 1 to 53)
    Day -> primary key set to day (date format)
    Issue1: When I try to drill to lower levels it throws out an error saying report cannot find any data because filters may be too restrictive even though I see data at higher level
    For ex: If I drill down to Year: 2010 and Qtr: 2010 Q2 and M1:$100 when I click on Qtr to drll to month level it throws me the error
    Issue2: when I add year and qtr colums to the report I see data as below which is incorrect
    Year_Name Qtr_Name data:FACTA_M1 Data: FactB_M1
    2009 2009 Q1 $10 $5
    2009 2009 Q2 $20 $80
    2009 2009 Q3 $20
    2009 2009 Q4 $30
    2010 2010 Q1 $100
    2010 Q2 $101
    2010 Q3 $102 $230
    2010 Q4 $103
    2011 Q1 $10
    In the above example year_name is not showing up for 2010 Q2 and after. However if I change the primary key for level 'Quarter' by having key consist of year name and quarter name instead of just quarter name the issue doesnt occur and drill down works great. The only issue is when I drill from qtr it first shows year name and quarter name instead of showing the next level which would be month name.
    Sorry about the long message but I thought you might notice something in how I have set up the keys.
    Thanks

  • Accessing Row-Wise Initialization variable in OBIEE Answers 11g

    Hi All,
    I need to access row-wise initialized session variable in answers fx section, i came to know from following blog
    http://carpediemconsulting.wordpress.com/
    that i can use VALUELISTOF(NQ_SESSION.ROW-WISE-VAR)) function to get the list of values in answers, but i m getting syntax error in obiee 11.1.1.3
    Any work arounds for this. Please help!!
    Thanks,
    Sreekanth

    You can't, it's only intended for use in the RPD initblocks, it's mainly used to restrict data acces:
    http://www.orastudy.com/oradoc/selfstu/fusion/doc.1111/e16816/biapps_security.htm
    regards
    John
    http://obiee101.blogspot.com/
    http://obiee11g.com/

  • DropDown by Key and Row Repeater

    Hello,
    I 've build a form inside a rowrepeater, inside the form there are several empty drop down by key.
    The key value table of each dropdown by key belong to the selected country grouping (an input field with search help inside the form).
    OnEnter event of the molga field, I call a BL to fill the key value table and get the index of the form (regarding to the dataprovider of my row repeater).
    Here is the structure of my context:
    CONTEXT _
                     |_CTX_COLL (0:N)
                                  |_CTX_DROPDOWN (1:1)
    * --- GET MOLGA --- *
    * navigate from <CONTEXT> to <CTX_COLL> via lead selection
      lo_nd_ctx_coll = wd_context->get_child_node( name = wd_this->wdctx_ctx_coll ).
      lo_nd_ctx_coll->get_static_attributes_table( importing table = lt_ctx_coll ).
      read table lt_ctx_coll into ls_ctx_coll index iv_index.
      lv_molga = ls_ctx_coll-country.
    * --- GET DROPDOWN NODE INDEX REFERENCE --- *
      lv_idx_str = iv_index.
      concatenate 'CTX_COLL.'
                  lv_idx_str
                  '.CTX_DROPDOWN' into lv_path.
      condense lv_path no-gaps.
    * navigate from <CONTEXT> to <CTX_DROPDOWN> via index selection
      lo_nd_ctx_dropdown = wd_context->path_get_node( path = lv_path ).
      lr_node_info = lo_nd_ctx_dropdown->get_node_info( ).
    * --- SET DROPDOWN --- *
      lt_value_set = wd_assist->get_priority( lv_molga ).
    * set values (table) to context attribute
      lr_node_info->set_attribute_value_set(
       name = `PRIORITY`
       value_set = lt_value_set

    well ehrr
    I see two completely different implementations
    the context dropdown must be used with a drop down by INDEX
    the value set must be used wth a dropdown by KEY
    as you have a ddk, it uses the value set
    furthermore, you set the value set on the dropdown context
    try the index one
    I'm not sure what you are trying to do, but try the following option
    you have a node in which your dropdown field resides
    make a subnode with the values for that field
    fill the subnode depending on the selected country (don't forget to invalidate the node when the country changes)
    bind a ddi to the dropdown values in the node
    the value set is defined on node level, not on element level
    so setting a different value set per element won't work i'm afraid
    correct me if i'm rong
    Edited by: Tom Van Doorslaer on Apr 3, 2009 3:48 PM

Maybe you are looking for