IBM Sterling Transformation Extender

Sterling Transformation Extender

Come for answers, stay for best practices. All we're missing is you.


#Sterling
#Supplychain
 View Only
  • 1.  Help with database map

    Posted 03/20/07 11:53 AM

    Originally posted by: fwellers


    This should be easy but I can't figure it out. Believe me I've been trying for weeks.

    I have to pull data from one database table to another, making changes and selecting certain records.
    I have a map that collects from the table level on the input, maps the row to a functional map, and the functional map maps each row with whatever rules I want.

    The wall I'm hitting is this : When the program runs in production I'm not going to know the name of the source table beforehand, so I have to have a way to somehow pass the tablename into the map at runtime.

    My map is currently using an mdq file that contains the query I need to run.

    Any advice would be greatly appreciated.

    Thanks.

    ps. this is Mercator 6.7 running on Windows XP, but will eventually be compiled for Aix 5.3, and connects to an Informix 10 instance.

    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: Help with database map

    Posted 03/21/07 08:03 PM

    Originally posted by: SystemAdmin


    You have to do this in two separate ways for input and output.

    For the input you need to use variables with a GET function. For the output you need to use the -TABLE command with a PUT function.

    You can set variables up in the Database Interface Designer. So my query looks like this:

    select * from #testvar#

    and my card command looks like this:

    -USER xxxx -PW xxxx -VAR testvar=products -T+

    where products is the name of the table.

    Now for you want to do you will need to put this command in a GET function and replace products with whatever value you get at runtime.

    For the output you will need to use the -TABLE command. The command will look like this:

    -USER xxxx -PW xxxx -TABLE products -T+

    Again, you will need to retrofit this into a PUT command and replace products with whatever you get at runtime.

    It is doable.

    Yvonne Ricard
    Resistance is NOT futile.
    #DataExchange
    #IBM-Websphere-Transformation-Extender
    #IBMSterlingTransformationExtender


  • 3.  Re: Help with database map

    Posted 03/23/07 07:21 PM
      |   view attached

    Originally posted by: SystemAdmin


    After more thought, I realize you have to do this with a RUN map. This gives you more flexibility too if you have different mappings for different input tables because based on that input you can run different maps. Attached is a small test that uses an SQLServer database. The type of database should not matter.

    The mdq has been modified for security.

    This example only has the input side of my answer previously.

    Yvonne Ricard
    Resistance is NOT futile.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender

    Attachment(s)