Need help saving Query Results to .csv file automatically daily using RTC java api
Problem: I need the write java code to find my RTC query, run my RTC query, save my RTC query results to a .csv file automatically/daily using a windows scheduler
I have been working on my classes to extend RTC in java and I have this code:
while (resolvedResults.hasNext(monitor)) {
IResolvedResult result = resolvedResults.next(monitor);
IWorkItem workItem = (IWorkItem)result.getItem();
// do something with the work item<---- I am trying to figure out what should go here in order to save my data to csv file. I am sort of new or getting back into Java coding so any help would be appreciated
processed++;
}
So basically i need it to do the file-->export--> choose query-->choose csv file automatically/daily through the api and a windows scheduler
I have been working on my classes to extend RTC in java and I have this code:
while (resolvedResults.hasNext(monitor)) {
IResolvedResult result = resolvedResults.next(monitor);
IWorkItem workItem = (IWorkItem)result.getItem();
// do something with the work item<---- I am trying to figure out what should go here in order to save my data to csv file. I am sort of new or getting back into Java coding so any help would be appreciated
processed++;
}
So basically i need it to do the file-->export--> choose query-->choose csv file automatically/daily through the api and a windows scheduler
One answer
well, I can't help with the CSV part, altho there are csv reader/writer classes available as opensource..
but here is my sample pgm, which executes a named query and then displays all the workitem attributes.
see the accepted answer here
https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes
note that the forum messes with text case, quotes etc.. so there will be a few errors to correct after you cut/paste the code into eclipse.
takes 4 parms
server/ccm
userid
password
query to execute
but here is my sample pgm, which executes a named query and then displays all the workitem attributes.
see the accepted answer here
https://jazz.net/forum/questions/94776/assertionfailedexception-problem-with-getting-the-values-of-attributes
note that the forum messes with text case, quotes etc.. so there will be a few errors to correct after you cut/paste the code into eclipse.
takes 4 parms
server/ccm
userid
password
query to execute