How to Skip a FTP Task in a Foreach Loop Container

  • I'm working on a complicated SSIS package in SSDT 2012. One of the final tasks requires me to send files to FTP locations. Unfortunately, the table that provides those FTP Hosts isn't fully populated and the FTP location might be blank. If it's blank I want to skip that send. Is there an easy way to do this?

  • joshdbguy (9/29/2015)


    I'm working on a complicated SSIS package in SSDT 2012. One of the final tasks requires me to send files to FTP locations. Unfortunately, the table that provides those FTP Hosts isn't fully populated and the FTP location might be blank. If it's blank I want to skip that send. Is there an easy way to do this?

    Quick thought, use the Enabled property of the task, set it as an expression that evaluates a value of a control variable and toggle the value depending of the status.

    😎

  • Eirikur Eiriksson (9/29/2015)


    joshdbguy (9/29/2015)


    I'm working on a complicated SSIS package in SSDT 2012. One of the final tasks requires me to send files to FTP locations. Unfortunately, the table that provides those FTP Hosts isn't fully populated and the FTP location might be blank. If it's blank I want to skip that send. Is there an easy way to do this?

    Quick thought, use the Enabled property of the task, set it as an expression that evaluates a value of a control variable and toggle the value depending of the status.

    😎

    Good Idea but I found a better way. I created an expression task and evaluated the expression. If the ftp host is valid, I use a success constraint and pass that to the FTP task. If it's not, for the purpose of testing, I sent it to my email as an operator task.

  • Better way.

    I removed the expression task and just added expressions to two separate connectors. One for if the host is blank, one for if it's not.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply