4 Replies Latest reply on Oct 20, 2006 11:21 AM by 436342

    Calculation in mapping


      I want to perform a simple transfomation;
      Source application has a field AMOUNT, value in euro's
      We need to transform this value to the destinition application in cents

      How can we perform AMOUNT-destination=AMOUNT-source*100
        • 1. Re: Calculation in mapping
          There is custom trasformation named "Multiply".
          It isn't added to standard trasformations for some reason...

          Mapping Parameters -> Custom Transformations -> Add -> <IC_Home>\integration\interconnect\istudio\Multiply.tdf -> Ok

          Than use it
          • 2. Re: Calculation in mapping
            Hi ,
            Thanks for this tip, I didn't know about the examples of the custom transformations.

            It works, but raises new questions to me:
            How do they work?
            I opened the tdf-files and for example the multiplier is written as:

            description=Multiplies two in fields or an in field and a constant
            number types=1
            param0 name=constant
            param0 option=+

            Where in this file the multiply action is stated? How does interconnect know what to do? I expected that the package and class field had to be filled before a custom transformation could work. and that the package and class are java written functions/applications.
            Maybe Multiply is a reserved word which is a standard function within interconnect that can be used in standard transformations.

            What are the functions that are available to use in my own custom transformations, without coding in java???
            Is there documentation on this?

            • 3. Re: Calculation in mapping
              A small investigation indicate that Multiply is realized class in oai.jar lib.

              Package name is not needed because all libraries with custom transformations must be added to classpath in istudio.bat. And of course oai.jar is there as one of the core IC libraries.
              As for class name - I think if "class" atribute is ommited it takes class name from "name" attribute...
              • 4. Re: Calculation in mapping
                You can quite easily write your own java code that does the custom transformation. Compile the code, add it to the UserDefinedTransformation.jar, this gets included in the classpath of the adapter so that it can be used at runtime.

                You then need a .tdf file placed in the iStudio directroy which defines the input parameters that are captured at design time by iStudio.