Predefined Values in the Expression Generator

The Expression Generator provides a way for you to access certain values related to your replication while writing an expression. Expand the list of expression building blocks below the expression editing area to view the options available under Values.

Replication

[FieldName] - Provides a template that shows you how to use a field name in a script. Double-click to insert the template in the script, then edit the text "FieldName". Note that you can also use the field names from the source table by expanding the Field node and double-clicking any one of the listed fields.

DBRS.SourceConnection - Provides the connection for the source table, and allows you to open a connection to the source table. For an example of how to use this value, see Global Script Function Examples.

DBRS.InternalSourceConnection - Returns the .NET connection used internally by Syniti Data Replication for accessing to the source and to the target database, unlike SourceConnection which returns as clone of the connection object used by the Replication Agent engine. This property is useful in cases where a statement must be executed using the same connection as the one used by the engine. WARNING: Use this property with great care because improper use may compromise the success of the replication. Any error generated by running a script using this connection will affect the Replication Agent and the replication process. For example if the connection is closed by the script, the engine will fail. Typically it is preferable to use the SourceConnection property.

DBRS.TargetConnection - Provides the connection for the target table, and allows you to open a connection to the target table.

DBRS.InternalTargetConnection - Returns the .NET connection used internally by Syniti DR for accessing to the source and to the target database, unlike TargetConnection which returns as clone of the connection object used by the Replication Agent engine. This property is useful in cases where a statement must be executed using the same connection as the one used by the engine. WARNING: Use this property with great care  because improper use may compromise the success of the replication.  Any error generated by running a script using this connection will affect the Replication Agent and the replication process. For example if the connection is closed by the script, the engine will fail. Typically it is preferable to use the TargetConnection property.

Field

Displays the column names from the source table. Double-click a column name to add it to the expression. If you plan to use a column name in an expression, make sure that you have set the column name to Use Unmapped in the Fields Mapping dialog. To set the Use Unmapped option, select the column name in the list of source columns, then choose Use Unmapped from the right mouse button menu.

Log Field

The following values represent values retrieved from the source database transaction log

IBM Db2 for i

Oracle

Microsoft SQL Server

TransactionID (STRING)

TransactionID (String)

TransactionID (String)

TransactionTS (DATETIME)

TransactionTS (String)

TransactionTS (String)

RecordID (LONG)

RowID (String)

 

UserID (STRING)

 

 

ReceiverLibrary (STRING)

 

 

ReceiverName (STRING)

 

 

Related Topics
Expression Generator