THE SQL Server Blog Spot on the Web
Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | Join | Help
in Search

Rushabh Mehta

MS BI geek talk and the community

  • Custom Components posted on CodePlex

    If you recall my earlier post on Custom components, I just wanted to provide you an update that the 2 components have been posted on CodePlex. You can get the links from Jessica's blog. I would love to hear from any of you who end up using the components or just re-purpose the code. As I mentioned in my earlier post, these source codes can also act as a great starting point for some custom logic that you need to implement for your SSIS packages.
  • Webcast on SSRS 2008 and others

    Last night (very very late), I attended a live webcast delivered by Peter Myers on SSRS 2008. It was a great introduction to SSRS and the new (some quite refreshing) changes. I continue to be impressed by the power of tablix and of course the dundas charts.I am certainly looking forward to working more with SSRS 2008.

    BTW: Jessica Moss and I are delivering a webcast on SSIS Intro next week, but I am more excited about some other upcoming webcasts being delivered by Greg Low, Randy Dyess, Sony Jose and Craig Utley. You can find out about these webcasts and also about the recordings here. Hope to catch you there next week.


  • Gracefully Handing Task Error in SSIS Package

    I am sure that there is already some blog or article about this. But, I encountered this today and decided to go ahead and blog anyway. I had a situation, where I expected at certain times (the first of every month), a task to fail, but regardless, I wanted the package to continue to run with success. One other issue, I had, was that I did not want to Error Handler of the package to kick off in case of this task failure. Also, since the task was in a Sequence Container, it was causing the Sequence Container execution results to be Failure thus invoking the "On Failure" workflow.

     

     Default behavior

    This is the default behavior where the task failure for the “Drop active jobs partition” SSAS DDL task invokes the error handler at the package level (which is where I have a global error handler) and invokes a failure of its parent container. Since I know that this task is bound to fail the 1st of every month (In this scenario, I am dropping, creating and processing a monthly SSAS partition on a daily which won’t exist on the 1st of a given month), I want to gracefully “ignore” this failure and not signify a failure or write error rows in my error log tables. So, the way to handle this scenario was..

    1.       Create an “On Error” Event Handler on the task “Drop active jobs partition” – You can leave the event handler blank with no tasks

    On Error Event Handler

    2.       To Prevent the error from going further up the chain, open up the System Variables from within the On Error error handler of the task and change the Propogate property’s value to False

    Propogate Property

    This should provide the desired result where the error is contained within the task

    Result

    Optionally, you can also choose to set the ForceExecutionResult property of this task to be Success so that it always signals a success – Even with this, you still need to follow the above steps to prevent errors from bubbling up in the package.


  • Custom Data Flow Components in SSIS for dealing with Delimited Strings

    I have never been a .NET developer. Maybe that is why, despite good guidance from sqlis.com and others, I never ventured into the world of custom components. Scripting, on the other hand, I could handle thanks to Donald's book which has always provided a great reference. Well, a couple of weeks back, I finally came across a classic scenario of reuse where I could no longer avoid writing custom data flow components. So I Google’d (Live just does not make a good verb Microsoft!) away for help. Fortunately, I did not have to go too far for help. Three excellent sources of information included this article on sqlis.com by Allan Mitchell, the samples that you can install with SQL Server (usually found at C:\Program Files\Microsoft SQL Server\90\Samples\Integration Services\Programming Samples) and finally CodePlex. On CodePlex, I found the Normaliser Component written by Jamie Thomson. There are also a few good books written by a lot of my friends in the SSIS community - but I must confess that I don't always read technical books except on rare occasion. :)

    The few references I cited above go a long way towards getting you close to your goals. Beyond that, you still need some .NET skill to better understand the code in relation to what you need to do for your unique situation. That is where Jessica came in. Fortunately for me, she was working on this project with me and is far more proficient in .NET that I ever will be! So, thanks to her help we got the components done. What amazed me was that with the references I mentioned above, it took less than 3 days to understand and write 2 different custom components (one synchronous and one asynchronous) and achieve high degree of reusability.

    To give you a quick background on the custom components, both these custom components deal with de-limited strings in a column. The first component, which is a synchronous component, sorts and de-duplicates the data inside each row. So, if you have the following input...

    1              Kirk,Donald,Anjan,Ritu,Catherine,Anjan

    2              Jamie,Allan,Simon,Erik,Andy

    You would end up with the following output

    1              Anjan,Catherine,Donald,Kirk,Ritu

    2              Andy,Allan,Erik,Jamie,Simon

    The second component un-pivots a delimited string. So, in the example

    1              Anjan,Catherine,Donald,Kirk,Ritu

    2              Andy,Allan,Erik,Jamie,Simon

    You would see the following output

    1              Anjan,Catherine,Donald,Kirk,Ritu    1              Anjan

    1              Anjan,Catherine,Donald,Kirk,Ritu    2              Catherine

    1              Anjan,Catherine,Donald,Kirk,Ritu    3              Donald

    1              Anjan,Catherine,Donald,Kirk,Ritu    4              Kirk

    1              Anjan,Catherine,Donald,Kirk,Ritu    5              Ritu

    2              Andy,Allan,Erik,Jamie,Simon           1              Andy

    2              Andy,Allan,Erik,Jamie,Simon           2              Allan

    2              Andy,Allan,Erik,Jamie,Simon           3              Erik

    2              Andy,Allan,Erik,Jamie,Simon           4              Jamie

    2              Andy,Allan,Erik,Jamie,Simon           5              Simon

    The un-pivot component preserves the order of the data in the string and does not do any sorting or removing of duplicate values. It also adds a numeric column to provide the position id of each value. Both of these components also accept the delimiter string as a custom variable to the component.

    So, I am interested in hearing some feedback as to whether these components would be something you see use for?


  • Joe Healy made me do it!

    So, I am finally back from hibernation - and I hope it lasts! It all started when I got an email today from Joe Healy. For those of you who dont know Joe, he is my favorite .NET developer evangalist from FL. You can find out more about Joe the vibrant FL community from his blog. Now, as you will find out through my blogs, I am no .NET guy - but I like Joe all the same since he does "tolerate" the SQL guys! :) Actually Joe is a great community supporter no matter what your technology preference - just make sure it is something Microsoft sells! :)

    Going back to Joe's email today, he asked me if I had a blog and I promptly sent him the link to my <empty> blog site which my good friends Peter DeBetta and Adam Machanic were kind enough to set up for me. Of course he immediately pointed out that he wasn't looking for an empty blog site! So here I am.

    Anyway, I have been doing some fun stuff this week with some custom SSIS components with my colleague Jessica Moss and I hope to blog about it and share that custom component as well in the next 2 - 4 days as soon as I am able to. I am also working with Master Data Management and am very excited about the potential and so will start blogging about that as well. From time to time, you will see me blog about PASS although I will try my best to balance my technical posts with my passion around community and PASS. So stay tuned!

    Also, next week I will be at the MVP summit and if you are attending and are from FL, let Joe know because that is the only way you will get invited to his legendary Florida geek laager! See you there!


Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement