zoukankan      html  css  js  c++  java
  • SSIS 数据输出列因为字符截断而失败

    在数据源组件中,如果存在字符串类型的数据列,那么可能会存在,因为字符类型的长度不匹配,导致字符数据被截断的问题。

    SSIS报错信息:“Text was truncated or one or more characters had no match in the target code page.".

    第一种scenario是修改Output Columns的Data Type Properties。

    打开Advanced Editor,选中Input and Output Properties,在Output Columns中选中要修改的Column,修改Data Type Properties的length,增加长度。

    第二种scenario,SSIS提供TruncationRowDisposition属性,可以设置RD_IgnoreFailure选项,使数据源对字段过长的数据自动进行截断而不报错。

    TruncationRowDisposition,Specifies how the component handles rows with truncations.

    SSIS处理数据源中列值的Truncation有三种方式:

    RD_FailComponent,如果出现列值Truncation,那么数据源组件就失败;

    RD_RedirectRow,如果出现列值Truncation,那么将该数据行重定向到ErrorOutput;

    RD_IgnoreFailure,忽略错误,将列值Truncate,并将截断后的数据向下传递,类似于sql语句中的left(ouput_column,length)

     

    设置TruncationRowDisposition=RD_IgnoreFailure,类似于在输出列上应用left函数

    left( Output_Column_Name, Lenght),Length是在Data Type Properties中设置的Length。

  • 相关阅读:
    今天愣了半天硬是没想到用map,在此还原以下代码
    blob文件的存储和读取
    C#操作SQLite 报错 (Attempt to write a read-only database)
    Response.Flush()
    搜索
    直接给对方邮箱写邮件
    js
    会员模块(会员注册、会员登录、忘记密码、会员中心)
    标签大全
    网站在线留言
  • 原文地址:https://www.cnblogs.com/zhengxingpeng/p/6688121.html
Copyright © 2011-2022 走看看