Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear all,
i am using Talend 6.3. i have a Tjava component. in this i execute a command and get result data into
ResultSetMetaData :
//Executing SQL query and fetching the result
Statement st = conn.createStatement();
String sqlStr = context.v_command;
ResultSet rs = st.executeQuery(sqlStr);
ResultSetMetaData rsmd = rs.getMetaData();
And i want also export it to a 1 file excel .
Please give me advise.
Thank you very much!
Hi
ResultSetMetaData is an object that can be used to get information about the types and properties of the columns in a ResultSet object. What data do you want to export to a file? column types or column names?
If you want to export a string data to a file, build the string on tJava, store the string to a global variable or context variable for used later. In next subjob, get the string data and output it to a file. eg:
tJava
|onsubjobok
tFixedFlowInput--main--tFileOutputExcel
Regards
Shong