如何制作动态生成的SSIS包来显示任务的完整描述?

发布于 2024-12-29 15:53:01 字数 169 浏览 2 评论 0原文

我动态生成了一个SSIS包,很多任务名称都很大。当我在 BIDS 中打开包时,任务容器会缩小到足以让我无法读取任务的完整名称,而无需手动展开它们。如果您试图直观地了解包成员,这会变得乏味。

是否有一个我可以配置的设置(以编程方式动态生成任务),以便任务容器矩形默认适合任务的整个名称?

谢谢!

I have generated an SSIS package dynamically, many of the task names are large. When I open the package in BIDS, the task containers are shrunk enough so that i cannot read the entire name of the task without having to manually expand them. This gets tedious if you're trying to visually understand the package members.

Is there a setting I can configure (programmatically as the task is dynamically generated) so that task container rects are defaulted to fit the entire name of the task??

Thanks!

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

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

发布评论

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

评论(1

只是我以为 2025-01-05 15:53:01

你没有说哪个版本的SSIS,但下面的例子是2005年的;采用以后的版本应该不难。

我不认为有一个属性可以自动调整任务大小(注释则不然)。
一种解决方案是以编程方式或使用 XSL 转换来更改生成的 dtsx 文件;如果您打开 dtsx 文件,您会看到您的任务有一个 DTSID,类似于

<DTS:Property DTS:Name="ObjectName">My Task</DTS:Property>
<DTS:Property DTS:Name="DTSID">{0B86AAA3-1F48-4F35-B18B-3B3CA8CB1305}</DTS:Property>

dtsx 文件的更上方,有一个部分控制该特定实例的布局;它包含在 PackageVariable 部分(我认为在以后的版本中称为 ExtendedProperties)中的 ddscontrol 子部分中。例如:

<DTS:PackageVariable>
...
<ddscontrol width="3598" height="1164" noresize="0" nomove="0" >
...
<property name="LogicalObject" value="{0B86AAA3-1F48-4F35-B18B-3B3CA8CB1305}" vartype="8" />
...
</ddscontrol>
...
</DTS:PackageVariable>

为了清晰起见,我剪掉了很多内容,但是如果您在文本编辑器中打开任何 dtsx 文件,您就可以看到全文。显然,LogicalObject 条目链接到之前找到的DTSID

您想要的部分是 ddscontrol 节点中包含的 width 属性。将其更改为更大的值将为您提供更广泛的控制;我打赌您可以想出一个合理的启发式方法来根据您的文本字符串长度生成值。

You didn't say which version of SSIS, but the below examples are for 2005; it shouldn't be hard to adopt to later versions.

I don't think there's a property to auto-resize a task (not so for annotations).
One solution would be to alter the generated dtsx file, either programmatically or using an XSL transformation; if you open a dtsx file up, you'll see that your task has a DTSID, something like

<DTS:Property DTS:Name="ObjectName">My Task</DTS:Property>
<DTS:Property DTS:Name="DTSID">{0B86AAA3-1F48-4F35-B18B-3B3CA8CB1305}</DTS:Property>

Further up in the dtsx file, there's a section that controls the layout of that particular instance; it's contained within a PackageVariable section (called ExtendedProperties in later versions, I think), in a ddscontrol sub-section. Something like:

<DTS:PackageVariable>
...
<ddscontrol width="3598" height="1164" noresize="0" nomove="0" >
...
<property name="LogicalObject" value="{0B86AAA3-1F48-4F35-B18B-3B3CA8CB1305}" vartype="8" />
...
</ddscontrol>
...
</DTS:PackageVariable>

I snipped a lot out for clarity, but you can see the full text if you open any dtsx file in a text editor. Obviously, the LogicalObject entry links to the earlier-found DTSID.

The piece you want is the width property contained in the ddscontrol node. Changing this to a larger value would give you a wider control; I'm betting you could come up with a reasonable heuristic to generate the value based on your text string length.

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