How to get local values using the API of Java OLAP?

http://download.Oracle.com/docs/CD/E14072_01/OLAP.112/e10794/overview-summary.html#Vals

The third part of a unique value is the local value. In the previous example, the local value is CY2001, which is the identifier for the year 2001 in the overall scheme. Java Oracle OLAP API has the classes and methods that you can use to get the local values of dimension members. See the descriptions of the classes MdmPrimaryDimension and MdmDimensionMemberInfo for more information on the unique values and the.

How to get local values for a dimension or hierarchy or a level using Java OLAP API?

I can not find how...

For example, I would like to get the list of members for each level (in my application: countries, States, cities)

Thanks in advance,
JP

The following code assumes that you have an object MdmPrimaryDimension, dimension and a sense of routine, dumpCursor(), that takes an oracle.olapi.data.Source object.

Find the objects of metadata
Hierarchy of MdmLevelHierarchy = dimension.getDefaultHierarchy ((MdmLevelHierarchy));
MdmAttribute localValue = dimension.getLocalValueAttribute ();
The list of levels of = hierarchy.getLevels ();

Print the members of each level
for (MdmHierarchyLevel level: levels)
{
System.out.println ("Level" + level.getName ());
System.out.println ();
Source querySource = localValue.getSource () .joinHidden (level.getSource ());
dumpCursor (querySource);
}

In general, it is more common to want to print descriptions of members. For this, you can replace

MdmAttribute localValue = dimension.getLocalValueAttribute ();

with

MdmAttribute valueDesc = dimension.getValueDescriptionAttribute ();

How would you say

Source querySource = valueDesc.getSource () .joinHidden (level.getSource ());

For the "description" and "local value".

Source querySource = localValue.getSource () .join (valueDesc.getSource ()) .joinHidden (level.getSource ());

Tags: Business Intelligence

