Beruflich Dokumente
Kultur Dokumente
In my previous post have described how to implement CDC in ODI 11g. Now am going to explain how it will work backend process.
Once CDC enabled you can see below table and views and trigger will be created in database.
1. J$SATYA_W_PARTY_DS -- Table
2. JV$SATYA_W_PARTY_DS -- View
3. JV$DSATYA_W_PARTY_DS -- view
J$ tables contains the PK of the changed records in the table that is monitored for changes, along with the name of the
subscriber for whom that change is recorded.
For ex:- See my below screen for your reference.
[http://3.bp.blogspot.com/-ZwMUyc7Q4CI/Vk1t3hZIH0I/AAAAAAAAAJw/y30wgKprm34/s1600/Screenshot_17.jpg]
JRN_CONSUMED:The JRN_CONSUMED is used to logically lock the records: when the records are inserted in the J$ table, the value is set to 0.
Note :- Simple CDC the lock/unlock opera ons are performed by the IKMs. When the IKMs lock the records, the value is changed to
1. The unlock process only purges records with a value equal to 1.
JRN_FLAG:- The JRN_FLAG column indicates the type of change detected in the source system. Deleted records are
JRN_DATE:- Date and me of the change.
PK Column : Column x of the primary key (each column of the primary key of the source table is represented as a separate
column in the J$ table)
What does the view in backend(JV$ view ):-
The JV$ view is the view that is used in the mappings where you select the op on Journalized data only. Records from the J$ tables are ltered
so that only the following records are returned:
If the same PK appears mul ple mes, only the last entry for that PK (based on the JRN_DATE) is taken into account. Again the logic here is
that we want to replicate values as they are currently in the source database. We are not interested in the history of intermediate values
that could have existed.
Similarly to the JV$ view, the JV$D view joins the J$ table with the source table on the primary key. This view shows all
changed records, locked or not, but applies the same lter on the JRN_DATE column so that only the last entry is taken into
account when the same record has been modied mul ple mes since the last consump on cycle. It lists the changes for all
subscribers.
[http://3.bp.blogspot.com/-V2_d3CUNm8Y/Vk12iZt6xAI/AAAAAAAAAJ8/-ZRmFMxVHfc/s1600/Screenshot_18.jpg]
Finally we will talk about trigger. What does trigger will do in backend?
Trigger will check what type of changes happen in source table . Insert or update or delete . Based on type it will dene JRN_FLAG in
J$ table.
For Ex:- For your be er understand have provided my trigger script.
Add a comment
Comment as:
Publish
Notify me