Setting Conditional Split Friendly Expression
I dont thinkwhat you are trying to achieve is possilbe. why not put the expression in the conditional split directly? Do you wish to change the expression through config file?
January 26th, 2011 1:16am

I have an SSIS package that will be used to load multiple sheets from multiple excel files and I'm trying to use as little hardcoding in the package itself as possible but instead use a metadata table in the database to read out various properties The actual Data Flows to load the info from teh sheets are very similar and all have a conditional split process to remove any lines that I don't want to import (poorly defined tables in teh sheets) To this end, I am trying to store the conditional split expression in teh metadata, return it to a variable in the package and utilise that variable to set the conditional split friendly expression An example of the expression is: (LTRIM(RTRIM(ISNULL([Rating]) ? "" : [Rating])) != "" && LTRIM(RTRIM(ISNULL([BBID]) ? "" :[BBID])) != "" && UPPER([Rating]) != "RATING" && UPPER([BBID]) != "BBID") This works perfectly when hardcoded into the conditional split but if I try to set the variable @varColumnRule (which is assigned that exact string) as the friendly expression it fails with a message saying that the result of the expression cannot be written to the property unless I also hardcode the exact same string as the expression in the conditional split expression which would seem to defeat the point of being able to set the friendly expression as teh result of a variable... Any ideas?Rgds Geoff
Free Windows Admin Tool Kit Click here and download it now
January 26th, 2011 2:30am

Additional....looks like if I try to set the expression above as the friendly expression it doesn;t like it - complaining about [Rating] and [BBID] Should I be able to use field names in this way?Rgds Geoff
January 26th, 2011 2:42am

I didn't want to put the expression in the conditional split itself as I was trying to make a fairly dynamic set of packages where various items could be altered by amending information in a lookup/metadata table in the database. I use this table to set things like the connection string to the excel file and the data range definition. It was really for ease of maintanence to be honest - there are about 15 excel files that are being used and if the business was to change the format slightly (different sheet name or moving the table of data around a bit) I didn't want the support gut to have to go around and muck about with the SSIS packages if we could get away with just tweaking values in a metadata table The MSDN documentation certainly seems to suggest that you should be able to set the friendly expression of the conditional split condition to a property expression... Quoting MSDN from this page: http://msdn.microsoft.com/en-us/library/ms137886.aspx "The Conditional Split transformation includes the FriendlyExpression custom property. This property can be updated by a property expression when the package is loaded." Quoting MSDN from this page: http://msdn.microsoft.com/en-us/library/ms136014.aspx#condsplit " FriendlyExpression String An expression that represents the condition that the Conditional Split transformation evaluates. Columns are represented by their names. The value of this property can be specified by using a property expression. Rgds Geoff
Free Windows Admin Tool Kit Click here and download it now
January 29th, 2011 1:13am

I also looking for solution, trying to put changed records condition in a varible
June 8th, 2011 6:00am

It was really for ease of maintanence to be honest - there are about 15 excel files that are being used and if the business was to change the format slightly (different sheet name or moving the table of data around a bit) I didn't want the support gut to have to go around and muck about with the SSIS packages if we could get away with just tweaking values in a metadata table Rgds Geoff Replying to a pretty old post. Geoff in case the meta data changes for the excel input file. As of now SSIS does not porvide the flexibility to make changes in the package based on the metadata file. You would have to make changes in the package manually or create the entire package programatically to read the values from the meta data file and generate the output.My Blog | Ask Me
Free Windows Admin Tool Kit Click here and download it now
June 8th, 2011 6:33am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics