Showing posts with label evaluate. Show all posts
Showing posts with label evaluate. Show all posts

Friday, March 9, 2012

Programmatically Evaluate Expression

I would like to evaluate expressions from within my execute function in a custom task. I saw this post from about 8 months ago detailing how it would be possible:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=117564&SiteID=1

Is there an updated response (or more detailed example) to the question? Am I really risking a lot by using this undocumented feature?

Thanks!

Hi David,

To quote Kirk from the thread you linked:

"...this is not documented and will not be supported by Microsoft. It could change at anytime and break your component if you use it. User beware. "

This remains the case. I encourage you to head over to the MSDN Product Feedback site at http://msdn.microsoft.com/sql/bi/integration/ and submit a suggestion for exposing this functionality.

Thanks
Mark

|||

Thanks for the feedback. I have submitted the suggestion:

https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=133078

Monday, February 20, 2012

Programatically Evaluating SSIS Expression

Is there an object in the DTS object model that will allow me to evaluate an SSIS expression? I am trying to build a custom task that will require re-evaluation of an expression multiple times within the execute method and I can't seem to find a way to do this.

Thanks,

Adam

Add a reference to Microsoft.DataTransformationServices.Controls

Use the Microsoft.SqlServer.Dts.Runtime.Wrapper.ExpressionEvaluatorClass class. You will want to use DTSInfoEvents to capture error details when calling Evaluate or Validate. Pass the events to the Events property of the ExpressionEvaluatorClass.

Take a look at the File Watcher Task (http://www.sqlis.com/) for an example of this in action, just set an expression through the task UI to see the Expression Editor Dialog we have built in action. It use the ExpressionEvaluatorClass behind the scenes to provide the evaluation functionality.

Not documented, so not supported, but it works.|||As Darren said, this is not documented and will not be supported by Microsoft. It could change at anytime and break your component if you use it.
User beware.|||

I have logged a bug to document and publicly expose this, but it was on Beta Place, so if someone wants to do the Product Feedback thing I'll vote for it.