RS Source Connectors

The TIBCO Scribe® Replication Service (RS) Source is the origin of the data to be replicated, and can be any data store that you want to replicate.

Tracking Changes

Before developing an RS Source Connector, determine if the data source you are connecting to has a process to track data changes. Connectors require a single timestamp per record that is changed the last time the data was synchronized to retrieve all records that were created, updated, or deleted since the last replication.

Determine if your data source uses a time stamp to indicate a change in data. If the data source does not have a process for tracking changes, see if you can implement a change tracking process using a Connector interaction with the data source.

Creating A Change History Table

If your data source does not automatically track changes, but does support triggers for data changes, you can implement a Change History table along with the triggers to maintain it. For each data change, the table must track the table name, time stamp, and primary key. To create a Change History Table and trigger:

  • Add code to create the Change History table in your implementation of InitReplication, which is called once at the start of each RS execution.
  • Add code to create the trigger for each table in your InitReplicationObject method, which is called once for each table at the start of replication.

Instead of creating a Change History table, you can consider having the InitReplicationObject method add a Last Modified field to each table along with a trigger to maintain this field for each record.

Managing The Time Stamp

When a Connector retrieves metadata, it must specify the field in the source that contains the time stamp. Your Connector’s GetReplicationData implementation must retrieve all data that changed since the last time the replication was run. If this is an initial replication, it receives a minimum date of 1/1/0000. If this date value is outside the range of what your data source supports, you may need to adjust it.

Data Type Conversion

When a Connector retrieves data from a source, it must be converted into a common data type to enable transfer between systems. Connectors must use .NET standard data types to transfer data, as follows:

  • RS Source Connectors must convert data to .NET standard data types.
  • RS Target Connectors will receive data as .NET data types. The Connector must convert the data to the expected format of the target system.

See Also

RS Source Methods

RS Solution Pseudo Code

Additional Information

Installing A Connector Locally