Similar Questions

  • Photography plan Cloud creative student and Teacher Edition (one year) and no idea of how to get and start using the programs?

    So I just brought the creative plan Cloud photography student and Teacher Edition (one year) and no idea of how to get and start using the programs?

    Hello

    Go to creative.adobe.com and you identify with your Adobe ID

    From there, you can download the applications you purchased.

    Normally, you are taken there immediately after the purchase.

  • How to connect from Twitter (using the API of Twitter ME v 1.9)?

    Hello..

    I am doing an application with twitter and I use the API Twitter ME v1.9

    I am already able to post tweet with her... But is it possible to log on to the twitter application?

    Kind regards

    Eric

    Why not.. When you save the access token. You use any file Storetoken.java for the registration of access token. You can have a method to clear the access token...

  • VSM RP2 9.1 how to "Clear" a field using the API

    Hello again,

    I have a simple question. We want to update an entity instance folder of the person with a call to webservice (method PersonUpdate()), our problem is that we sometimes have to empty a field (for example Work'stitle). But it seems not so easy. When we set the value to null or an empty string, the old value is always there that even a space does not remove the value.

    In the Guide of the API (Page 106) in the table in section update person exists for the field 'by default is' Work'stitle -Ok, but how can I delete now a value?

    Thanks in advance

    Just the idea. If to try this day the field as CustomParamData?

    for example

    ...

    Dim _ws_cust_data_list As New List (Of CustomParamData)
    _ws_cust_data_list. Add (New CustomParamData ("TITLE", String.Empty)) '? or function ?

    ...

  • How to get a column using the logical AND operator on two columns?

    All columns are the VARCHAR2 data type.

    I got out of the table in this way:
    col1 col2
    True True
    True false
    False false
    but I want an extra column in this way:
    col1 col2 result
    True True True
    True false false
    Fake fake fake
    as the clear sound output shows this column resut is logical operator AND
    col1 and col2. How to get there?
    WITH t AS
         (SELECT 'True' col1, 'True' col2 FROM DUAL
          UNION ALL
          SELECT 'True' col1, 'False' col2 FROM DUAL
          UNION ALL
          SELECT 'False' col1, 'True' col2 FROM DUAL
          UNION ALL
          SELECT 'False' col1, 'False' col2FROM DUAL)
    SELECT col1,col2,CASE
              WHEN col1 = 'True' AND col2 = 'True'
                 THEN 'True'
              WHEN col1 = 'True' AND col2 = 'False'
                 THEN 'False'
                 WHEN col1 = 'False' AND col2 = 'True'
                 THEN 'False'
              WHEN col1 = 'False' AND col2 = 'False'
                 THEN 'False'
           END AS RESULT
      FROM t
    
  • How to get custom values of the vCenter

    Hi guys

    I need an idea!

    I have for my follow-up to get personalized information about vCenter environment, but are of this info are not in the default CR.

    If my client is a server linux with vSphereCLI installed and the server a W2k8 installed vCenter 4.1.

    My idea was to define a custom on the server vCenter Server attribute and fill it with my technical information.

    Y at - it an option to query this custom value of vCenter, via the CLI from the linux server?

    lusts

    stony007_de

    NP.

    If you find this information useful, please give points to "correct" or "useful".

    =========================================================================

    William Lam

    VMware vExpert 2009,2010

    VMware VCP3, 4

    VMware VCAP4-DCA

    VMware scripts and resources at: http://www.virtuallyghetto.com/

    Twitter: @lamw

    repository scripts vGhetto

    Introduction to the vMA (tips/tricks)

    Getting started with vSphere SDK for Perl

    VMware Code Central - Scripts/code samples for developers and administrators

    VMware developer community

    If you find this information useful, please give points to "correct" or "useful".

  • need help to get the value using the REGEXP_REPLACE function.

    I am trying to extract the value placed between "< listitems >... < / listitems >" but I am unable to get these value using the REGEXP_REPLACE function.
    select REGEXP_REPLACE('<InputParameters></ParamSet><listitems>14545454</listitems></ParamSet></InputParameters>'
    ,'(<InputParameters>.*<listitems>)(.*)(</listitems>.*<InputParameters>)'
    ,'\2') from dual;
    required output:
     1454554
    Can someone please help me achieve this goal.

    Hello

    You forgot the / before the last InputParameters. If fix you that, your code will work.

    Here is a slightly different way:

    SELECT  REGEXP_REPLACE ( '14545454'
                     , '^.*?(.*?).*$'
                     , '\1'
                     )     AS listitems
    FROM    dual
    ;
    

    Least to type, the less likely you will have to make typos.
    If there are 2 (or more) elements of listitmes, 1 will be returned.

    From Oracle 11.1, you can also use REGEXP_SUBSTR. I have Oracle 10.2 avaialable now, so I can test the following, but I think you'd say:

    SELECT  REGEXP_SUBSTR ( '14545454'
                     , '(.*?)'
                     , 1
                     , 1
                     , NULL
                     , 1
                     )     AS listitems
    FROM    dual;
    

    When it comes with the text that is or looks to, XML, consider using XML functions.

  • How to get the role name of the OIM 11 g using the API

    Hello
    I have a scenario in which I create role/group of OIM 11 g & she gets supplied with AD [= works great] & other party it is when I remove role in OIM 11 g then it should
    removed from the AD. I wrote the postprocess event handler to achieve this goal.
    In the authoring part of role I get all the parameters by using "orchestration.getParameters ()"; but when I delete the role then "orchestration.getParameters ();" is empty, so I'm
    Unable to get the name of the role.
    Is there a way to get the role name when you remove roles by using the API?

    Thank you
    Rahul Shah

    Hello

    To implement using pre-wet the handler rather post-processing.

    Kind regards
    Ralu

  • How to feed the DFF using the API fields

    Two new fields are need to be added to the employee assignment staging table to support the new design of the approval.

    So two new fields must be filled in HR Oracle using data in the assignment table.

    -> Finance employee id Manager needs to be filled in the FDF (assignment attribute 1)

    -> The agent code must be entered in the FDF (2 attribute assignment).

    How can I fill these two DFFs using an API. I mean how to feed the fields of DFF using the API?

    Use the API-

    hr_assignment_api.update_emp_asg

    Pass the values for the parameters as needed-

    p_ass_attribute1

    p_ass_attribute2

    See you soon,.

    Vignesh

  • How to associate the data store of the target for the newly created using the API Interface

    How to create a new Interface under project, need to associate the data store target for mappings for the interface by using APIs "."

    Able to get the associated interface created temporary data store. You need to associate a new database model. How to do this using the API

    My code is,

    String pCode = "DEVELOPMENT";
    Context OdiContext = (mgr.getFinder (OdiContext.class)) .findByCode (pCode) (IOdiContextFinder);
    System.out.println (Context.getLastDate ());

    OdiInterface pInterface = new OdiInterface ("toDeleted_Interface", pFolder, context);
    pFolder.addInterface (pInterface);

    The list of ds < DataSet > = pInterface.getDataSets ();
    < DataSet > iterator itr = ds.iterator ();
    DataSet ds_nxt = itr.next ();

    PAlias string = "HRA_TMPL_DEFNS_TL";
    pOrder int = 0;
    OdiModel pModel = (mgr.getFinder (OdiModel.class)) .findByCode ("FILE_PM_MODEL") (IOdiModelFinder);
    String pName = "HRA_TMPL_DEFNS_TL";
    OdiDataStore pUnderlyingOdiDataStore = new OdiDataStore (pModel, pName);
    SourceDataStore pSourceDataStore = new SourceDataStore (ds_nxt, false, pAlias, pOrder, pUnderlyingOdiDataStore);
    ds_nxt.addSourceDataStore (pSourceDataStore);

    TargetDataStore tdata = pInterface.getTargetDataStore ();

    If (tdata.isTemporaryDataStore ())
    {
    }

    http://odiexperts.com/creating-interface-for-single-source-and-target/
    http://odiexperts.com/creating-temporary-interface-using-ODI-SDK/

  • How to use the API of PL/SQL DBFS

    Hi guys,.

    I re-post this question to see if someone can help out me. I'm trying to use the API of PL/SQL DBFS to manipulate the files stored in DBFS.

    Details of the environment:
    Windows 7 or 5.5 OEL (I tried both platforms)
    Database: Oracle DB EE 11.2.0.2
    IDE: SQLDeveloper on Windows 7

    I have two users, DBFS_USER, who is the shop owner DBFS and MYUSER that connects to the store to manipulate files using the API of PL/SQL DBFS.

    Creation scripts:
    -----------------
    Connect / as sysdba;

    Dbfs_ts CREATE TABLESPACE DATAFILE 'D:\oracle\oradata\orcl\dbfs01.dbf' SIZE 1 M AUTOEXTEND ON NEXT 1 M;

    -create users
    create dbfs_user user identified by dbfs_user quota default tablespace unlimited dbfs_ts on dbfs_ts;
    create myuser identified by myuser;

    -grant the role
    GRANT RESOURCES, CREATE VIEW, CREATE SESSION, DBFS_ROLE, CREATE TABLE TO dbfs_user.
    GRANT RESOURCES, CREATE VIEW, CREATE SESSION, DBFS_ROLE, CREATE TABLE TO myuser.

    -create a filesystem (such as DBFS_USER)
    connect dbfs_user/dbfs_user;

    exec dbms_dbfs_sfs.createFilesystem ('STAGING_AREA_FS');

    exec dbms_dbfs_content.registerStore ('STAGING_AREA_FS', 'posix', 'DBMS_DBFS_SFS');

    dbms_dbfs_content.mountStore exec ('STAGING_AREA_FS', 'staging_area');

    commit;

    -export store STAGING_AREA_FS (as DBFS_USER)

    exec dbms_dbfs_sfs.exportFilesystem ('STAGING_AREA_FS');

    -Check the names of table (like MYUSER)
    connect myuser/myuser;

    -He can't see (without brackets)
    Select * from table (dbms_dbfs_content.listMounts);

    -Note at the bottom of the table table_name
    Select * from table (dbms_dbfs_sfs.listTables);

    -Mount as MYUSER (example with SFS table_name $ _FST_32)
    dbms_dbfs_sfs.registerFilesystem exec ('MYUSER_FS', 'DBFS_USER', ' FS$ _FST_32');

    exec dbms_dbfs_content.registerStore ('MYUSER_FS', 'posix', 'DBMS_DBFS_SFS');

    dbms_dbfs_content.mountStore exec ('MYUSER_FS', 'staging_area');

    commit;

    -verification of Mount (like MYUSER)

    Select * from table (dbms_dbfs_content.listMounts);

    Select the path in dbfs_content;


    CREATE a STORED PROC (like MYUSER)
    ----------------------------

    CREATE OR REPLACE PACKAGE MYUSER_PKG

    CreateDirectory function
    (P_File_Path IN VARCHAR2,
    P_ErrMsg OUT VARCHAR2)
    return number;

    END MYUSER_PKG;

    /


    CREATE OR REPLACE PACKAGE BODY MYUSER_PKG

    CreateDirectory function
    (P_File_Path IN VARCHAR2,
    P_ErrMsg OUT VARCHAR2)
    Return number
    IS
    l_Return NUMBER;
    l_props DBMS_DBFS_CONTENT. PROPERTIES_T;
    BEGIN
    l_Return: = 0;

    () DBMS_DBFS_CONTENT.createDirectory
    path = > P_File_Path,
    Properties = > l_props);

    RETURN l_Return;
    EXCEPTION
    WHILE OTHERS THEN
    l_Return: = NVL (SQLCODE,-1);
    P_ErrMsg: = SQLERRM;
    RETURN l_Return;
    CreateDirectory END;

    END MYUSER_PKG;

    /

    When you compile the package, I get this error:
    Error (9,11): PLS-00201: identifier 'DBMS_DBFS_CONTENT' must be declared
    Error (9,11): PL/SQL: ignored element
    Error (13.3): PL/SQL: statement ignored
    Error (15,19): PLS-00320: the declaration of the type of the expression is incomplete or incorrect

    How can I solve the problem in the error message? I'm not an expert in DB. I used this reference documentation: http://download.oracle.com/docs/cd/E11882_01/appdev.112/e18294/adlob_client.htm#CIHDEJAA

    Thanks in advance.

    CAPPA

    You must directly grant the privileges of DBFS_ROLE because roles are not enabled in stored PL/SQL:

    SQL> select* from v$version;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE    11.2.0.2.0      Production
    TNS for Solaris: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production
    
    SQL> show user
    USER is "SYS"
    SQL>
    SQL> create user myuser identified by myuser;
    
    User created.
    
    SQL> GRANT CREATE SESSION, RESOURCE, CREATE VIEW, DBFS_ROLE, CREATE TABLE TO myuser;
    
    Grant succeeded.
    
    SQL>
    SQL> begin
      2  for x in (select privilege, table_name
      3           from dba_tab_privs
      4           where grantee='DBFS_ROLE')
      5  loop
      6   execute immediate 'grant ' || x.privilege || ' on ' || x.table_name
      7   || ' to myuser ';
      8  end loop;
      9  end;
     10  /
    begin
    *
    ERROR at line 1:
    ORA-22812: cannot reference nested table column's storage table
    ORA-06512: at line 6
    
    SQL>
    SQL> connect myuser/myuser
    Connected.
    SQL>
    SQL> CREATE OR REPLACE PACKAGE MYUSER_PKG IS
      2  Function CreateDirectory
      3  (P_File_Path IN VARCHAR2,
      4  P_ErrMsg OUT VARCHAR2)
      5  return Number;
      6  END MYUSER_PKG ;
      7  /
    
    Package created.
    
    SQL> show errors
    No errors.
    SQL>
    SQL> CREATE OR REPLACE PACKAGE BODY MYUSER_PKG  IS
      2  Function CreateDirectory
      3  (P_File_Path IN VARCHAR2,
      4  P_ErrMsg OUT VARCHAR2)
      5  return Number
      6  IS
      7  l_Return NUMBER;
      8  l_props DBMS_DBFS_CONTENT.PROPERTIES_T;
      9  BEGIN
     10  l_Return := 0;
     11  DBMS_DBFS_CONTENT.createDirectory (
     12  path => P_File_Path,
     13  properties => l_props);
     14  RETURN l_Return;
     15  EXCEPTION
     16  WHEN OTHERS THEN
     17  l_Return := NVL(SQLCODE, -1);
     18  P_ErrMsg := SQLERRM;
     19  RETURN l_Return;
     20  END CreateDirectory;
     21  END MYUSER_PKG ;
     22  /
    
    Package body created.
    
    SQL> show errors
    No errors.
    

    You should check why some GRANT statement fails if you have another problem with the other piece of code.

  • How can we add lines by using the APIs in the Apex?

    Hi all

    In my application, I created the elements of text using the API like this:

    HTP.p ('< tr >');
    HTP.p ("< td width = 80px align =" center"> < b > ');
    HTP.p ("font color =" black"> ');
    HTP.p (APEX_ITEM. Text(1,c.empno,10,30,"','','"f01_'|| j||'"'));
    HTP.p ("< /b > < table > '");

    Now, I need to add a line button when you click on to insert a new row so that it can enter data...

    How do I do this?

    Thank you
    David...

    David,

    If the EMPNO is your primary key column, it cannot be changed. The update process identifies the line updated by EMPNO. If you want to allow users to change the EMPNO value, you will need to add another column to your tabular form that is used to store the primary key. In general, the primary key values must be meaningless, should not be exposed to the end user and only used for internal processing.

    Kind regards
    Marc

  • How can I get Mozilla to use the name of the page for the name of the real instead of the URL bookmark when I bookmark a page

    I just noticed that (in comparison to Internet Explorer): in IE, when you preferred a Web page, it uses the actual name of the Web page (for example, for this page, it would be "Ask a Question Firefox Help" as the name of the bookmark), but in Mozilla, it uses the URL as the name of the bookmark. I was wondering if it was possible to change my Mozilla settings so that it uses the name of the Web page as the bookmark name instead of the URL? I hope that everyone understands what I am getting? If anyone can help me, I would really appreciate it. Thank you.

    Firefox uses the tag title for the name of the newly saved bookmark.

    When I bookmark on this forum page I get this for the 'name' of the bookmark.

    How can I get Mozilla to use the name of the page for the name of the real instead of the URL bookmark when I bookmark a page | Firefox Support Forum | Firefox help

  • How to create VI execution asynchronous step using the API

    I want to create a "run way asynchronous step VI" using the API TestStand in LabVIEW.

    Navigation on the details of the step and the properties of the object, apparently, that it is a type of 'special' step that is actually a SequenceCall.  However, I don't see how to access the data contained in this type of step.  I enclose my current VI used to 'Browse' the data for reference.

    Please advise on how to create this step.

    Thank you

    Hey LVB,

    I'm sorry, I didn't know that you always wanted to use the "Use the Prototype sequence" checkbox option.  In this case the attached code should demonstrate how this can be accomplished.

    Thank you

  • How to get a program all the list of the names of the values in a registry key?

    Hello

    How to get a program all the list of the names of the values in a key of windows registry without having to configure the number of values in the key?

    Thank you & best regards

    Samuel J

    Hi Samuel,.

    you will get this info from "Query registry key Info.vi".

    Mike

Maybe you are looking for