0

I've below input string from source and I am using mssql database to Load the data into a table, but I'm getting below error from tables:

Error from Component 'LOADP51file.Output_Table_1__table_.load', Partition 0 [U103,DB00156,DB16000,DB00250] ABINITIO(DB00156):  Put row failed for db statement ABINITIO(DB16000):  ODBC Error ABINITIO(DB16000):  SQLCODE: 0 ABINITIO(DB16000):  SQLSTATE: 22001 ABINITIO(DB16000):  MESSAGE: [Microsoft][ODBC Driver 11 for SQL Server]String data, right truncation ABINITIO(DB00250):  Rejected record value: ABINITIO(DB00250):   [record   id                "140426924"   check_valt        "0"   description         "IT IND UTP 33  £1 3D Multi ST"   style_code        "000000" 

I've observed that the above error is occurred only due to the column "description". Is it because of the £1 coming from source?

Input data   140426924|0|IT IND UTP 33  £1 3D Multi ST|000000
     Input dml:   string(9) id;   string(1) check_valt ;   string(30) description ;   string(6) style_code ;


 Output table DML:   record   string("\x01",charset="windows-1252", maximum_length=9) id

/*VARCHAR(9) NOT NULL*/;   string("\x01",charset="windows-1252", maximum_length=1) check_valt = NULL("") /*CHAR(1)*/;   string("\x01",charset="windows-1252", maximum_length=30) description = NULL("") /*VARCHAR(30)*/;   string("\x01",charset="windows-1252", maximum_length=6) style_code = NULL("") /*VARCHAR(6)*/;   end;
Natali
  • 2,934
  • 4
  • 39
  • 53
Ashishgupta
  • 1
  • 1
  • 2

3 Answers3

1

Try this:

out.description :: string_convert_explicit(in.description,"windows-1252","");

Also, if truncation is the issue:

out.description :: string_substring(string_convert_explicit(in.description,"windows-1252",""),1,30);
Alex
  • 95
  • 7
0

Please try to keep the character set as utf8.

Let us know if that works.

Thanks Arijit

Arijit
  • 1
  • 1
0

Try to use a "Redefine Format" component before the output table component and convert it to "window-1252". Until then perform all the operations in ASCII or UTF-8.

user4321
  • 605
  • 3
  • 14
  • 37