Forum Stats

  • 3,826,865 Users
  • 2,260,714 Discussions
  • 7,897,108 Comments

Discussions

How to capture Field validation errors in the Error table in ODI 11g

885311
885311 Member Posts: 4
edited Aug 22, 2013 2:26AM in Data Integrator
Hello,

We are using ODI 11g (11.1.1.5) and the scenario is to read the data from a flat file (.txt) and do a bulk insert into MS SQL Server database table.

We need to capture the error records (if the source field size is greater than the target column size) into the error table. However the interface errors out at step "Loading - SrcSet0 - Load data (BULK INSERT)" with error message "SQLServer JDBC Driver][SQLServer]Bulk load data conversion error (truncation) for row 33, column 6" but these errors are not being inserted into the error table.

Is there a way to capture these errors in the error table? Below is the KM details.

LKM: LKM File to MSSQL (BULK)
CKM: CKM SQL
IKM: IKM MSSQL Incremental Update

FLOW_CONTROL is set to true for the IKM.

Thanks,
Krishna

Answers

  • user7374943
    user7374943 Member Posts: 21

    Hello,

    I had the same problem with ODI when I was trying BULK INSERT of the txt file into MS SQL. Check the cell(s) in your source file (txt) - it looks like the value in hte cell has hiding symbols: when pressing F2 tryng edit the value in the cell the coursor appared far to the right from the right end of the value. So, try to use backspace to delete the hiding symbols and verify the above. If avasrything is OK, then modify your txt file. Let me know if it works.

    BTW , I've created procedure inside the MS SQL 2008R2, which BULK INSERTed records into temporary (#...) table and immediatelly, without any verification all the records were inserted into the final table in the DWH here is the statement:

     

    if object_id('TEMPDB..#<table>','U') is not null drop table #<table>

    ;

     

    CREATE TABLE [dbo].[#<table>] 

    (

    [1] [varchar] (50) NULL, 

    [2] [varchar] (100) NULL, 

    [3] [varchar] (100) NULL, 

    [4] [varchar] (100) NULL, 

    [5] [varchar] (100) NULL, 

    [6] [varchar] (100) NULL, 

    [7] [varchar]  (100) NULL, 

    [8] [varchar] (100) NULL, 

    [9] [varchar] (100) NULL, 

    [10] [varchar] (100) NULL, 

    [11] [varchar] (100) NULL 

    ) ON [PRIMARY]

     

    bulk INSERT #<table> FROM 'N:\<table>.txt'

     

    with

    (FIRSTROW=2,KEEPNULLS,CODEPAGE=1252,FIELDTERMINATOR='\t'

    )

     

    INSERT

    INTO <table>

     

    SELECT

    * FROM #<table>

    and it works! Let me also know if you find any other way around.

    regards

    Anatoli

This discussion has been closed.