Custom Field Length Change in TFS Warehouse database
-
Thursday, February 18, 2010 8:16 PMI have a custom warehouse adapter, which has successfully created facts and dimensions in the TfsWarehouse database. Later on I found out that I need to change the length of a varchar field in a dimension from 64 to 256. How can I implement this change?
I have tried to make the change in MakeSchemaChanges function, but since MakeSchemaChanges will be called multiple times within one session, I have the logic there to see if the dimension was already created before adding it. In my case, simply changing the field.Length = 256 doesn't work since the code is never going to be hit as the dimension has already been created.
I also tried to change the table column size directly in SQL server and updated the ConfigXml in _WarehouseConfig table. I was able to manually insert a string more than 64 characters into the column after that. But when I invoked the Run operation from warehousecontroller, the data pulled into the table were still truncated to 64.
Is there any missing step here to make it work? Any suggestions would be appreciated a lot!
All Replies
-
Tuesday, March 09, 2010 10:12 PMCant you simply add a check for your MakeSchemaChanges to check the existing field length and if its not right, change it ?
-
Monday, March 29, 2010 3:06 PM
You may have ran into a TFS restriction. String fields (< somany characters) can be set as a dimension field but longer fields cannot. An example would be the Description field. So now the routine to update the warehouse is assuming it is still a string field and truncating the data. You may have trouble getting around this.
You may be able to use the code I submitted in another thread, "Print long text fields such as Description".