Building Custom Tasks for SSIS Second Edition Errata, Chapters 13-14

As I wrote in Building Custom Tasks for SSIS Second Edition Errata, Chapters 1-9:

Things change.
Things change in software.
Things change regularly in software.

If you take nothing else away from this post, please take those nuggets of wisdom.

Last month, as I prepared to return to full-time consulting, I started feeling “better.” Prior to that time, I did not realize I was feeling “un-better.” I was carrying emotional stuff from my Dad’s passing in 2019 and my brother’s passing in 2020. Writing my latest book – titled Building Custom Tasks for SQL Server Integration Services: The Power of .NET for ETL for SQL Server 2019 and Beyond, (Second Edition) was cathartic as I dealt with these emotions combined with declining business – which prompted a move to part-time consulting in early 2021 – during the pandemic.

I did not realize I was carrying emotional stuff until I started putting it down. Then I started feeling “better.”

First, an Update

The source code for the completed projects in the book is available here (it’s free).

I’ve been tinkering with a new task that I believe could be useful. I’m keeping the details to myself for now because I am not sure I can do what I am trying to do. I’ve restarted the effort half a dozen times, at least. I scored a pretty solid template for connections management a couple restarts ago, so this continues to be an exercise in failing forward.

Speaking of connections management… In working through later chapters in the book, I noticed some things amiss with the flow in chapters 13 and 14.

Chapters 13-14 Errata

At the end of chapter 13, I include a section about updating the SettingsView.propertyGridSettings_PropertyValueChanged method. The problem is I’ve not yet had you, Dear Reader, create the SettingsView.propertyGridSettings_PropertyValueChanged method.

Doh!

This was a mistake and that impacts the flow of the book. I’ve submitted edits to Apress and, since this book (like most books these days) is printed on demand, those of you who have (or quickly acquire) a copy will score the “old version” of the book, errata and all.

The Chapter 13 edit is to simply remove the text, listing, and image between Figure 13-40 and the heading labeled “Let’s Test It!”

In Chapter 14, I updated the text, listing, and image surrounding Figure 14-8:

Updated figure 14-8
Click to enlarge

The updated verbiage reads:

On Line 118, the code detects the change that triggered the call to the propertyGridSettings_PropertyValueChanged method was a change to the SourceConnection property. Line 120 checks to see if the developer clicked the “<New Connection…>” item in the SourceConnection property dropdown. If the developer clicked the “<New Connection…>” item in the SourceConnection property dropdown, a new ArrayList variable named newConnection is declared on line 122.

On lines 124-127, the settingsNode SourceConnection value is set to null if and only if the current settingsNode SourceConnection value is not null or empty.

On line 129, a new ADO.Net connection manager is created. Creating a new ADO.Net connection manager involves:

    • Creating a new generic ADO.Net connection manager
    • Adding the new generic ADO.Net connection manager to the SSIS package’s connection collection
    • Opening the editor for the new ADO.Net connection manager so the SSIS developer can configure the new connection manager

On lines 131-137, a new ConnectionManager variable named cMgr is declared and initialized as the first connection manager in the newConnection array, newConnection[0], if the newConnection ArrayList is not null and contains at least one value. The settingsNode SourceConnection property value is assigned to the name of the new connection manager. The task’s ServerName property, theTask.ServerName, is assigned to the value returned from a call to the returnSelectedConnectionManagerDataSourceValue function, which is passed the settingsNode.SourceConnection argument on line 135. The settingsNode.Connections property is reloaded so that the new connection manager is included in the settingsNode.Connections object.

If the newConnection ArrayList is null or contains no values, the code on lines 140-147 restore the previous value to the settingsNode SourceConnection value.

If the call to the propertyGridSettings_PropertyValueChanged method was a change to the SourceConnection property, but was not a click on the “<New Connection…>” item in the SourceConnection property dropdown, the code on line 152 sets the value of the task’s ServerName property, theTask.ServerName, to the value returned from a call to the returnSelectedConnectionManagerDataSourceValue function.

“Why the Images of the Code, Andy?”

That is an excellent question. I’m glad you asked! One reviewer labels the images “padding.” I get it. The simple truth is this reviewer is not my target audience. My target audience those new to – or unfamiliar with – .Net development who want to build a custom SSIS task. In the end, the reviewer gives props for documenting “the calls for invoking SSIS packages from C#” which the reviewer describes as “poorly documented.”

So why the images and code?

Printed code sometimes spans lines in a book listing. For people unaccustomed to books about .Net development, they may not understand where and when to edit the listing code – especially code copied and pasted from an electronic copy of the book.

The images are not for padding. The days of padding books because “girth sells” have been over for a while.
The images are there to help less-experienced developers become more-experienced developers.

I gained insight regarding Microsoft’s SSIS documentation by reading Kirk Haselden’s (gracious) foreword to the book, which I shared in a post titled Foreword – Building Custom Tasks for SSIS 2nd Edition. In his words, one gets a partial glimpse behind the curtain of some of Microsoft ‘s SSIS documentation process.

To the Reviewer…

Thank you for your feedback.

This review is a fair reminder for me and all reviewers to consider the possibilities of which one is unaware (and, perhaps, read the Who This Book is For section…) prior to supplying constructive criticism. Lower ratings impact sales. Parts of the book may help others (like they helped you) and a poor rating may dissuade those very same people from acquiring just the help they desire (perhaps need).

To the Rest of You…

If you have a question about why something is written the way it is, or a suggestion or feedback for improving the book or code, please ask.

If you’ve purchased the book, please share your thoughts in a review and supply a rating. By all means. Just… think it through first. Consider saving your constructively critical thoughts in a text file and sleep on it before hitting the Publish button (like I did before adding this part of this post).

Conclusion

If you already purchased the book, thank you. If you reached the end of Chapter 13 and asked yourself, “What SettingsView.propertyGridSettings_PropertyValueChanged method?!” I apologize for confusing you and hope this helps.

Peace.

Andy Leonard

andyleonard.blog

Christian, husband, dad, grandpa, Data Philosopher, Data Engineer, Azure Data Factory, SSIS guy, and farmer. I was cloud before cloud was cool. :{>

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.