SSIS Package Layout

If you produce SSIS packages for a customer, even if that "customer" is the company you work for, then this tip is for you.

When you create a new SSIS package and start adding items to the design surface you can quickly create a mess if you're not careful.  Even if you are careful it is still quite difficult to precisely place the items so that the connecting lines line up.

For example, I quickly created a package which performs some common tasks:

SSIS Package - Before Cleanup

As you can see, the various items are positioned on the design surface in a haphazard way.  You can spend time dragging the items around until you get a layout that looks better, or you can use the power of the "Layout" toolbar to assist you.

By default, the "Layout" toolbar is not displayed in BIDS.  To display it, right-click on an empty part of the toolbar and click on Layout (or you can click on "Tools | Customize..." and click the check box next to Layout):

Turn on Layout Toolbar

  You should see the Layout toolbar displayed:

The Layout Toolbar

To fix the layout of my package, I first selected all of the items.  You do this either by clicking on the design surface and dragging the selection box around all of the items or by shift-clicking on each of the items until they are all selected.  Look closely at each of the items--one item will have white "grab handles" and the rest will have black grab handles.  The one with the white handles acts as the anchor for the items in the Layout tool bar that act on multiple items.  For example, if you click on the "Align Lefts" button, the left sides of each item will be set to the left position of the anchored item.

I used a combination of "Align Lefts", "Increase Vertical Spacing", and "Make Vertical Spacing Equal" to align my items in a vertical column:

SSIS Package - After Cleanup

It took my just a handful of clicks and about 20 seconds to perfectly align the items for a professional look.

If you have auto-sized any of your shapes, you are still in luck.  Instead of "Align Lefts" you can choose "Align Centers" to keep the arrows straight.

I'm sure that you have your favorite way to lay out your items in your packages, such as a cascading look where the arrows go down, over, and then down again.  While that isn't directly supported by the layout toolbar you can still make use of the toolbar to "Make Vertical Space Equal" after moving your items where you want them.

Leave a comment if you have additional tips for using the Layout toolbar with SSIS packages.

Farewell.

0 comments: