Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

The given key was not present in the dictionary. SSIS XML SOURCE Expand / Collapse
Author
Message
Posted Tuesday, April 22, 2014 12:02 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, August 7, 2014 9:44 AM
Points: 15, Visits: 112
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

Post #1563983
Posted Thursday, April 24, 2014 4:50 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 1:17 PM
Points: 1,551, Visits: 4,283
Could you post the xsd and some sample xml, hard to tell what is happening without more info.
Post #1564922
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse