Repository variable and Init block

I created an Init block that is based off of a sql command in which the command is designed to give me the max date a table was updated after a data load.  Well the variable I created based off of this has a timestamp of today's date.  I want to create a report on the front end (actually just a column) that updates when a load has been completed.  I use this (TIMESTAMPDIFF ( SQL_TSI_MINUTE, VALUEOF(“LAST_UPDATE_DATE”)), CURRENT_TIMESTAMP)) for the column formula but I'm either running into errors or getting nothing at all.
OBIEE 11.1.1.5
Please Advise

Hey......long time but here it is.   So I created an init block called Last_update_date and had it query a db table that automatically updates when a data load is complete.  I set a variable with the current timestamp.  Well When the table loads the variable locks in that time of the load.   On the front end I referenced the table in an expression and created a report around it.  I did a timestamp diff b/t current time and the time the init block locked in for the load, and called it ETL update column.  I created an agent that starts a purging/caching cascade with the ETL update report as the condition.
Thanks

Similar Messages

  • OBIEE 11g, BI Apps EBS: What are default security variables and Init Block

    Hi,
    We are implementing BI Apps 7.9.6.3 [OBIEE 11.1.1.1.5 with EBS modules]. Out of the box RPD and mappings.
    There are many VARIABLES and INIT BLOCKS in the RPD. Some of them are mainly for Siebel, Jd Edwards etc.
    I need to know what are the default variables and Init Block configures in RPD. Also it will be highly appreciated if anyone can point out what segments we should configure if we need to implement security with simple database table authentication with SSO?
    Thanks in advance.

    You should review this doc for the options for EBS/OBIA security:
    http://docs.oracle.com/cd/E20490_01/bia.7963/e19042.pdf
    If helpful, pls mark as correct or helpful.

  • Need help on how to find unused variables and intialization blocks in rpd

    Hi ,
    I have to remove used initialization blocks and variables.
    Could suggest me the wayt to find the unused variables and intialization blocks.
    Thnx

    1.For the ones used in the RPD, you can right click on the presentation catalog and say Display related variable, init blocks etc.
    2. The ones used in Presentation layer only could be identified when they get fired. refresh your dashboards and from the admin tool in online mode you can find which init blocks and variables are fired... eliminate by that way.
    3. to know all the variables and init blocks present create the Metadata dictionary of the RPD and you will get a folder named Init blocks... identify and explore there....

  • 11.1.1.6.11  /  Essbase Substitution Variables / RPD Init Block / Dynamic Variables

    11.1.1.6.11  /  Essbase Substitution Variables / RPD Init Block / Dynamic Variables
    How do I update the Init Block which is populated with the Essbase Substitution variables.   This is dynamically created the first time I import an Essbase cube and is populated with the Substitution variables when it is first imported into the RPD.   If later on new Substitution variables are added, they are not being reflected in the Init Block or its dynamic variables.  I have done the re-import of the data source with no change to the Init Block Dynamic Variables.   How do I get these new Substitution variables imported?
    It appears that the only way is to delete it from the Physical Layer, however this deletes any changes I have made to Cube in the physical layer.

    So delete it from the Physical Layer, change the Substitution Variables associated with the cube.   Import it back into the physical layer.   It does NOT delete existing Init Block Dynamic variables that no longer exist as Substitution variables.  

  • Session variable and initialization block issues

    We are using OBIEE 10.1.3.3 and utilizes built in security features. (No LDAP or other single sign on). The user or group names are not stored in any external table. I have a need to supplement Group info of the user to the usage tracking we implemented recently as the NQ_LOGIN_GROUP.RESP column contains username instead of group name. So I created a session variable and associated with a new initialization block and also had a junk default value set to the variable. In the initialization block, I wrote the following query and as a result it inserted correct values into the table when the TEST button was clicked from the initialization block form.
    insert into stra_login_data (username, groupname, login_time) values ('VALUEOF(NQ_SESSION.USER)', 'VALUEOF(NQ_SESSION.GROUP)', SYSDATE)
    My intention is to make this execute whenever any user logs on. The nqserver.log reports the following error and it doesn?t insert values into the table.
    [nQSError: 13011] Query for Initialization Block 'SET_USER_LOGIN_BLOCK' has failed.
    [nQSError: 23006] The session variable, NQ_SESSION.USER, has no value definition.
    [nQSError: 13011] Query for Initialization Block 'SET_USER_LOGIN_BLOCK' has failed.
    [nQSError: 23006] The session variable, NQ_SESSION.GROUP, has no value definition.
    When I changed the insert statement as below, this does get populated whenever someone logs in. But I need the values of GROUP associated with the user as defined in the repository.
    insert into stra_login_data (username, groupname, login_time) values ('TEST_USER', TEST_GROUP', SYSDATE)
    Could someone help me out! As I mentioned above, I need the GROUP info into the usage tracking. So, if there is another successful approach, could you please share?
    Thank you
    Amin

    Hi Amin,
    See [this thread|http://forums.oracle.com/forums/thread.jspa?messageID=3376946&#3376946]. You can't use the GROUP session variable in an Init Block unless it has been seeded from an Init Block first. There isn't an easy solution for what you want, but here are some options:
    1) Create a copy of your User => Groups assignments in your RPD in an table so you can use it in your Usage Tracking Subject Area. But this means you will have to replicate the changes in two places so it's not a good solution.
    2) As the GROUP session variable is populated when you login you could theoretically use it a Dashboard and pass it a parameter to write the value to the database. But as I am not sure how can you make fire only once when the user logins it sounds like a bad idea.
    3) Move your User => Groups assignments from your RPD to a DB table. Use OBIEE Write Back or something like Oracle APEX to maintain them.
    I think 3) is the best solution to be honest.

  • Session variable using :GROUP variable in init block

    I'd like to filter using session variable.
    This session variaible should be build using :GROUP special session variable
    I'd like do something like this (init block):
    select  case when instr(upper(':GROUP'), 'ADMINISTRATOR')>0 then 'Yes' else 'No' end from dual
    but it seems to doesn't work properly (It means I have always 'No' value)
    After investigation i did some simple test
    initialization block like this:
    select  upper(':USER'),upper(':GROUP') from dual
    set variables using above init block: UPP_USER and UPP_GROUP
    next i did simple reques with 4 columns:
    *1. VALUEOF(NQ_SESSION.USER)*
    *2. VALUEOF(NQ_SESSION.GROUP)*
    *3. VALUEOF(NQ_SESSION.UPP_USER)*
    *4. VALUEOF(NQ_SESSION.UPP_GROUP)*
    and my result is:
    1. Administrator
    2. Administrators;IT_Deparment ....
    3. ADMINISTRATOR
    4. _:GROUP_
    Why in 4th column I didn't get: ADMINISTRATOR;IT_DEPARTMENTS ....
    Can I use special variable GROUP in initialization block?
    Could someone explain it?

    Hi,
    Only :USER and :PASSWORD are available
    try (select 'VALUEOF(NQ_SESSION.USER)', 'VALUEOF(NQ_SESSION.GROUP)' from dual instead.
    (You migth have to force a fill of the group variable first)
    Regards
    John
    http://obiee101.blogspot.com/

  • Final variables and try blocks

    If you tried to initialize a final variable within a try block, you would get a compile-time error.
    Here's an example class:
    class Example {
        private final String example;
        public Example() {
            try {
                example = "Example";
            } catch (Exception e) {
                // Just an example.
    }Obviously you wouldn't need to try-catch something like this (it's a stupid example - I know) , but the point is, the code wouldn't compile, and would return an error saying something like "example may not have been initialized".
    So I've got two questions. Why is this, and is there any way around it?
    Thanks in advance :)

    Why is thisThe actual error message is "The blank final field example may not have been initialized". The Java compiler insists that all the fields have some actual value when a constructor has done its thing. Nonfinal fields will have the "default" value of null, but this is not so for final fields: if they had a default value, you couldn't change them from that default because they're final!
    Once you enter a try block the compiler has no way of knowing that the assignment line will ever get carried out. Some exception might occur and the example field would be left uninitialised ie having no value whatsoever, not even null.
    is there any way around it?In the catch part you could throw the exception and let the caller deal with it.
    Or you could try and assign some value to example within the catch part. Now the compiler will complain "The final field example may already have been assigned". Supposing you wanted it to end up as null in this case (it's not clear why though... But you may have a sensible "default" if for example a file can't be written to or some other exceptional state has occured)
    class Example {
        private final String example;
        public Example() {
            String str;
            try {
                str = "Example";
            } catch (Exception e) {
                str = null;
            example = str;
    }

  • How the repository variable work on the dashboard report in static text

    I would like to display something like the below on the dashboard prompts in static text.
    The Data extracted as of <repository variable>
    I created a repository variable which extracts the last updated date of the warehouse.
    The static message on the dashboard should show as above where repository variable should be the last updated date from the warehouse.
    I appreciate if anyone can help me do this.
    Thanks in advance.

    1) Put an extra column in your workspace. It doesn't matter what column you choose. Drag this column all the way to the left so it is the first column in your Request.
    2) Click on the fx button and delete the contents.
    3) Click on the "variable" button on the bottom right of the fx window, select "repository variable" and then type the name of the repository variable you created.
    4) Go to the Narrative View.
    5) Type the text, "Data extracted as of" and then type @1.
    6) Change the "Rows to display" (right-side of the Narrative View window) to 1.
    7) Add this view to your Compound Layout.

  • New Repository variable failing with 'Unresolved Identifier' error

    Hi,
    I created a new repository variable and when used in the Segments/Reports it is failing with 'Unresolved Identifier' error. This is happening intermittently and sometimes it is getting the results as expected, Can you please let me know where I am wrong?
    Thanks,
    Viswanath K M

    Couple things to check here are :
    1) Make sure you have spelled the variable name correct.
    2) Make sure you are using the repository variables with appropriate data type columns.
    Regards,
    -Amith.

  • Repository Variable.

    Hi All,
    I want to know something about Repository variable:
    1.     What is Repository Variable?
    2.     What is the use of it and benefit of it?
    3.     Can we use it in reporting side or only repository side?
    4.     Can u give me one example of repository variable that how to use it?
    Thanks……….

    You have to stop the BI SERVER and BI PRESENTATION services before you change the repository variable and then restart the services so that new repository can be seen by the OBIEE admin tool.

  • Init Block for Dynamic Repository Variables

    I have defined an Init Block in the RPD. I see that you can set the refresh intervals via a schedule that is a set time. I want to be able to trigger this Init Block once my ETL process has completed. Is there a way to externally trigger the Init Blocks ?

    We faced the same problem and I am sorry to say that OBIEE does not support this feature. There is no way to trigger a repository variable refresh from outside OBIEE. In the end we decided to set the refresh interval to 2 mins. This means that when new data is loaded then at most the variables will take 2 mins to refresh. We use repository variables to to store the latest business date our DWH has data for to drive dashboard and reports. Our Init Block query is very quick and while are constantly asking the DB the same query Oracle caches it's results so the bverhead is near to nothing.

  • Retriving a cookie variable in a init block

    Hello
    I configured obiee for sso.
    Here is my instance config:
    <Auth>
    <SSO enabled="false">
    <ParamList>
    <!--IMPERSONATE param is used to get the authenticated user's username and is required -->
    <Param name="IMPERSONATE" source="cookie" nameInSource="SSOUSERNAME"/>
    <Param name="NQ_SESSION.TICKETID" source="cookie" nameInSource="TICKETID"/>
    </ParamList>
    </SSO>
    </Auth>
    Here is my init block in the repository
    SELECT ':USER' FROM dual where obiee_auth_api.validate_and_expire_ticket(':USER', ':NQ_SESSION.TICKETID') = 'Y'
    When I run that, I dont get logged in.
    If I replaced ':NQ_SESSION.TICKETID' by a hard-coded ticket id like 'xxx-xxx-xxx-xxx' it works and I'm logged in.
    So I guess I'm not retrieving the variable value correctly.
    Does someone know how to do that?
    Thanks

    Do the cookie names match exactly with the cookie generated on your system? It is case sensitive.

  • Problem with a initialization block for a repository variable

    This is a very strange problem, some queryies which are issued on behalf of a Repository Variable give a succesfull completion but with 0 rows selected where it should select 1 row.
    I have a query like this
    select var1, var2, var3, var4 from table1
    where var1 = (select max(var1) from table2);
    When i test the query it gives nicely a result 1 row and the repository variables are filled correctly. The initialization block has a schedule so it will run once an hour.
    In the logfile I can see that the query is fired on behalf of my repository variable with a result of 0 rows.
    I thougt i could work around the problem by puttting the query in a view, import this view in my physical layer and do a simpel select var1, var2, var3, var4 from view in the initialization block.
    This still had the same result, testing it works fine I get nicely one record, when it is fired as a result of a schedule it gets a result of 0 rows selected.
    I've tried the query in different formats, the query that i started with was this (see below). When that didn't work i started testing with simplere query's like above
    select var1, var2, var3 , var4 from (
         select var1
         from table2
         where type='x'
    and datum = (select max(var1) from table2 where type='x')
    ) join table2 using (var1)
    Other init blocks work fine. Those init block differ from the one with the problem, they have no join between two tables. The only join I have in one of the working blocks is a join with something from dual.
    The other point is, this init block did work on a previous version of obiee, but after an upgrade it doesn't work anymore.
    The OBIEE version is 10.1.3.4.1.090414.1900
    The database is version 10.2.0.1.0
    I was able to test it myself on a 10.2 database with a 10.1.3.4.0 obiee there it worked fine. Also with 10.1.3.4.1 with a 11g database and that worked ok to.
    Has anybody else stumbeled on this problem and how can i solve it. Also workarounds are welcome. Preferably not changing to a session variable cause in that case i have to change all the reports that use this variable.
    Kind regards,
    Yvon

    Have your DBA put a trace on your OBIEE sessions to see what SQL is OBIEE firing and to confirm the rows do exist. Are you sure this data is always there?

  • Row-Wise GROUP init block isn't creating the variable

    Hi,
    I have an Init Block to set the GROUP variable using row-wise initialization. When I log into Answers with a user, and then check the session variables from Admin Tool, I don't see the GROUP variable anywhere. It seems like the init block is not creating it.
    I have execution precendence set up the way it should be. I have the groups created in both RPD and Presentation Services. Below is my simple query to try to get it to work:
    SELECT 'GROUP', 'OFFICER' FROM DUAL
    UNION ALL
    SELECT 'GROUP', 'SUPERVISOR' FROM DUAL
    Any ideas?
    Thanks
    Edited by: oroborus on Mar 24, 2010 1:25 PM

    Yes I saw the query in the log, it was successful. I added a simple request to a dashboard to display the value of GROUP, and it seems to be working correctly from there. Do the row-wise variables not show up in Admin tool session monitor?

  • Error in repository variables use in initialization blocks on Solaris 64

    Hello,
    I noticed a strange problem on OBIEE 10.1.3.4.1 installed on Solaris 64: it seems that it cannot convert the string 'VALUEOF(+repository variable+)' into the actual value of the parameter.
    For example, this is an initialization block to populate current fiscal project date variables (from NQQuery.log):
    +++Administrator:fffe0000:fffe0c3e:----2010/04/12 12:29:29
    -------------------- An initialization block named 'Current Project Variables', on behalf of a Session Variable, issued the following SQL query:
    select C.MCAL_PERIOD_NAME as MCAL_PERIOD_NAME
    ,C.MCAL_PERIOD as MCAL_PERIOD
    ,C.MCAL_PER_NAME_QTR as MCAL_QTR_NAME
    ,C.MCAL_PER_NAME_YEAR as MCAL_YEAR_NAME
    ,PAGO.MCAL_PERIOD_NAME as MCAL_PERIOD_AGO
    ,QAGO.MCAL_PER_NAME_QTR as MCAL_QTR_AGO
    from
    VALUEOF(OLAPTBO).W_MCAL_PERIOD_D C
    ,VALUEOF(OLAPTBO).W_MCAL_PERIOD_D PAGO
    ,VALUEOF(OLAPTBO).W_MCAL_QTR_D QAGO
    where C.adjustment_period_flg = 'N'
    and C.W_CURRENT_MCAL_PERIOD_CODE = 'Current'
    and C.MCAL_CAL_WID=valueof(NQ_SESSION.MCAL_CAL_WID_PROJ)
    and C.mcal_period_ago_wid= pago.row_wid
    and C.mcal_qtr_ago_wid=qago.row_wid
    and c.mcal_cal_wid= pago.mcal_cal_wid
    and c.mcal_cal_wid=qago.mcal_cal_wid
    Returned 0 rows. Query status: Failure
    As you can see, VALUEOF(OLAPTBO) should be substituted by the repository session variable, but instead it seems that the BI Server simply issues to the database the initialization block statement as-is!
    Any idea?
    Thanks in advance for the help,
    Vincenzo Maggio

    As a test, I tried to add the filter to the individual user first. In the Repository I went under Manage-Identity. Clicked on my User and hit permissions button.
    I created the filter of:
    "Testing and Assessments"."Student SOL Testing"."Teacher Employee Number" = VALUEOF(NQ_SESSION."VAR_EMPLOYEE_NUMBER")
    That didn't work. I still see all data when I log in as that user. If I hard-code it to the users Employee Number (see below), it does work. What now?
    "Testing and Assessments"."Student SOL Testing"."Teacher Employee Number" = '19983758'

Maybe you are looking for