April 22, 2014 at 12:02 pm
Hi folks
Just looking for suggestions really.
I've got to load multiple XML files into a database. I've managed (finally) to reduce the XML file to the elements I'm interested in using an XSLT task. I can load the first XML file fine. But when I tried a second, it turned up the above error.
I originally generated the XSD file from the first XML file (although I have amended it). However, I've visited several sites, XMLFormatter etc and validated the generated XSD against the second XML file. All 3 report valid structure and content, and yet, when I run the SSIS package it fails.
The exact error message is
[XML Source [1]] Error: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at Microsoft.SqlServer.Dts.Pipeline.DtsDataTableCollection.AssociateTablesWithBuffers(IDTSOutputCollection100 outputs, IDTSBufferManager100 bufferManager, Int32 localeID, DataSet dataSet)
at Microsoft.SqlServer.Dts.Pipeline.DtsDataTableCollection..ctor(XmlSourceAdapter xmlSourceAdapter, IDTSOutputCollection100 outputs, Int32 localeID, DataSet dataSet, IDTSBufferManager100 bufferManager)
at Microsoft.SqlServer.Dts.Pipeline.XmlSourceAdapter.Validate()
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostValidate(IDTSManagedComponentWrapper100 wrapper)
I'm finding it difficult to identify what to look at. Is this an XML error or a SSIS error? Any suggestions for how to proceed would be VERY gratefully received. How do I identify the key in question?
Regards
April 24, 2014 at 4:50 pm
Could you post the xsd and some sample xml, hard to tell what is happening without more info.
😎
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply