为什么没有将所有记录从 CSV 复制到 SSIS 包中的 SQL 表 [英] Why all the records are not being copied from CSV to SQL table in a SSIS package

查看:16
本文介绍了为什么没有将所有记录从 CSV 复制到 SSIS 包中的 SQL 表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 SSIS 将数据从平面文件复制到 SQL 表.我有一个数据流任务,我在其中创建了一个指向 csv 文件的平面文件源和一个指向我想要数据的表的 OLE DB 目标.我面临的问题是,当我运行包时,我只将 2621 行复制到 SQL 目标表,其中 csv 中有大约 1,70,000 条记录.不知道为什么会这样.

I am trying to copy data from a flat file to a SQL table using SSIS. I have a Data Flow Task where I have created a Flat File Source pointing to the csv file and an OLE DB Destination pointing to the table I want the data in. The problem I am facing is when I run the package, I get only 2621 rows copied to the SQL destination table, where I have about 1,70,000 records in the csv. Not sure why this is happening.

提前致谢.

推荐答案

这可能有很多方面.这是我想到的:

This could be a number of things. This is what comes to mind:

  1. 平面文件的连接字符串被变量表达式或包配置覆盖.检查 SSIS ->包配置 或连接管理器上的 Expressions 属性.
  2. 平面文件连接管理器上的 DataRowsToSkip 属性设置为一个值.
  3. 您的平面文件的元数据定义在您的连接管理器中配置不正确.查看FormatRow delimiterColumn delimiter等属性,使用预览功能查看输出.
  4. 您的平面文件源上的错误输出设置为 Ignore failure,这意味着 SSIS 无法处理的行(例如,由于数据类型不兼容)将在没有警告的情况下被忽略.
  1. The connection string to your flat file is overwritten by a variable expression or a package configuration. Check SSIS -> Package configurations or the Expressions properties on your connection manager.
  2. The DataRowsToSkip property on your flat file connection manager is set to a value.
  3. The meta data definition of your flat file is incorrectly configured in your connection manager. See properties such as Format, Row delimiter, Column delimiter, etc. Use the preview function to see the output.
  4. The error output on your flat file source is set to Ignore failure, meaning that lines which SSIS cannot process (due to, e.g., incompatible data types) are ignored without warning.

这篇关于为什么没有将所有记录从 CSV 复制到 SSIS 包中的 SQL 表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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