无法更改SSIS Excel目标列数据类型 [英] Unable to change an SSIS Excel Destination Column Data Type

查看:553
本文介绍了无法更改SSIS Excel目标列数据类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个从SQL Server导入数据并将其放入Excel目标文件的SSIS包。进入ADO源组件的高级编辑器时,我有一个字段描述,其外部数据类型为 Unicode字符串,长度4000,输出数据类型 Unicode文本流(这是为了确保 String length> 255可以导入Excel)。现在,当我进入Excel目标组件的高级编辑器时,数据类型被卡住为 Unicode String ,长度为4000.它允许我更改它,但立即恢复点击保存后。运行包导致失败,因为我在描述字段中的数据长度> 255.我搜索了无数的线程关于这个问题,如这个,但没有来到一个解决方案。任何帮助将不胜感激。

解决方案

这可能很简单:在对Source组件进行任何更改后,我发现我必须双击绿色箭头 - 显示元数据不仅仅显示它,还可以根据源组件更新该元数据。只有这样,目标组件才能够查看对源组件的更改。但是,如果这还不够:做出这些改变时,在我可以让它们生效之前,我经常不得不(1)删除目标组件,(2)删除SSIS中的目标连接对象,(3)删除/重命名/移动实际的Excel电子表格,然后通过单击生成新目标的按钮(在目标组件中)生成一个新的文件从元数据。


I have an SSIS package that is importing data from SQL Server and placing it into an Excel destination file. When going into the Advanced Editor of the ADO Source component, I have a field Description that has an External Data Type of Unicode String, length 4000, and an Output Data Type of Unicode Text Stream (This is to ensure a String length > 255 can be imported into Excel). Now, when I go into the Advanced Editor of the Excel Destination component the Data Type is stuck as Unicode String, length 4000. It allows me to change it, but reverts back immediately after I click save. Running the package results in a failure since I have data in the Description field with a length > 255. I have searched countless threads regarding this issue such as this but haven't come to a solution. Any help would be greatly appreciated.

解决方案

This might be very simple: after you make any change related to the Source component, I find I have to double-click the green arrow -- showing that metadata does more than just show it -- it updates that metadata, too, based on the source component. Only after that will the Destination component be able to "see" the changes to the Source component.

But if that isn't enough: when making these kind of changes, before I could get them to take effect, I've often had to (1) delete the destination component, (2) delete the destination connection object in SSIS, and (3) delete/rename/move the actual Excel spreadsheet, and then generate a new one by clicking the button (in the Destination component), that generates a new destination file from the metadata.

这篇关于无法更改SSIS Excel目标列数据类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