Download JSON Data with SSIS

7 Comments


  1. Great Post Chris,

    I did an almost identical thing but my just keeps failing. I get a count on the (what for you would be features, which equals one(1)) but when I enter the foreach loop to add the rows it fails on AddRow.

    Object reference not set to an instance of an object.

    at ScriptMain.CreateNewOutputRows()
    at UserComponent.PrimeOutput(Int32 Outputs, Int32[] OutputIDs, PipelineBuffer[] Buffers, OutputNameMap OutputMap)
    at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.PrimeOutput(Int32 outputs, Int32[] outputIDs, PipelineBuffer[] buffers)

    I found out the object is not getting serialized, but I still have no clue as to why.

    1. Author

      Glad you like the post. The first thing I’d check is if null values in your source data are nullable in your class. Class properties can be marked as nullable with a question mark as shown in the code below.

      public int? nullableInteger { get; set; }

    1. Author

      Thank you, Nancy. I have another blog post planned that uses SSIS to load JSON, but the heavy lifting is done with the new JSON functions in SQL Server 2016 instead of in SSIS. I prefer that technique, because it doesn’t require the tedious data type translations from C# to SSIS to SQL Server.

    1. Author

      Hey, John. Thank you for bringing this to my attention and linking to the Gist. I removed the link, because the Allegient site and blog are now gone due to the company being purchased by DMI.

Leave a Reply (Markdown formatting available)