It's all about the answers!

Ask a question

Export csv file for RTC every few hours


Sean Hannon (17146) | asked Oct 18 '12, 8:58 a.m.
edited Oct 19 '12, 5:10 a.m. by Ralph Schoon (63.7k33648)
 Hi,

I'm trying to export all workitems in RTC to a csv file and store it some where every few hours but I want to do it automatically without someone having to open RTC and manually export it.

Is this even possible?

Thanks for the help

Accepted answer


permanent link
Steve Arnold (28131511) | answered Oct 18 '12, 4:15 p.m.
 Hi

I don't think there is a way to do this through the UI.

However, there are a few ways you might be abl to do it.

One way is to use the plain java api, write a simple java app to read out the work items, and save them as your csv file.  Then use an operating system scheduler to run the java program every few hours.  The java api can  be downloaded from the all downloads page on the release of rtc, and the wiki has code examples.

Another way, depending on why you want them in csv, might be to use RRDI (the free data warehouse reporting solution that comes with rtc), which has daily snapshots of the data, but you can configure rtc to take snapshots at more frequent intervals.  Then you can configure RRDI to analyse the data into a graph or report, put it on a dashboard, and even email it around.

Hope this helps

Steve
Sean Hannon selected this answer as the correct answer

Comments
Sean Hannon commented Oct 19 '12, 3:55 a.m. | edited Oct 19 '12, 5:09 a.m.

 I presume using the plain java api will involve a JDBC or ODBC connection to the RTC database? 

permanent link
Ralph Schoon (63.7k33648) | answered Oct 19 '12, 5:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 19 '12, 5:38 a.m.
The Plain Java API is a bunch of Java JAR's. They use HTTPs/HTML to access the REST interface of RTC. You don't have to and also should not try to access the database. The way the data is stored prevents you from learning a lot doing so anyway.

There are several articles and Wiki entries on Jazz.net that talk about Plain Java API. This one  https://jazz.net/library/article/807 has a quick description on how to set it up.

In my blog I try to publish things I learned about the API. http://rsjazz.wordpress.com/2012/08/01/uploading-attachments-to-work-items/ would be interesting for you. I haven't published about running queries. No time. I think however there are forum questions with code that you should be able to find.

Sean Hannon selected this answer as the correct answer

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.