Tuesday, March 20, 2012

Connection Manager Property Expression Editor

Is it possible to use a property, say name, of an object ( say the connection object) in the "Property Expression" of that object? I would like to modify the Connection String property of a flat file connection manager to append date to it. To do this I need to be able to use the Name property of the connection manager in the Property Expression editor. How ever I get an error that it does not recognize name, it almost seems to suggest I can only use variables. I find it hard to believe since it seems like common requirement to be able to use properties of an object (connection manager) in modifying other properties of the object. Any help would be greatly appreciated.
Thanks.

Your suspicion is correct -- only variables and literals can be used in property expressions. In dataflow expressions, you also have access to columns in expressions. However, there is no support for object properties.

You might be able to use a script task to populate a variable with the value you require, and then use that in the expression.

Thanks

Mark

|||

Mark:

Is this (being able to use a property in the expression) something that can be considered in the future releases of SSIS? I am currently using a script to iterate thru my connections and changing the location, but since it can be done much easily using property expressions would like to get feedback if this is a reasonable enhancement request. How do I go about to request this feature?

Thanks.

|||Yeah, I don't understand your desires for this feature... Perhaps an example of what you would like to do is in order here...|||

Toofan wrote:

How do I go about to request this feature?

Try http://connect.microsoft.com/, and find the SQL area. You can post feedback, bugs and suggestions on there.

Name certainly would be a nice property to have acces to (read-only).

|||

DarrenSQLIS :

Thank you for the link and the feedback.

Phil:
My original post had an example where this feature would be great. Here is the bit more explanation, consider a package that exports data from several different flat files (for loading different targets). The source files are created daily with creation date appended to them (file_name_YYMMDD). The connection names are named so that just adding the date would give us the file name. If I can use the "Name" property in the Property Expression editor, then I would be able to set the Connection String property to the file name without requiring a script. Right now I use a script to iterate thru the connections and change the connection string in every run. Hope that helps and any feedback or workarounds (besides scripting, since I am already doing that) are welcome.

I added a feature request:

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

Thanks.

No comments:

Post a Comment