Auto Table Mapping

  • I have build a DTS Package that sets the Source and Destination tables automatically via a Dynamic Properties Task. But when the Source and Destination of the Data Transfer Task changes I need to let the package automatically redo the Transformation Mappings. Is there a way to automate this, maybe using a ActiveX Script Task to let the package automatically redo the mappings ?

  • Now from my understanding you cannot do this inside DTS but you could write a VB app to recreate the package if you needed. However even if you could or wanted to I would not suggest doing this as automapping may throw you a curve occassionally and then you would end up wih data entegrity problems. This is one of those case where user interaction is better than automation IMHO.

  • I disagree a little about the automation vs the human - just because I can do something manually doesn't mean I should! DTS is a great example of wrapping a good UI around a complex object model. They just didn't go quite far enough on the auto mapper, a setting to "preserve mappings" would be very handy indeed. You can change the source/destination programmatically using VB, can't remember if that screws up the mappings or not. If you find it does cause a problem with the mappings you can just export the whole thing to VB and create a new package each time.

    Andy

  • Thanks for the feedback, I am in the process of building a workaround. I have managed to clear the Source and Destination Columns via an ActiveX script just before running the transformation task. It seems to work fine. I will experiment getting the Source Tables' Definition structure via ActiveX Script as well.

    Dirk

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply