Read from a DB@

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
ssgrpid
Participant
Posts: 25
Joined: Thu Jul 28, 2005 6:05 pm

Read from a DB@

Post by ssgrpid »

Hi,

Scenario: I am designing a shared container. In this container, I am inserting few rows into a DB2 table (lets say X). Later in this container, I have to extract same table (X) which should contain the inserted rows also.

Question: How do I do this?

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

Post by pnchowdary »

Hi,

After you insert some rows into a DB2 table and commit the changes. You should not have any problem reading the commited changes in further stages. Whether you are doing this inside a shared container or not, will not make any difference in the above behavior.
Thanks,
Naveen
ssgrpid
Participant
Posts: 25
Joined: Thu Jul 28, 2005 6:05 pm

Post by ssgrpid »

When updating the table (for firsttime) I have a user defined SQL. In the after tab of the SQL I am commiting the recoded. I am doing a sparce lookup later in that stage. but the problem is, that the job is running so fast (with 82,000 records) that it is doing the lookup even before commiting. I am not able to contol the speed of execution.

This problem is still open to me
vmcburney
Participant
Posts: 3593
Joined: Thu Jan 23, 2003 5:25 pm
Location: Australia, Melbourne
Contact:

Post by vmcburney »

Messy. To get a commit to happen on every row just set the transaction and array sizes to 1. They are optional options on most parallel DB stages and default at 1000. That way you can be sure the row is in the database before you query it.

I assume you are doing this to retrieve a generated sequence number back from the database.
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

You can also use some sort of sleep statement to delay the execution of that particular stage.
Thanks,
Naveen
Post Reply