ODIExperts.com

The blog for Oracle Data Integrator ( ODI )

Subscribers – An example of how to use

Hi friends,

I was helping in a thread at ODI Forum, from Oracle page (http://forums.oracle.com/forums/forum.jspa?forumID=374) and I decided to describe the situation here once several people ask me similar questions

What is a Subscriber and how to use it?

  • A subscriber is a way to get the same data, from the same source, to more than one target (or process) when in CDC (Change Data Capture) mode.

I will try to demonstrate it by an example:

Situation:

  •  In a generic system, when a new client is created it is necessary to upload into a DW and send a welcome email to him.
  •  The email should be send, at top, one hour after the insert
  •  The DW load happens once a day, by midnight.

As you see, these are very distinct process. To solve it using subscribers we could do:

  1. Add the Client table to the CDC (I’m using the Simple mode here)
  2. Add 2 subscribers in the table, I named them sb_EMAIL and sb_DW
  3. Start the Journal process

Ok, now we have the environment ready to both process, load to DW and send the email

If you take a look into the journal table (J$_) after insert a new record at Client, you will see 2 records at the view, one to each subscriber and that allows you to execute distinct process to the same source DML.

In this example, to send the email an interface is used to put the new client in a table (another system is responsible to send it) then all that is necessary to be done is:

  • In the interface, check the “Journalized Data Only” and edit the filter to the subscriber “sb_EMAIL”
  • create the scenario for the interface
  • schedule it to execute once by hour at the minute 59 (like: 10:59 am, 11:59 am,  etc)

And,   to the DW load process:

  • In the interface, check the “Journalized Data Only” and edit the filter to the subscriber “sb_DW”
  • create the scenario for the interface
  • schedule it to execute once by day (midnight)

 

That is all! If you query the J$_ table near to 11:00 pm you will see all clients that were inserted  during the day with the subscriber “sb_DW” and only the clients inserted after 10:59 pm.

One last point:

if the situation doesn’t need to send the same data to more than one target, just one subscriber can be used to infinite tables.

 

Well guys, I hope to have reached the objective the explain how a subscriber can be used!!

 

Cezar Santos

7 Comments

  1. You want to add a new CDC subscriber in ODI after you have started the Journal process, what
    steps do you need to go through in order to use this new subscriber?
    A. Drop Journal, remove existing subscribers, add a new subscriber, start Journal, and edit the
    default Journalizing filter in your Interfaces
    B. Drop Journal,add anew subscriber, start Journal, and remove the default Journalizing filter in
    your Interfaces
    C. Drop Journal, add a new subscriber, start Journal, and edit the default Journalizing filter in your
    Interfaces
    D. Add anew subscriber and edit the default Journalizing filter in your Interfaces

  2. Now if everyone spoke English like you have in your post here, we wouldn’t be scratching our head every time we read Oracle documentation
    thanks Cesar.

    blahblah

  3. Hi Cezar,

    Do we need to create the subscribers before we add them to tables from CDC -> SUBSCRIBE -> or directly at this place are we creating them.

    • Hi Murali,
      Here
      CDC -> The table where the employee details are inserted when the new client is created .
      SUBSCRIBE -> Are two tables sb_EMAIL and sb_DW.

  4. Thanks so much, I have learnt more about subscribes 🙂

  5. Good Post.
    Got a great idea on how to use subscribers.

    –Sam

Leave a Reply

Required fields are marked *.