Search code examples
csvssissql-server-2016data-migrationflat-file

Regarding executing data flow tasks in a specific order in SSIS


I created 4 Data Flow Tasks as shown in the image in which order I want them to run:

  1. Customers
  2. Locations
  3. Orders
  4. Items

enter image description here

Each data task flow consists of:

  1. Flat File data source
  2. Data Conversion
  3. OLE DB Destination

enter image description here

When I run, according to the Execution Results tab in the image, not in the order I wanted but:

  1. Customers
  2. Items
  3. Locations
  4. Orders

The execution completes successfully though. I was able to check all data successfully inserted into DB.

enter image description here

Questions:

  1. Does sequence of tables migration matter when tables have foreign keys?
  2. If yes, then why the above execution didn't throw any errors?
  3. How to specify the order of execution?

Thanks.


Solution

  • The order you've specified is the order in which it has actually run. The Execution Results tab is showing them alphabetically.

    If you'd like to see the order and prove it to yourself, add some tasks in the sequence to write to a table with datetimes in, or make or inspect a log (using the SSIS Catalog if you're using a Project deployment, or a Log Provider if using Package deployment).