Add Elements with user define identifier

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • Add Elements with user define identifier

    I am creating cube using palo jar files.
    I have a hierarchy like

    - child1
    - child2

    when I am creating this Dimension using :


    element Identifiers for each element are get created by server (sequence start with zero)

    i want to pass user define Identifier for each element with http requst.
    (same as like adding palo rule parameter with "&external_identifier=" and "&use_identifier=" )

    is there any way to do this.. please suggest..

    I have also seen in server(c++) code that by default constant value is passed while adding element :

    // in paloCommands.h

    Source Code

    1. #line 22 "PaloCommands.gperf"
    2. {"external_identifier", palo::PaloRequestHandler::CMD_EXTERNAL_IDENTIFIER},

    // in create element job file

    Source Code

    1. // create element
    2. element = dimension->addElement(server, database, NO_IDENTIFIER, name, elementType, user, true);

    // in Dimension file

    Source Code

    1. if (idElement != NO_IDENTIFIER) {
    2. element.setIdentifier(idElement);
    3. }

    it means this can be done using http request.. please suggest me how can i achieve this ?
    do i need to change server code also?
  • hi,
    no this is not possible id is internal thing and is under control of the OLAP itself. If you want for some reasons to element with specific ID, just clear the dimensions and build elements one by one in the order you want.
    Attribute that is designed to be a public is called "position" and it controls functions like EPREV ENEXT and define order of element for presentation in UI. It is independent on Id that is used internally.
    After creation elements get positions in the same order as ID, later you can change them using function /element/move
    there are some equivalents in libraries.

  • Hi jjunek,

    Its done!!! 8o

    I build the server with changes as mention in my original post...
    Its working.. now I can create the dimension elements with user define identifier...
    Thanks for your suggestion.
    I create the dimension elements in the order as like pre-order hierarchy traversal.

    Now I can create empty cube.