Planning Analytics

 View Only
  • 1.  Bug in hierarchy build

    Posted Thu February 20, 2020 02:00 PM

    I have a case where I insert an element using HierarchyElementInsert, and I can prove from asciiouput that the type being passed in to HierarchyElementInsert is C for Consol.

    The Element in this case does not have any child elements linked to it.

    When I run the process I get the following

    Error: MetaData procedure line (0): Insertion of leaf "X013A009" into hierarchy "N_UCoA_Programme_Origin:Control_Budget_Hier" failed because a consolidated element by that name already exists in the dimension.

    It would appear that, even though the element is inserted as a C, that the compilation of the hierarchy that occurs at the end of the MetaData tab is deciding that, because the element has no children, it should be inserted as an N, leaf level element, rather than as the C consolidated element that it was told to do. As the element already appears as a consol in another hierarchy, in this case the Classic or Default Hierarchy, then an error occurs.

    For the moment we have worked around this by modifying our SQL query so that childless consols never appear in the source. However, this might not be acceptable in every case. 

    We are on PA 2.0.5

    ------------------------------
    Paul Simon
    ------------------------------

    #PlanningAnalyticswithWatson


  • 2.  RE: Bug in hierarchy build

    Posted Tue March 03, 2020 11:28 AM
    Further information

    This is the code


      IF( vDebug > 0 ) ;  
        IF( vChild @= 'X084A346' ) ; 
          asciioutput( vDebugPathFileMetaData , vTargetDim , vHier , vChild, vChildElemType , NumberToString( vBase0ParentLevelNum ) ) ;
        ENDIF ;
      ENDIF ;
    
      HierarchyElementInsert( vTargetDim , vHier , '' , vChild , vChildElemType  ) ;
    ​

    This is giving this output:

    "N_UCoA_Programme_Origin","Control_Budget_Hier","X084A346","c","2"

    Which proves that I am trying to insert the Element as a Consolidation.

    However, I am getting the error 

    Error: MetaData procedure line (0): Insertion of leaf "X084A346" into hierarchy "N_UCoA_Programme_Origin:Control_Budget_Hier" failed because a consolidated element by that name already exists in the dimension.

    Which proves that PA is deciding to try to insert the element as an N level instead of the C level that I requested.

    This is clearly a bug. If this is not the right place to report a bug, please let me know where it should be reported.

    ------------------------------
    Paul Simon
    ------------------------------



  • 3.  RE: Bug in hierarchy build

    Posted Tue March 03, 2020 12:36 PM
    Can you log a ticket with your information?

    Customer Success Portal

    https://www.ibm.com/mysupport



    ------------------------------
    paul YOUNG
    ------------------------------



  • 4.  RE: Bug in hierarchy build

    Posted Tue March 03, 2020 12:40 PM
    Hi Paul

    Just tried that. Clicked Open Support case and got

    Yikes - we didn't catch all of that.
    Something went wrong someplace.​


    ------------------------------
    Paul Simon
    ------------------------------



  • 5.  RE: Bug in hierarchy build

    Posted Tue March 03, 2020 12:38 PM
    I tracked the problem down to the earlier issue of PA putting Consols with no children into the Leaves hierarchy. The following code is a workaround for this issue

      IF( vChildElemType @= 'C' ) ;
        IF( HierarchyElementExists( vTargetDim , 'Leaves' , vChild ) = 1 ) ;
          HierarchyElementDeleteDirect( vTargetDim , 'Leaves' , vChild ) ;
        ENDIF ;
      ENDIF ;
    
      HierarchyElementInsert( vTargetDim , vHier , '' , vChild , vChildElemType  ) ;
    ​


    ------------------------------
    Paul Simon
    ------------------------------