Is it possible to pass or query data created in a DataFlow into an Email Task?
I have an SSIS that looks like this: OLE DB data source > Script Component > email certain records ??? > Database Where the ??? is I'm trying to figure out the best way to send an email containing a subset of data that comes out of the Script Component. I need to send two subsets of the data. The Script component marks the records I want to email with a flag (0, 1 or 2). It seems that in order to send an email I need to exit the data flow so I'm guessing that I would have to do all my data work first then exit the data flow and send the emails. However, in order to send an email I'm reading that people recommend sending the data in attachments. In that case in the area ??? should I save my two subsets as text files? What components would I use to create two subsets of the total data based on the flag (0, 1, 2) that would get exported to two files (flag 1 and 2) but still be able to insert all combined records (0, 1 and 2) into my database at the end?
June 3rd, 2013 7:15pm

One thing that you might try is to use a conditional split to send the rows that you want to email to their own flow. Then you can use a Script component (as destination) to write the row values to a variable. Then you can use the variable to send as a message using the Send Mail task.Russel Loski, MCT, MCSA SQL Server 2012, 2008, MCITP Business Intelligence Developer and Database Developer 2008 Twitter: @sqlmovers; blog: www.sqlmovers.com
Free Windows Admin Tool Kit Click here and download it now
June 3rd, 2013 9:03pm

One thing that you might try is to use a conditional split to send the rows that you want to email to their own flow. Then you can use a Script component (as destination) to write the row values to a variable. Then you can use the variable to send as a message using the Send Mail task.Russel Loski, MCT, MCSA SQL Server 2012, 2008, MCITP Business Intelligence Developer and Database Developer 2008 Twitter: @sqlmovers; blog: www.sqlmovers.com
June 4th, 2013 3:41am

Thank you, I am trying that now and it seems like it will work out. I also found the multicast which seems like it will let me do some other things I might want to do with the data.
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2013 5:50pm

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

Other recent topics Other recent topics