latest Post

Converting Blob Column to string in SSIS Script Component.

Recently I found myself needing to work with blob columns when transforming CRM data with SSIS. Specifically I was wanting to query and interrogate "Plugin Trace Logs" and output a daily email of any plugin errors to help the team become more proactive rather than reactive. 

Using the below fetch query and the Kingswaysoft CRM Source component.  I noticed the multi line text fields mapped to the SQL data type "ntext".


When reading this value from the data flow buffer in a SSIS Script component the "ntext" column actually returns the data as a "BlobColumn" and  in order to get the text string of the data in the column I had to use the GetBlobData() method in the DTS.Pipeline namespace.

After a bit of investigating I was able to convert the blob text to a string to be able to read the returned value and manipulate the data how I wanted. 

 The below snippet is the code I used.  Hopefully, this will help someone out.

Recommended Posts × +

4 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. I promise to share this testimony all over the world once my boyfriend returns back to me, and today with all due respect I want to thank DR.ONIHA for bringing joy and happiness to my relationship and my family. I want to inform you all that there is a spell caster that is real and genuine. I never believed in any of these things until I lost my boyfriend, I required help until I found a great spell caster, And he cast a love spell for me, and he assured me that I will get my boyfriend back in two days after the spell has been cast. Three days later, my phone rang, and so shockingly, it was my boyfriend who has not called me for the past 6 years now, and made an apology for the heart break, and told me that he is ready to be my backbone till the rest of his life with me. DR.ONIHA released him to know how much I loved and wanted him. And opened his eyes to picture how much we have shared together. As I`m writing this testimony right now I`m the happiest girl on earth and me and my boyfriend are living a happy life and our love is now stronger than how it was even before our break up. So that`s why I promised to share my testimony all over the universe. All thanks goes to DR.ONIHA for the excessive work that he has done for me. Below is the email address in any situation you are undergoing, it may be a heart break, and I assure you that as he has done mine for me, he will definitely help you too.
    EMAIL: ONIHASPELLTEMPLE@GMAIL.COM
    CALL/WHATSAPP : +16692213962.
    Website: http://onihaspells.com. 

    ReplyDelete