Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Thu, 25 Mar 2004 @ 20:53:57 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: Capturing Updates in a Readable File
 
From:   Anomy Anom

<-- Anonymously Posted: Thursday, March 25, 2004 15:46 -->

This is getting more interesting....

1. Per the CREATE TABLE syntax you cannot define two separate journal-tables one for AFTER and one for BEFORE and is also not necessary ...

The process to only pick out the changes (Including Deletes) the following will be the process you would do

1. Start with a clean journal with no entries. Capture both BEFORE and AFTER journal entries

2. Checkpoint with save and ARCHIVE Journal..

3. CREATE 2 Empty table exactly alike the original table whose journal you have archive just, (For simplicity I name them first Before-Table and the next After-Table...)

4. Roll back the journal entries on the Before-Table

Now in the BEFORE-Table you should be having before image of UPDATED rows and DELETED Rows.

5. Roll forward the journal entries on the AFTER-Table

AFTER-Table should now have the after-image of newly INSERTED Rows and after-image of updated rows.

6. DELETE ROWS from Before-Table where rows exist in AFTER-table, leaving just the before image of DELETEd rows.

7. Export the rows from AFTER-table to the Non-TD system and do the Insert-Update

8. Export the rows from BEFORE-table and do the Deletes...


Hope that helps to meet your requirement...



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 15 Jun 2023