Search code examples
sqlssisssis-2008

SSIS Create table which is destination in flow


I have a database that is dropped and recreated completely. I want to schedule a SSIS package that:

  • executes a SQL script that creates TableA
  • than proceeds to the dataflow task that transfers data from source table to TableA.

Problem is that I get an error that says that TableA does not exist as destination. So the validation sees that in my dataflow task the destination does nog exist.

How can I set the routine, such that step 1 gets done before step 2 in one dtsx?

Please note that solutions such as truncation are not an option for me.


Solution

  • In the SSIS package, under the properties for the Data Flow Task, set Delay Validation property equal to True.

    This will delay the validation of the step until run-time, after the table has been created by the previous Execute SQL Task.

    Careful that some errors may be suppressed when using this property.