I am trying to use a variable to set an attribute value of an SSIS task but I keep running into the 4000 character limit of the string variable. Not sure why the variable which is of .NET type String has this limit when it doesn't when you are in a .NET environment. Regardless, can anyone provide some sample code that I could use to do this in a script task? I am trying to set the QueryString property of the Data Mining Query Task. All help would be appreciated.
Thank you in advance.
Variables and expressions in SSIS are limited to 4000 bytes. Sorry.|||As far as dynamically setting the QueryString, when you look at the properties of the Data Mining Query task, is there an "expressions" parameter? If you expand the expressions parameter, do you have an option for QueryString? (I'm not sitting in front of SSIS at the moment, so I can't verify.) If so, you may want to put your variable there instead of using a script.|||All task properties support expressions, it is only Data Flow components that require the developer to actually set some code that says an expression is supported.
The problem is that the result of an expression cannot be greater than 4000 characters. Using a variable whose value is greater than 4000 characters will not work because this still has to pass through the expression evaluator to be assigned to the property value.
Since the DM Query Task does not offer anything other than a literal string for the query, this cannot be set dynamically within the package. I think this is a limitation, obviously it would be nice to have expressions with > 4000 characters but also tasks should be (consistently) developed with properties such as this accepting literals, variables and files. An ideal example is the Execute SQL Task with the SourceSQLType property that describes the interpretation of the SQL Statement property.
|||That is too bad. Hopefully this will change in a later version. Thanks for the help.
No comments:
Post a Comment