RS Source Methods
RS Source Overview
The following diagram details the interaction between the Agent and a source Connector. Review the list of methods below the diagram.
RS Source Methods
The RS Source Methods are described in detail in this section.
IConnector.Preconnect
Preconnect allows a Connector to define the user interface (UI) that users use to create connections. Use Preconnect to specify any fields, such as Username, Password, or Database Name, that require user input to connect to your technology. Once a connection has been created, Preconnect is only called again if a user re-opens the connection UI to adjust the connection settings.
IConnector.Connect
Connect instructs the Connector to open communication with its datastore. The Connector can choose to maintain or drop this connection as desired while the Connector is in use. Even if your Connector does not use this method to initialize a connection and keep it open, use the method to test that a connection can be made when it is called.
IConnector.Disconnect
Disconnect is called to instruct the Connector to close communication from its datastore and free any resources that may be associated with the connection.
IConnector.ExecuteOperation
An RS Source Connector does not require any operations. If you are not using the ExecuteOperation method, create a placeholder method that returns success.
IConnector.ExecuteMethod
ExecuteMethod is called by TIBCO Scribe® to perform any Connector-specific logic. Unlike operations, which always operate on a single object type, such as an Account, the ExecuteMethod methods may need to operate on and return any number of different object types.
To support the TIBCO Scribe® RS Source role, this method must support the following ExecuteMethod source methods:
- GetObjectDefinition — Return a DataEntity that describes the schema of a particular object. You must specify the object name, all fields, and which field is the primary key/unique identifier.
- GetObjectDefinitionList — Return a list of DataEntities that describe the schema of all source objects.
- GetReplicationData — TIBCO Scribe® executes this source side method to retrieve data that will be replicated. Three pieces of information are provided to this method from TIBCO Scribe® in the properties found in the MethodInput object:
- ObjectName — For SQL, the table that is requested for replication.
- ModificationDateFullName — The field name containing the time that the record was last updated.
- LastSyncDate — The date the system was last synchronized.
- GetChangeHistoryData — This method is executed by TIBCO Scribe® to retrieve change history information for a specific object. The MethodInput provides the name of the object for which the information is being retrieved, ObjectName, as well as the last synchronization date, LastSyncDate.
If your data technology does not automatically track deletions, use one or both of the following methods to create a Change History table, change history fields, and/or triggers:- InitReplication — This method is executed by TIBCO Scribe® at the start of each RS execution. If your data source technology does not provide change tracking, TIBCO suggests that you use this method to create a Change History table and any global triggers.
- InitReplicationObject — This method is executed by TIBCO Scribe® at the start of each RS execution. If your data source technology does not provide change tracking, TIBCO suggests that you use this method to create a Change History table and any global triggers.
For information about ways to manage or create a Change History table, see Tracking Changes.
If your data source does provide change tracking, these methods are not required.
IConnector.GetMetadataProvider
GetMetadataProvider is a required method called by TIBCO Scribe® to retrieve an active instance of the object that inherits the IMetadataProvider interface. This allows TIBCO Scribe® to access the IMetadataProvider specific methods.
IMetadataProvider.RetrieveObjectDefinitions
RetrieveObjectDefinitions is a required method called by TIBCO Scribe® to ask the Connector for a list of DataEntities that describes the schema of each object in your datasource, including a list of each object’s fields, and metadata describing the nature of each field.
IMetadataProvider.ResetMetadata
ResetMetadata is a required method called by TIBCO Scribe® to inform the Connector that the user wants TIBCO Scribe® to be aware of any schema changes to the data source. If you are caching information about object or field names, you need to clear this cache so that schema changes are visible in TIBCO Scribe®.