如何合并 SSIS 包文件?

发布于 2024-10-28 05:42:25 字数 621 浏览 2 评论 0原文

我想知道是否有人对合并 SSIS 的 dtsx 文件有任何建议。以下是我发现的使合并变得困难的问题:

  • 它们是 xml,这对于合并来说已经是一种痛苦。
  • 它们可以嵌入 C# 脚本,在这种情况下,它们将同时拥有 C# 源代码和 dll 文件的 base64 编码字符串。
  • 它们描述了包中的数据流以及 IDE 中元素的布局。

如果 Microsoft 的任何人都在听,那么通过将软件包制作为多个文件而不是一个文件,可以解决许多此类问题。一个 dtsx 可以是描述流程的 xml、描述布局的 xml、一些 .cs 源文件和一些 dll。但事实并非如此。 让我想知道为什么有人使用 dtsx。

非解决方案

我在网上看到的唯一解决方案是确保 dtsx 文件在编辑时被锁定,这样只有一个用户可以有变化。当您只谈论一个分支时,这种方法效果很好,但如果您在各个分支中使用 dtsx 的多个副本(或者上帝保佑,DVCS ),那么在您进行更改时就没有可行的方法来锁定它们。除此之外,这并不能真正解决问题,除非您还可以确保在您可以将其合并到任何地方之前没有其他人更改它。

I am wondering if anyone has any advice on merging SSIS's dtsx files. Here's the problems I see that make merging difficult:

  • They are xml which can already be a pain for merging.
  • They can have embedded C# scripts in which case they will have both the C# source code and the base64 encoded string of the dll file.
  • They describe the flow of data in the package as well as the layout of the elements in the IDE.

If anyone from Microsoft is listening, a lot of those problems are solved by making the packages several files rather than one file. One dtsx could be an xml describing the flow, an xml describing the layout, some .cs source files, and some dlls. But that's not how it is. Makes me wonder why anyone uses dtsx.

A non-solution

The only solution I've seen online is to ensure that the dtsx file is locked when editing so only one user will have changes. This works fine when you're only talking about one branch but if you're working with multiple copies of the dtsx in various branches (or god forbid, DVCS), then there's no feasible way to lock them all anytime you make a change. Besides that wouldn't really solve the problem unless you could also make sure no one else changed it before you could merge it everywhere.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

爱冒险 2024-11-04 05:42:25

使用免费的 Visual Studio 加载项 BIDS Helper 可以通过两种可能的方式帮助您解决困境。

  1. BIML:BIML 是商业智能标记语言 (BIML 参考)。您可以使用 .biml 文件生成 SSIS 包。 BIML 文件由于其更严格的结构,应该可以更好地进行合并操作。尽管我还没有合并它们的经验,但我一直在使用 BIML 文件创建 SSIS 包,速度比 SSIS UI 允许的速度更快。它对于复制粘贴类似的数据流和仅更改唯一属性非常有帮助。

  2. 智能差异:BIDS Helper 还内置了智能差异功能来帮助您比较 SSIS 包中的差异。它不会帮助自动合并,但会在显示差异之前删除布局信息并对 XML 进行排序。这将向您展示两个 SSIS 包之间的实际功能差异。然后您可以使用该信息手动合并更改。对于您对 revelator 的答案的评论中的示例,您将使用 Smart Diff 将 SSIS 的 1.0 版本与 1.0 分支中的固定版本进行比较,然后您将看到手动将该修复应用到 2.0 分支所需的更改。 /p>

Using the free Visual Studio add-in BIDS Helper may help with your dilemma in two possible ways.

  1. BIML: BIML is Business Intelligence Markup Language (BIML Reference). You can use .biml files to generate your SSIS packages. BIML files should work better with merge operations because of their more rigid structure. Although I have no experience with merging them yet, I've been using BIML files to create my SSIS packages faster than the SSIS UI allows. It has been very helpful with copy-pasting similar data flows and changing just the unique attributes.

  2. Smart Diff: BIDS Helper also has a Smart Diff feature built in to help compare differences in your SSIS packages. It will not help auto-merge, but it will strip out layout information and order the XML before showing the differences. This will show you actual functional differences between two SSIS packages. Then you can use that information to manually merge changes. For your example from your comment on revelator's answer, you would use Smart Diff to compare version 1.0 of your SSIS to your fixed version in the 1.0 branch, then you would see just the changes necessary to apply that fix manually to your 2.0 branch.

终止放荡 2024-11-04 05:42:25

我建议不惜一切代价避免合并 dtsx 文件 - 这将是一个痛苦的世界!我通常开发 SSIS 项目的方式是将每个不同的工作分成一个单独的 package/dtsx 文件,然后从主包中调用它们。这意味着团队中的不同人员可以处理不同的包,而不会相互重叠。这在源代码控制系统中非常有效。另一个优点是每个组件都可以独立执行或测试。

I'd recommend avoiding merging dtsx files at all costs - it's going to be a world of pain! The way I generally develop SSIS projects is to split each distinct piece of work into a separate package/dtsx file, then call these from a Master package. This means that different people in the team can work on different packages without overlapping onto each others work. This works very well in a source controlled system. Another advantage is that each component can be independently executed or tested.

Spring初心 2024-11-04 05:42:25

我们合并工作的唯一方法是打开两个包,复制一个包中的所有内容,粘贴到另一个包中,然后编译每个脚本任务(如果它们存在冲突)。

不过,建议使用较小的包,因为它们响应速度更快。

Only way we get merging to work is to open both packages, copy everything from one package, paste into the other, then compile every script task if they have conflicts.

Working with smaller packages is advisable though, as they just respond faster.

万劫不复 2024-11-04 05:42:25

如果您需要真正的合并功能,您将必须手动对包进行编码。由于 XML 中的所有连线(沿袭 ID 等)和设计者细节,无法在不破坏数据流或布局的情况下合并文件之间的更改。

If you need real merging capabilities you will have to manually code the packages. Because of all the wiring (lineage ids, etc) and designer specifics in the XML there is no way to merge changes between files without breaking either data flows or the layout.

恏ㄋ傷疤忘ㄋ疼 2024-11-04 05:42:25

看一下 BIML 变压器。 BIML(商业智能标记语言)是编辑和控制 SSIS 包的一种更简单的方法。只需下载 BIDS 帮助程序并查看本文即可。

http://bimlscript.com/Walkthrough/Details/68

Transformers 还允许您应用相同的更改为一组 SSIS 包,而不仅仅是一次手动更改一个。

干杯

Have a look at BIML transformers. BIML (Business Intelligence Markup Language) is a much easier way to edit and control your SSIS packages. Just down load the BIDS helper and check out this article.

http://bimlscript.com/Walkthrough/Details/68

Transformers also allow you to apply the same change to a set of SSIS packages not just manually one at a time.

Cheers

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文