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.  WHERE TO WRITE DBQUERY IN A MAP RULE

    Posted 12/11/09 12:29 PM

    Originally posted by: cse513


    WELL I CREATED A SAMPLE TABLE IN DATABASE WITH 4 FEILDS NOW I AM TRYING TO PULL OUT ONLY 2 FEILDS AS OUTPUT TEXT FILE .

    SO I KNOW IT BY USING DID i can pull the data .

    i want to learn it by using dbquery where should i write the rule in map i should write as function or how?

    i am getting confuesd can help me out.

    i upload the screen so tell me where should i use dbquery and

    please tell me in stepwise pleaseeeeeeeeeeeeeeeeeeeeeeeee
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 2.  Re: WHERE TO WRITE DBQUERY IN A MAP RULE

    Posted 12/11/09 02:15 PM

    Originally posted by: repanzer


    Have you read the docs for DBQuery?

    There are two ways to specify the arguments for DBQUERY. You can use DBQUERY Meaning 1 to execute an SQL statement when you want to look up information in a database using a parameterized query that is based on another value in your data. If your SQL statement is a SELECT statement, the DBQUERY function may be used in conjunction with the RUN function to issue dynamic SELECT statements whose results can be used as input to another map.

    I do not beleive you can use it in a functinoal map call, but I could be wrong. I would have most likley use the MDQ file to build the input type tree to do the select as opposed to doing the select on the fly, but there are many examples in the documemtation for this function.
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 3.  Re: WHERE TO WRITE DBQUERY IN A MAP RULE

    Posted 12/11/09 03:01 PM

    Originally posted by: cse513


    well i can see the 3 ways of using dbquery but i am not understanding we should we use i mean at which point .

    for example for extract function what we wil do we will create a functiontial map ( for example : fun_detail( "some group we will drag ",Extract(we will give the practicalar group ,some condition ))

    hence the extract function is applied

    but now for dbquery where can we apply the rule . in map rule at which postion equal to the items or on the group segemnt ..
    if u have any sample map send me a screen shot or if u have any documentation i mean exampled shown send the link for al these functions please

    i hopw u understand my problm ..

    i want to know where the rule should writen ,

    i know the 3 types of representation but where should i write this rule in functional map equal to segemt of outcard or equal to item of output card
    pleaseee help me out ...

    if u have documentation send me pleaseeeeeeee
    #DataExchange
    #IBMSterlingTransformationExtender
    #IBM-Websphere-Transformation-Extender


  • 4.  Re: WHERE TO WRITE DBQUERY IN A MAP RULE

    Posted 12/11/09 04:30 PM

    Originally posted by: repanzer


    I'm not sure if I understand you exactly, but I'll do my best.

    The example you provided;

    FUN_details(Row:In + DBQUEUEY(SELECT * FROM x , ".MDQ,", Table)

    Maybe it should be

    FUN_details(Row:In , DBQUEUEY(SELECT * FROM x , ".MDQ,", Table))

    My suggestion right now is to build an output card with one field, and you don't even need an input card. Have one field in your output card and test until you get the DBQUERY to work. Once you see it working, you will see what is returned and try to understand how you can implement the command into your code and get the results you want.
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 5.  Re: WHERE TO WRITE DBQUERY IN A MAP RULE

    Posted 12/12/09 09:15 AM

    Originally posted by: rajesh143


    hi ,
    hey thanks for giving me reply .

    well i worked as u said but it is showing sme rule error
    so please help me out please by asking any others help

    i want to know the steps to taken how to use db query in a map rule

    do we have to set the input and output card properties

    or there is no need to set .

    i want to learn how to use db-query in map rule

    and in the same way how to use run command
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 6.  Re: WHERE TO WRITE DBQUERY IN A MAP RULE

    Posted 12/12/09 09:17 AM
      |   view attached

    Originally posted by: rajesh143


    hey well i sending the screen shot once c i try in both ways
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender

    Attachment(s)



  • 7.  Re: WHERE TO WRITE DBQUERY IN A MAP RULE

    Posted 12/12/09 09:30 AM

    Originally posted by: rajesh143


    hi repanzer
    actually this issue is mine only that cse513 is mine i dnnt knoow wat happnd i could not login into that so i created new acount so please help me
    how to use dbquery in map rule

    that rajesh143 is meee only
    waiting for your rpely

    i hope u got me
    #IBMSterlingTransformationExtender
    #DataExchange
    #IBM-Websphere-Transformation-Extender


  • 8.  Re: WHERE TO WRITE DBQUERY IN A MAP RULE

    Posted 12/14/09 06:39 PM

    Originally posted by: SystemAdmin


    the rule looks incorrect in the attachment.
    also note that dbquery/dblookup both return text items....

    change your op TT to a text blob & put the rule as below:
    =VALID(
    DBLOOKUP(
    "Your SQL query","-MDQ MDQ_FILENAME.mdq -DBNAME dbname_in_mdq -T"
    ),
    FAIL(" Error Code: " + LASTERRORCODE() + " Error Message: " + LASTERRORMSG())
    )

    Enable Map audit log.This should work.
    If not it post the .dbl & map audit log file that got created.

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