Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: user defined function, help...

  1. #1
    Join Date
    Feb 2007

    Default user defined function, help...

    Hi, i am novice to user defined function

    I wish to implement a user defined function wich returns a value, in function of the current measure and a particular dimension member.

    for example to contact the measure and the member values.
    this is only a simple example, i need a user defined function as i need a lot of calculations to do this concatenation.



  2. #2
    Join Date
    Jun 2007


    Hi Sandro,

    I had to make some simple user defined functions and I made up this document so I could remember what I did. I'm not a java expert, but it might be of some help.

    I didn't completely understand your use case, but it might be that a calculated member is what you need instead of a user defined function. You might try something like this in your MDX query editor:

    with member [Measures].[Concat] as '[Foo].CurrentMember.Name || Cast([Foo].CurrentMember.Value as String)'
    select NON EMPTY {[Measures].[Concat]} ON COLUMNS,
    NON EMPTY [Foo].Children ON ROWS
    from [CubeName]

    Be aware that Mondrian use || as the concatenation operator instead of +.

    Good luck!
    Attached Files Attached Files
    Last edited by Nathan; 03-05-2008 at 01:43 PM.

  3. #3
    Join Date
    Feb 2007


    I can best explain you...

    "Concat" is only a simple example, i need a user defined function with takes a current member dimension and the assoicated measure value as inputs.
    Then it looks in the database for some tuples associated to the member and finally using these tuples attributes makes calculation and returns the derived measure value

    So i need only the skeleton of a user defined function which takes as input a dimension member and a measure value, and return a String

    then, i will implement the logic of the function

    Thanks a lot...


  4. #4
    Join Date
    Feb 2007

    Default where put the .class file ?


    I haveinstalled Jpivot. I have defined a user defiend class.
    I whish to know where i have to put the .class file (what directory)



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.