使用SSIS,平面文件连接管理器会使用“,”数字范围内的csv文件混乱

时间:2022-03-17 11:51:52

I had data in a CSV file, which appears in a notepad something like this:

我在CSV文件中有数据,它出现在记事本中,如下所示:

使用SSIS,平面文件连接管理器会使用“,”数字范围内的csv文件混乱

In SSIS, when I try to load this file in a Delimited format, the data which appears in the preview gets messed up due to the commas which occur in the numeric values, eg. in thousands and millions. The data looks something like this:

在SSIS中,当我尝试以分隔格式加载此文件时,由于数字值中出现逗号,预览中显示的数据会混乱,例如。成千上万。数据看起来像这样:

使用SSIS,平面文件连接管理器会使用“,”数字范围内的csv文件混乱

Is there any way in which this problem can be taken care of in the connection manager itself ?

有没有什么方法可以在连接管理器本身中处理这个问题?

Thanks!

1 个解决方案

#1


Use Text Qualifier as shown here:

使用文本限定符,如下所示:

使用SSIS,平面文件连接管理器会使用“,”数字范围内的csv文件混乱

This will take care of the columns that have quotes inside. Sometimes it gets really bad with CSV data, and I've had to resort to script components doing some cleanup, but that's really rare.

这将处理内部带引号的列。有时使用CSV数据会非常糟糕,我不得不求助于脚本组件进行一些清理,但这种情况非常罕见。

#1


Use Text Qualifier as shown here:

使用文本限定符,如下所示:

使用SSIS,平面文件连接管理器会使用“,”数字范围内的csv文件混乱

This will take care of the columns that have quotes inside. Sometimes it gets really bad with CSV data, and I've had to resort to script components doing some cleanup, but that's really rare.

这将处理内部带引号的列。有时使用CSV数据会非常糟糕,我不得不求助于脚本组件进行一些清理,但这种情况非常罕见。