I have an Amazon RDS database set up that stores my data. I want to pull data from RDS into Kore to display the information in the form of a few graphs. Is there a document that can help me integrate RDS with Kore? It will use a SQL query to pull the data from RDS. I have developed the code below that should create a connection with RDS. Not sure how can this be implemented in Kore through a Service Request.
import groovy.json.JsonOutput
import groovy.json.JsonSlurper
import java.sql.ResultSet;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.Connection;
import java.sql.DriverManager;
ResultSet rs = null;
Class.forName("com.mysql.jdbc.Driver");
String url = "rds_database_endpoint";
Connection con = DriverManager.getConnection(url,"database_username","database_password");
println("Connection is"+con.toString())
String query = 'sql_query'';
PreparedStatement statement = con.prepareStatement(query);
rs = statement.executeQuery();