• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Data Truncated when selecting from Interbase column Varchar(4096)

#1 2009-06-23 12:27:26

anuradha.chaturvedi
Member
Registered: 2009-04-14
Posts: 34

Data Truncated when selecting from Interbase column Varchar(4096)

Hi,

I am using tDBInputGeneric for Interbase5.5 and it is trying to read data from table with following structure
create table HIT_TABLE
(
    HIT_ID                NUMERIC(8)             not null,
    DB_TABLE              CHAR(30)               not null,
    TBL_ACTION            CHAR(10)               not null,
    DATE_TIME             DATE                   not null,
    SELECT_KEY            VARCHAR(4096)                  ,
    CREATED_BY            CHAR(20)                       ,
    EXPORT_DATA           VARCHAR(4096)                  ,
    STORE_NUMBER          INTEGER                not null,
    PACKET_ID             NUMERIC(8)                     ,
    STATUS_ID             NUMERIC(8)             not null,
    constraint PK_HIT_TABLE primary key (HIT_ID, STORE_NUMBER)
);

this data is to be loaded into MySQL database after reading it from Interbase. The equivalent strutcure in MySQL is

But the data of SELECT_KEY and EXPORT_DATA column is getting truncated for few records. The behaviour is very strange like for example following is data of 2 records in EXPORT_DATA column
*********************************************************************************************
INSERT INTO RSPPTY (SSN, ACCNUM, DOB, OCCUP, MODDT, MODBY, ADDID, STRNUM) VALUES ('8507       ', 60984, '12-DEC-1980', '/occ/up7/', '23-JUN-2009 3:09:06.0000', 'SAMD                ', 50004878, 5157);
*********************************************************************************************
INSERT INTO PAT (ACCNUM, STRNUM, PATID, SEPLID, FNAME, LNAME, MODDT, ADDID, GENID, USERID, RELID, MCEID, EXCHR, EXCHR1, EXCHR2, EXVCHR) VALUES (60982, 5157, 0, '\scc\ndr\ ', '\first\nme5\', '\l\name5\', '23-JUN-2009 3:16:40.0000', 50004878, 'F', 'ADMIN               ', 2, '\mc\pla\            ', '\ex\ch\                                                                                             ', '\ex\ch1\                                                                                            ', '\ex\ch2\                                                                                            ', '\ex\vch\');                                                                                                                                                                                                                                                                                                                               
*********************************************************************************************
                                                                                     
The first record gets inserted successfully in MySQL but the second record is truncated and loaded as --
*********************************************************************************************
INSERT INTO PAT (ACCNUM, STRNUM, PATID, SEPLID, FNAME, LNAME, MODDT, ADDID, GENID, USERID, RELID, MCEID, EXCHR
*********************************************************************************************


I tried putting a log row just after tDBInputGeneric to view whether records are fetched correctly or not but there also data is read with truncated value as
*********************************************************************************************
INSERT INTO PAT (ACCNUM, STRNUM, PATID, SEPLID, FNAME, LNAME, MODDT, ADDID, GENID, USERID, RELID, MCEID, EXCHR
*********************************************************************************************

Currently in tDBInputGeneric following is the Datatype and length selected
HIT_ID                int(10)         
DB_TABLE              String(30)           
TBL_ACTION            String(10)           
DATE_TIME             DATE               
SELECT_KEY            String(4096)     
CREATED_BY            String(20)           
EXPORT_DATA           String(4096)     
STORE_NUMBER          int(10)           
PACKET_ID             int(10)         
STATUS_ID             int(10)

I tried increasing this default 4096 size to max 65534 but no impact.

Can you please tell why its getting truncated when we are just selecting data from Interbase with same String size.

Thanks ,
Anuradha.

Offline

#2 2009-06-23 14:09:13

anuradha.chaturvedi
Member
Registered: 2009-04-14
Posts: 34

Re: Data Truncated when selecting from Interbase column Varchar(4096)

Can anybody help me on this I am getting such issue in all columns with datatype and size as VARCHAR(4096)?
In all such columns some data gets loaded fully some data gets truncated

Offline

#3 2009-06-23 17:32:13

anuradha.chaturvedi
Member
Registered: 2009-04-14
Posts: 34

Re: Data Truncated when selecting from Interbase column Varchar(4096)

My finding after analysis is that any string exceeding 255 characters gets truncated with string data type in Talend tDBInput for Interbase.

So is it a bug in tDBInput for Interbase which is connecting Interbase with ODBC?

Please let me know your suggestions/comments on this...

Thanks
Anuradha

Offline

#4 2009-06-24 04:34:42

shong
Talend team
Registered: 2007-08-29
Posts: 10310
Website

Re: Data Truncated when selecting from Interbase column Varchar(4096)

Hello
It seems due to the ODBC driver, here is a related article.

Best regards

          shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#5 2009-06-25 08:52:38

anuradha.chaturvedi
Member
Registered: 2009-04-14
Posts: 34

Re: Data Truncated when selecting from Interbase column Varchar(4096)

Thanks again Shong for helping me out in this issue.
Once again you guys have resloved a major issue for me. It worked fine after i used cast (colname char(size)) in the select.

Really want to appreaciate and Thank you for solving this issue in a quick turn around time.

Regards
Anuradha....

Last edited by anuradha.chaturvedi (2009-06-25 08:54:24)

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » Data Truncated when selecting from Interbase column Varchar(4096)

Board footer

Powered by FluxBB