IBM Sterling Transformation Extender

Sterling Transformation Extender

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

 View Only
  • 1.  JDBC adapter in ITX

    Posted 7 days ago

    Hi,

    I am getting error and in somecases trace file not even getting generated while i am using the below query. i am using oracle jdbc driver to connect.

    GET("JDBC","-URL <URL> -USER <id> -PASSWORD <pwd> -TV -AS 0 -QTY * -LSN 0 -QUERY 'select * from employee where employeeid='1' ' ")

    select * from employee where employeeid='1'

    no trace is being generated for the above query and when i have changed the query by removing single quote like below then getting error as "missing expression".

    select * from employee where employeeid=1

    same type of issues for the below query as well. its not able to recognize %

    select * from employee where employeename like 'A%'

    is there any way to resolve this?

    Thanks

    Santanu



    ------------------------------
    Santanu Baral
    ------------------------------


  • 2.  RE: JDBC adapter in ITX

    Posted 7 days ago

    This is what I used for mysql database.

    =PARSE(VALID(GET("JDBC","-URL jdbc:mysql://testserver:3306/testdb?verifyServerCertificate=false&useSSL=false&serverTimezone=UTC -USR testuser -PWD testpassword -QRY ""SELECT c1,c2,c3 FROM testtable WHERE c1=?"" -TV m4jdbc.mtr -QTY 1 -LSN 0 -AS 0",PACKAGE(InputParams:TargetTableKeys)),FAIL(LASTERRORMSG())))

    I suggest not using % to start with and get the syntax working first. The URL probably is different from yours.  Look for the trace file (m4jdbc.mtr) to see if it can help.



    ------------------------------
    Rex Chan
    ------------------------------



  • 3.  RE: JDBC adapter in ITX

    Posted 4 days ago

    Thanks Rex

    replacing single quote with double quote works for simple conditions but still not recognizing wild character like %.

    Thanks for your help



    ------------------------------
    Santanu Baral
    ------------------------------



  • 4.  RE: JDBC adapter in ITX

    Posted 4 days ago

    This one works (the URL has changed to a different DB but the important thing is the SQL Stmt).

    =PARSE(VALID(GET("JDBC","-URL jdbc:sqlserver://localhost:1433;databaseName=support;user=sa;password=SQLadmin1;encrypt=true;trustServerCertificate=true -QRY ""select Id,Value from dbo.ReportMetadata where Value like 'v%'"" -TV+ m4jdbc.mtr ",PACKAGE(InputParams:TargetTableKeys)),FAIL(LASTERRORMSG())))



    ------------------------------
    Rex Chan
    ------------------------------



  • 5.  RE: JDBC adapter in ITX

    Posted 5 hours ago
    Can we reuse one JDBC connection to run multiple SQL statements in an ITX Map?
     
    The requirement is to first run a select query. Based on the results of this query and the source input, we need to insert several entries into a table. Once these inserts are completed, we must update the status in another table.


    ------------------------------
    Akhi Singh
    ------------------------------