One Star

How to call SP in amazon aurora database in Talend

Hi ,
Is there any sp like tmysqlSp for amazon aurora???
if not then what is the alternative ?
note : I need to use an existing connection ( that is tamazonAuroraConnection) for calling SP so that i can rollback.

  • Data Integration
2 REPLIES
Seventeen Stars

Re: How to call SP in amazon aurora database in Talend

Currently you can only do this task with pure Java code in a tJava component.
Here an idea (not complete or tested but it gives you an idea).
try {
  java.sql.Connection conn = (java.sql.Connection) globalMap.get("conn_tAmazonAuroraConnection_1");
  java.sql.Statement stat = conn.createStatement();
  String sql = "select my_proc()";
  stat.execute(sql);
  stat.close();
} catch (java.sql.SQLException sqle) {
  globalMap.put("ERROR_MESSAGE", sqle.getMessage());
  throw sqle;
}

You have to change the unique id of the connection in the first line and the sql code of the procedure call.
One Star

Re: How to call SP in amazon aurora database in Talend

Thank you so much jlolling.  Yes it gave me an idea.