SSIS package merge conflict resolved but causing etl Package load failure

Viewed 30

I was trying to merge two git branches and encountered Merge conflict error. I tried to resolve them and saved it. But now the whole package is unable to load. The error shown is " An item with the same key is already added" The error msg is as below. I am unable to find out where exactly I should make the change. Could anyone help me to resolve it? Please let me know if I need to add more info for the troubleshooting to be easier.

   at Microsoft.SqlServer.Dts.Runtime.Project.OpenProject(IProjectStorage storage, String projectPassword, IDTSEvents events)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectLoader.<>c__DisplayClass21_0.<LoadProject>b__0(String password, IDTSEvents events)
   at Microsoft.DataTransformationServices.Controls.ProjectProtectionUtils.LoadProjectWithPassword(Boolean askedPasswordOnce, ProjectLoader loader, IWin32Window dialogParent, String& password, ProjectProtectionEvents errorListener)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectLoader.LoadProject(XmlNode manifestNode, String& projectPassword, ProjectProtectionEvents errorListener)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectLoader.DeserializeManifestInProjectMode(XmlNode manifestNode)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectLoader.ConstructProjectHierarchyFrom(ProjectSerialization projectSerialization)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectLoader.Deserialize(TextReader reader)
   at Microsoft.DataWarehouse.VsIntegration.Shell.Project.Serialization.BaseProjectLoader.Load(IFileProjectHierarchy projectHierarchy)
   at Microsoft.DataWarehouse.VsIntegration.Shell.Project.FileProjectHierarchy.Load(String pszFilename, UInt32 grfMode, Int32 iReadOnly)
1 Answers

An SSIS package is an XML based file format.

Yes, you should absolutely use source control to version your packages. But you would be best off treating them as binaries because no source tool I am aware of knows how to merge XML documents.

The error you're experiencing is that you have an invalid package declaration. Without seeing the two files and the merge record, it's super hard to guess what's been done, much less rectify it.

SSIS Source Control guidance

After doing SSIS for nearly 20 years, I have a few thoughts on the matter.

  • Design your packages to be as small and tightly focused on solving a single business problem (Populate Sales table from Excel)
  • Use package orchestration to solve the dependent package problem (Run the Employee Package, then Customer, then Sales)
  • Only one developer works on a package at a time. Decompose the package into smaller packages if the business problem supports it to get more developers working on a task
  • If adding new packages to a project/solution, have a captain/leader create empty/shell packages and commit the project to source control - because the SSDT project artifacts are also XML and subject to the same botched merge logic.
Related