Showing less data in the database

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
shivan
Participant
Posts: 70
Joined: Mon Jul 25, 2005 9:29 am

Showing less data in the database

Post by shivan »

I am running a job. The job suppose to load 1.7 million rows in the mainframe table. It runs successfully but in the actual mainframe table it only has 40000 rows. We are doings some grouping. But i dont think so grouping reduce the data to that extent.
Data is loading from sql server to mainframe.

thanks
shivan
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Hi Shivan,

1) Check how many rows you are extracting from source( SQL server)

2) At each stage where you have a constraint, store the reject records in a reject file

3) Then finally,

Code: Select all

No of rows you are trying to load to target = No of rows you extracted from source + Total No of rows eliminated because of constraints
That being said, if you have records in the source, having the same keys but other columns are different and assuming you are using the strategy of insert and update. Then multiple rows from the source might get converted into one row, depending upon the strategy you are trying to implement. This might also cause a difference in numbers.

I hope this will get you started in your analysis.
Thanks,
Naveen
shivan
Participant
Posts: 70
Joined: Mon Jul 25, 2005 9:29 am

Post by shivan »

but i m just using grouping. How can it only process 40000 out of 1.7 million.

thanks
shivan
pnchowdary wrote:Hi Shivan,

1) Check how many rows you are extracting from source( SQL server)

2) At each stage where you have a constraint, store the reject records in a reject file

3) Then finally,

Code: Select all

No of rows you are trying to load to target = No of rows you extracted from source + Total No of rows eliminated because of constraints
That being said, if you have records in the source, having the same keys but other columns are different and assuming you are using the strategy of insert and update. Then multiple rows from the source might get converted into one row, depending upon the strategy you are trying to implement. This might also cause a difference in numbers.

I hope this will get you started in your analysis.
shivan
Participant
Posts: 70
Joined: Mon Jul 25, 2005 9:29 am

Post by shivan »

i am loading the data from sql server to mainframe.

shivan
shivan wrote:but i m just using grouping. How can it only process 40000 out of 1.7 million.

thanks
shivan
pnchowdary wrote:Hi Shivan,

1) Check how many rows you are extracting from source( SQL server)

2) At each stage where you have a constraint, store the reject records in a reject file

3) Then finally,

Code: Select all

No of rows you are trying to load to target = No of rows you extracted from source + Total No of rows eliminated because of constraints
That being said, if you have records in the source, having the same keys but other columns are different and assuming you are using the strategy of insert and update. Then multiple rows from the source might get converted into one row, depending upon the strategy you are trying to implement. This might also cause a difference in numbers.

I hope this will get you started in your analysis.
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Hi Shivan,

What exactly do you mean by "but i m just using grouping". Could you please eloborate on what you are exactly doing by grouping?
Thanks,
Naveen
shivan
Participant
Posts: 70
Joined: Mon Jul 25, 2005 9:29 am

Post by shivan »

what i doing is that.
i wrote a sql query to extract data from sql server. then i m loading in db2. The sql query extracts 1.7 million rows. But in db2 only 40,000. There is one to one mapping.

thanks
shivan

pnchowdary wrote:Hi Shivan,

What exactly do you mean by "but i m just using grouping". Could you please eloborate on what you are exactly doing by grouping?
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Hi Shivan,

After extracting data from SQL server and before loading into DB2, what tranformations are you applying to the data?
Thanks,
Naveen
shivan
Participant
Posts: 70
Joined: Mon Jul 25, 2005 9:29 am

Post by shivan »

mapping is like:
some columns, if data is "y" , do this else do this.
others are one to one

thanks
shivan
pnchowdary wrote:Hi Shivan,

After extracting data from SQL server and before loading into DB2, what tranformations are you applying to the data?
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Hi Shivan,

Could you tell me how many rows you see on the link that goes into the transformer and how many rows you see on the link that goes out of the transformer?
Thanks,
Naveen
shivan
Participant
Posts: 70
Joined: Mon Jul 25, 2005 9:29 am

Post by shivan »

they are same like 1.7 million

shivan

pnchowdary wrote:Hi Shivan,

Could you tell me how many rows you see on the link that goes into the transformer and how many rows you see on the link that goes out of the transformer?
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

Hi Shivan,

Are there any warnings in the director? If there are, can you look at the warnings.

Regards
Saravanan
ds_developer
Premium Member
Premium Member
Posts: 224
Joined: Tue Sep 24, 2002 7:32 am
Location: Denver, CO USA

Post by ds_developer »

It might happen this way if the DB2 table is missing the designation of one or more fields as part of a compound key. In essence, updating the same row over and over.

John

:oops: Yeah - it would be the other way around wouldn't it. Too many keys, not too few.
Last edited by ds_developer on Wed Aug 17, 2005 9:28 am, edited 1 time in total.
shivan
Participant
Posts: 70
Joined: Mon Jul 25, 2005 9:29 am

Post by shivan »

The problem is fixed. What was happening. The sql server has different set of primary keys then db2. So when the data was loading from sql server in the db2, it was neglecting the rows with a same value , as the pk should be unique. Example,
sql server data:
1(pk) 2(pk) 3 4 5
1 2 3 4 7
1 2 3 4 8


and the structure in db2 was

1(pk) 2(pk) 3(pk) 4 5
1(pk) 2(pk) 3(pk) 4 7
1 2 3 4 8

i hope it helps u understand what was the problem

thanks
ds_developer wrote:It might happen this way if the DB2 table is missing the designation of one or more fields as part of a compound key. In essence, updating the same row over and over.

John
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Of course it's possible. If you grouped by sex ('M' or 'F') you would only get two output rows. Think about it. How many distinct values are there in the column by which you are grouping?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply