DSXchange: DataStage and IBM Websphere Data Integration Forum
View next topic
View previous topic
Add To Favorites
This topic has been marked "Resolved."
Author Message
ffillmorejr
Participant



Joined: 27 Jul 2010
Posts: 10

Points: 95

Post Posted: Wed Jul 28, 2010 10:09 am Reply with quote    Back to top    

DataStage® Release: 8x
Job Type: Server
OS: Windows
I have an ODBC Stage that SELECTs rows from a System i table/physical file. This feeds a Transformer stage that puts the rows on respective INSERT/UPDATE/DELETE links to a second ODBC Stage writing to another database. Once all of the records have been processed in the second ODBC Stage, I would like to delete ("prune") all of the records I have read from the original System i table/physical file.

The Transformer Stage (in the middle) has a value used to identify the records to be deleted. I need to have the Transformer to feed that value to a third ODBC Stage to process the deletion, but only after all of the records have been processed in the target database (second ODBC Stage). I know how to pass the value from the Transformer. How do I know when the target database records have all been processed? How can I tell when the second ODBC Stage has finished successfully processing all of its input records?
anbu



Group memberships:
Premium Members

Joined: 18 Feb 2006
Posts: 403
Location: india
Points: 1588

Post Posted: Wed Jul 28, 2010 10:28 am Reply with quote    Back to top    

I dont think you can read and delete the same table in a job. Our forum experts can confirm this.

Instead you can write the key fields to a file or hash file and create another job to use it and delete rows from your source table

_________________
You are the creator of your destiny - Swami Vivekananda
Rate this response:  
Not yet rated
kris007


since March 2006

Group memberships:
Premium Members

Joined: 24 Jan 2006
Posts: 1088
Location: Riverside, RI
Points: 7446

Post Posted: Wed Jul 28, 2010 10:41 am Reply with quote    Back to top    

If your source is a table, you will have to split your process into two jobs to delete the data from the source. If your source is a physical file then you can write your flagged records from the transformer stage into a sequential file and overwrite your source file as part of your after job subroutine.

_________________
Kris

Where's the "Any" key?-Homer Simpson
Rate this response:  
Not yet rated
ArndW

Premium Poster
Participant

Group memberships:
Premium Members, Inner Circle, Australia Usergroup

Joined: 16 Nov 2004
Posts: 14022
Location: Germany
Points: 79230

Post Posted: Wed Jul 28, 2010 10:49 am Reply with quote    Back to top    

You can have your transform stage output records to a flat file; then have an output link on that file which won't get executed until the last row has been written to it.

_________________
Image
Rate this response:  
Not yet rated
kris007


since March 2006

Group memberships:
Premium Members

Joined: 24 Jan 2006
Posts: 1088
Location: Riverside, RI
Points: 7446

Post Posted: Wed Jul 28, 2010 11:16 am Reply with quote    Back to top    

But the OP wanted all the records to get inserted/updated into the target table before the process can start deleting the records from the source table.

_________________
Kris

Where's the "Any" key?-Homer Simpson
Rate this response:  
Not yet rated
arunkumarmm
Participant



Joined: 30 Jun 2008
Posts: 98
Location: New York
Points: 527

Post Posted: Wed Jul 28, 2010 11:32 am Reply with quote    Back to top    

Best way is to do the delete in a sep. job.

_________________
Arun
Rate this response:  
Not yet rated
Sainath.Srinivasan

Premium Poster
Participant

Group memberships:
Heartland Usergroup

Joined: 17 Jan 2005
Posts: 3293
Location: United Kingdom
Points: 13965

Post Posted: Wed Jul 28, 2010 2:48 pm Reply with quote    Back to top    

First-and-foremost, is the source table used by any other system ? If so, modifying its content will impact them. Have you discussed your method with such potential system's owners ? Second, if ...
Rate this response:  
Not yet rated
ffillmorejr
Participant



Joined: 27 Jul 2010
Posts: 10

Points: 95

Post Posted: Tue Aug 10, 2010 7:31 am Reply with quote    Back to top    

Thank you to all who responded to this post. I have blogged on the integration of InfoSphere Change Data Capture and DataStage - including the solution to the pruning question I had posted here.

http://www.thefillmoregroup.com/blog/?p=369
Rate this response:  
Not yet rated
Display posts from previous:       

Add To Favorites
View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Powered by phpBB © 2001, 2002 phpBB Group
Theme & Graphics by Daz :: Portal by Smartor
All times are GMT - 6 Hours