Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

List of Repository Variables

Received Response
1
Views
7
Comments
user9255588
user9255588 Rank 1 - Community Starter

Hello Everyone,

Is it possible to create a report in BI analytics to list all the repository variables ? If so Please let me know or shower some ideas on how to get a list of repository variables.

Thanks,

Ary

Answers

  • Hi,

    Have a look at OBIEE SampleApp , it has an analysis showing variables. Can't remember if it's session or repository variables (or both probably).

    It uses the "issue SQL" page to call a NQS function returning the list of variables defined in the RPD.

    So you can use that way of doing things.

    Same thing is by calling the executeSQLQuery method of the XML View webservice, it's the same exact thing and you will execute the same exact query to get the XML back.

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    As Gianni said there's a script in the SampleApp which basically does this:

    call NQSQueryMetadataObjects('3031',...)

    Just search the VM for listRepVars.js and then call it from a text dashboard object like showcased in the "Admin Features" dashboard, "More Variables" page.

  • user9255588
    user9255588 Rank 1 - Community Starter

    Thanks for the reply. I followed instructions as provided. I deployed listRepVars.js file and created text box in dashboard. When i run the dashboard all I see is the empty table structure for statics and repository variables without any content in it. Please help where i did mistake.

  • user9255588
    user9255588 Rank 1 - Community Starter

    I am using below code in the text box.

    <html>

    <head>

      <script src='/analyticsRes/CustomApp/customjs/listRepVars.js'></script>

      <style>

    table.ma_toc tr:hover td{

    background-color: #DEEEFE;

    }  </style>

    </head>

    <body>

      <h3>Static Variables</h3>

      <table id='staticVars' class='ma_toc' width="900px" cellpadding="2px" border="1px" bordercolor="#e2e2e2" style="border-collapse:collapse;font-family: Arial;font-size: 12px">

       <tr style="background-color:#e1e1e1" align="left"><th><b>Name</b></th><th><b>Current Value</b></th></tr>

      </table>

      <br/>

      <h3>Session Variables</h3>

      <table id='sessionVars' class='ma_toc' width="900px" cellpadding="2px" border="1px" bordercolor="#e2e2e2" style="border-collapse:collapse;font-family: Arial;font-size: 12px;">

       <tr style="background-color:#e1e1e1" align="left"><th><b>Name</b></th><th><b>Init Block</b></th><th width=110><b>Var Type</b></th><th><b>Current Value</b></th></tr>

      </table>

      <script>listRepVariables();</script>

    </body>

    </html>

  • Did you looked at what was written in SampleApp and looked how the code they had in their page and looked at the script itself?

    The idea of the script is to use javascript to send a request to the "Issue SQL" page you find in "Administration". The query will be the "call NQS..." which return some XML (you can run it by hand there and see the result). The script will then parse the output to get the list of variables and finally display them.

    So if you don't see anything start debugging.

    It's javascript, which means you have lot of chances you have an issue there, open the developer toolbar of your browser and look at what happen. Is the JS loaded? Is the query sent to the "Issue SQL" page? Does this page return something? Is this "something" parsed into something else? etc.

    Of course if you don't have the permission to open and use the "Issue SQL" page do not even try to use the script: it will not bypass any security, if you aren't allowed it will fail.

  • user9255588 wrote: <script src='/analyticsRes/CustomApp/customjs/listRepVars.js'></script>

    So I assume you deployed analyticsRes and there inside created a "CustomApp" folder with another folder inside named "customjs" and placed "listRepVars.js" there inside?

    Do not copy things randomly but first look and try to understand what will happen and how things are supposed to work.

    There isn't any simple out of the box way to list variables, it's a totally custom developed things. So you must understand the concept of how it will work (and why it will work) and then implement it based on your system.

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    +1 to Gianni it's all about file placement. My custom JS are normally in /mydeployment/customJS right next to /mydeployment/customMessages

    So the line would read   <script src='/mydeployment/customJS/listRepVars.js'></script>