IBM Sterling Transformation Extender

Sterling Transformation Extender

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

 View Only
  • 1.  ITX Get Function Not returning Data from Mongo Collection

    Posted Wed May 26, 2021 07:29 PM
    Hi ,

    I am trying to Query MongoDB in a Rule

    =PARSE(GET("MongoDB"," -HOST mongodb://<user>:<password>@MongoHost1.corp.com,MongoHost2.corp.com/?replicaSet=DEV01&readPreference=primary&connectTimeoutMS=10000&authSource=$external&authMechanism=PLAIN -DATABASE APDB -COLLECTION Header -QUERY '{""HeaderId"": ""TEST-6100826920""}' -TV"))

    but the rule is not retuning and result, i see data is available and able to query the same using MongoDB Client software.

    the Map runs Successfully , it does not fail and No Error in Trace and Audit log files.


    ------------------------------
    Narendra Chimakurthi
    ------------------------------

    #IBMSterlingTransformationExtender
    #DataExchange


  • 2.  RE: ITX Get Function Not returning Data from Mongo Collection

    Posted Fri May 28, 2021 06:12 AM
    It is likely your PARSE() is failing.  Try the rule without this (change the Typetree object to a text blob) and see if you get a result then.

    ------------------------------
    Paul Brett
     
    IBM Sterling Transformation Extender (ITX) Client Support
    ------------------------------



  • 3.  RE: ITX Get Function Not returning Data from Mongo Collection

    Posted Sat May 29, 2021 12:45 AM
    Edited by System Admin Mon July 24, 2023 03:50 PM
    We came to know it is issue with Adapter Alias in Get Function  , it should be "MONGO"   instead of "MongoDB" , after changing the Adapter Alias we were able to retrieve the data correctly.

    But once we retrieved the data and assigning it to JSON (Schema generated with Sample data) Output Card it is failing 

    (Offset 0: Map Number 0 (SFC_PeopleSoft_Voucher_Inv), DI 000000000000:)
    Building TYPE X'0006' (JSON JSON).

    (Level 1: Offset 0, len 0, comp 1 of 0, #1, DI 000000000001:)
    Start of Parse of output TYPE X'0006' (JSON JSON).

    (Level 1: Offset 0, len 0, comp 1 of 0, #1, DI 000000000001:)
    External Parser returned Error:
    TYPE X'10000' (Invalid Element as root).

    (Level 1: Offset 0, len 0, comp 1 of 0, #1, DI 000000000001:)
    Data at offset 0 ('[<LF>{ "PartnerI') was found to be of TYPE
    X'0006' (JSON JSON).

    (Level 1: Offset 0, len 0, comp 1 of 0, #1, DI 000000000002:)
    End of Parse of output TYPE X'0006' (JSON JSON).



    ------------------------------
    Narendra Chimakurthi
    ------------------------------