Search code examples
sql-serverssisetlssis-2012

SSIS - What is the difference between Task grouping and Sequence Task?


Task grouping and Sequence task both allow to club tasks together as one unit.

What is the difference between them?

Task grouping - Refer to 4- Sql Server 2012 Implement Data Warehouse - Exam 70-463 - at 4:28 see last line in the video


Solution

  • Sequence Container

    A Sequence Container groups all child tasks together, where they must all finish execution before the task following the Sequence can start. An example of this would be in a data warehouse where the dimension tables needed to be loaded before any fact tables, as the dimensions hold the primary keys. Placing the tasks that load the dimension tables in a sequence and connecting the task loading the fact table with a precedence constraint after this sequence ensures that the fact table will only begin loading once all the dimensions have finished.

    Task Grouping

    Grouping is a design feature, allowing the SSIS developer to better organize tasks within the package, however the package can still continue execution when not all of the tasks in the Group have finished. You can verify this as there is no option to connect a precedence constraint from a Group as a whole, while this can be done from a Sequence.


    On a Similar note, you cannot connect a precedence constraint from a task inside a sequence to one outside, but this can be done for a group. Sequences can also be used to group related tasks into a single transaction, however this does not apply to groups.

    In the screenshot below, the Load Dimension Data Flow Tasks will execute independently of each other, however the Load Fact Table Data Flow Task will not begin execution until all tasks in the Sequence complete.

    enter image description here