Complete API in Groovy

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

    • Complete API in Groovy

      Hello all,

      does somebody know when the complete API will be available in Groovy components ?

      Actually I'm a bit tired of using several component just to get the parent of an element... For instance if I want to get the parent of an element I extract the dimension and lookup on this extract. That is exactly what the PALO.EPARENT function does.

      Or is there a solution that I am missing ?

      Thanks in advance,

      Cheers,
      laloune

      Post hoc, non est propter hoc
    • You could already use the Java client libs (palojlib) in a Groovy script, but it includes several steps: Opening the connection, reading database, dimension and elements.... Check the javadoc for palojlib to get more details. In Groovy-Jobs this may be reasonable but in Groovy-Functions it's more tricky: Performance will be poor if you have a high number of rows/elements, as individual Olap-requests are necessary for each row.
      So, a lookup-function is currently the best way, also from a performance point of view.

      And concerning your first question: It's not yet clear if/when and it which form Olap-requests will be part of ETL Script-API in future releases.
      What kind of Olap-API calls would you like to have in a Script-API? In Functions and in Jobs?
    • Hello Andreas and thanks for your response !

      a_froehlich wrote:

      You could already use the Java client libs (palojlib) in a Groovy script, but it includes several steps: Opening the connection, reading database, dimension and elements.... Check the javadoc for palojlib to get more details. In Groovy-Jobs this may be reasonable but in Groovy-Functions it's more tricky: Performance will be poor if you have a high number of rows/elements, as individual Olap-requests are necessary for each row. So, a lookup-function is currently the best way, also from a performance point of view.


      I fully agree with that, but the problem is that when you want to use matrix function (like palo_element_list_children for instance) you cannot.


      a_froehlich wrote:

      And concerning your first question: It's not yet clear if/when and it which form Olap-requests will be part of ETL Script-API in future releases.
      What kind of Olap-API calls would you like to have in a Script-API? In Functions and in Jobs?


      actually all the Olap-API :)

      for instance OLAP.setdata, cause if you want to write in a cell (e.g. writing a run date) you have to go through 2 or 3 steps in ETL (Count, Transform, Load). This would be useful to do that within a groovy statement

      cheers
      laloune

      Post hoc, non est propter hoc