Some lines of data missing when inserting into DB2

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
kanasai167
Participant
Posts: 63
Joined: Mon Sep 12, 2011 2:11 am

Some lines of data missing when inserting into DB2

Post by kanasai167 »

My textfile got around 140,000 lines.
It is a fixed length file where i retrieve from a mainframe.
I put it under a Sequential file with format :
Record delimiter = UNIX newline
Delimiter = None

However , after i run the job , the result over the DSLink shows only 125,000 rows , 3800 rows/sec.
Is this mean only 125,000 lines of data being insert into my db2 ?
(by the way im new to db2 , how can i know total of rows of the table in db2?)
The 15,000 lines is being rejected when insert into db2 for what reason?

Thanks
MT
Premium Member
Premium Member
Posts: 198
Joined: Fri Mar 09, 2007 3:51 am

Re: Some lines of data missing when inserting into DB2

Post by MT »

Hi kanasai167

getting the number of rows in a able is a simple SQL statement:
select count(*) from <schemaname>.<tabname>

Rows can get rejected if there is a unique contraint on the table or something similar.

Contact your DBA for further details
regards

Michael
kanasai167
Participant
Posts: 63
Joined: Mon Sep 12, 2011 2:11 am

Post by kanasai167 »

thanks for the help on the count of rows.

im creating a new table to store the data from a fixed length textfile.
Im using the DB2 UDB API to insert the data into db2 by turning on the generate DDL to create table.

How should i remove the unique contraint ? Is it on the source(textfile) or the destination(db2 table) ?
suse_dk
Participant
Posts: 93
Joined: Thu Aug 11, 2011 6:18 am
Location: Denmark

Post by suse_dk »

Do you define a primary key for your table? If yes, then you have a unique contraint.

But are you sure that you read ALL 140.000 records from the source succesfully?

What is the record count from the source output link? Try to put a reject link on the sequential file stage and catch for catching any reject due to format issues.

For your target stage then I don't know if it supports reject links, but if it does then add a reject link here as well.
_________________
- Susanne
kanasai167
Participant
Posts: 63
Joined: Mon Sep 12, 2011 2:11 am

Post by kanasai167 »

no , i didnt define anything in the new table.
I already put a reject link , i found out that some of the data the last column are blank. So i believe the record delimiter is stored at the second last column ? So it is rejected?
Post Reply