Query custom stats via SQL

Is it possible to do a SQL query on the TeamCity database to extract the custom stats for a project. ?
BTW where is the custom stats for a project stored ?

5 comments
Comment actions Permalink

Hello Morne,

  The data is stored in not obvious way (build_data_storage) table. I'd suggest using interface BuildDataStorage to obtain data for the custom statistics.

   Hope, this helps,
   KIR

0
Comment actions Permalink

I assume BuildDataStorage is some kind of JAVA interface in TeamCity ?
Does this mean I have to write a JAVA plug in of some sort to process the data and I cannot extract the custom stats from an external application via SQL ?

0
Comment actions Permalink

Hi,

I'm not a specialist but I thing BuildDataStorage is part of the API. Its qualified name is: jetbrains.buildServer.serverSide.statistics.build.BuildDataStorage.

It should be better using this API instead of directly getting values from database. You have no warranty on Database schema that can be subject to changes, instead of the API that should be deprecated first before getting unavailable.

Hope it'd help.

Regards,

Olivier.

0
Comment actions Permalink

So a good starting point would be to look at http://www.jetbrains.net/confluence/display/TCD4/Developing+TeamCity+Plugins
and do a server side plug in ?

0
Comment actions Permalink

Yes, have a look to the samples.

About a server-side plug-in, I do not know. It's depending of your needs.

Maybe, a standalone Java program using TeamCity API can do the job too.

Olivier.

0

Please sign in to leave a comment.