: : Tom Fury
Den enda dokumentationen över Tommies liv

Extendning the TFS data warehouse

Category: By Tom Fury
I've been reading some material on how you could extend the TFS data warehouse, and it definitely not a trivial task. As far as I've understood we will have to implement our own operational store (Microsoft SQL Server 2005?), whereafter we implement an adapter. This adapter serves as the interface to the TFS data warehouse and transforms our data so that reports could be generated from these data in the future.

Although, I am wondering if it isn't possible to use existing operational stores to use a new adapter on? It isn't really clear, and with the lack of books which collect all this important information in one single place, it's really hard to get an overview. There are 5 existing operationl stores as of now:

  • Common Structures
  • Work Item Tracking
  • Source Control
  • Team Foundation Build
  • Team Test
But how do you implement an Adapter? According to some articles on MSDN, you'll have to implement the IWarehouseAdapter interface, which in turn must implement at least 4 methods:

  • void Initialize(IDataStore ds)
    Initializes the adapter, and holds a reference to the IDataStore object (keeps the adress of the TFS server and the tools the adapter will work with).
  • SchemaChangeResult MakeSchemaChanges()
    Provides means by which an adapter can indicate whether it will change a schema on this run.
  • DataChangesResult MakeDataChanges()
    Does the primary work of the adapter. Pulls data from the operational store and writes to the warehouse using the object model.
  • void RequestStop()
    Stops the adapter in an orderly fashion in the event the service is taken down.
The practical part of building the adapter involves building it as an DLL and copying it to a plugin folder of the TFS installation.

But you do really only need to create an adapter if you're adding new data types to the warehouse. I can see no other option than doing so if we are to save code metrics in the warehouse. Code metrics is (or rather I think it probably will be) a new data type for the data warehouse. Do correct me if I'm wrong.

So if I am correct in my assumptions (further studies have to be made, I'm not 100 % sure on these things) the tasks that lie ahead of us are to define and implement an operational store and an adapter for that store. The last step will be to utilize these new data in the data warehouse by designing a report which uses these code metrics.

Of course we first have to implement a tool in the client (VSTS) to have something to save into our operational store (also a part of our original assignment).

I will have to read some more about extending the data warehouse in TFS before I am totally sure on how we should proceed.

Some useful links:
IWarehouseAdapter Interface
Implementing an Adapter
How to: Create an Adapter
Understanding the Data Warehouse Architechture (good diagram of the architecture on this page)
Data Warehouse Extensibility
How to Extend the Data Warehouse Database

Reading tips are greatly appreciated! I will continue tomorrow with my investigation. Feels like I'm on the track of something here at least. Hopefully it will not show to be a dead-end.

2 comments so far.

  1. Johan 02 oktober, 2007 23:15
    My names is Inga and i am from Sweden
  2. Tom Fury 02 oktober, 2007 23:30
    Men...det är väl ingen fisk? :D

Something to say?