System variables are the variables defined by Data Exchange to describe transformation information.
Using system variables you can, for example, perform a logical delete; that is, mark a target record as deleted when the source record is deleted physically. Before you perform a logical delete, the source DML command Delete, on the classifier level, must have the target DML command set to Update.
To perform a logical delete for the target feature, you will need to define an expression similar to the following:
IfElse(<<$Source_DML_Command>> == “Delete”,”X”, IfElse(<<$Source_DML_Command>> == “Update”,”U”,”I”))
The expression checks the source DML command and assigns a value to the target. If the source DML command is Delete, the target is assigned the value X. Similarly, if the source DML command is Update, the target is assigned the value U, otherwise it is assigned the value I, which represents Insert.
The following table lists the available system variables.
Table 2. System Variables
System Variable | Description |
---|---|
$Source_Classifier_Name | The source classifier name |
$Source_Data_Manager_Type | The type of the source data manager (Enterprise Database Server, RDMS, SQL Server) |
$Source_DML_Command | The DML command at the source |
$Source_Feature_Name | The source feature name |
$Source_Host | The host of source data manager |
$Source_Schema_Name | The source schema name |
$Source_User | The user id which Runtime uses to connect to the source. |
$Target_Classifier_Filter | The classifier filter string defined on the target classifier |
$Target_Classifier_Name | The target classifier name |
$Target_Data_Manager_Type | The type of the target data manager (Enterprise Database Server, SQL Server, Oracle database, Kafka) |
$Target_ DML_Command | The DML command at the target |
$Target_Feature_Expression | The expression string defined on the target feature |
$Target_Feature_Name | The target feature name |
$Target_Host | The host of target data manager |
$Target_Schema_Name | The target schema name |
$Target_User | The user id which Runtime uses to connect to the target. |
$Transformation_Id | The GUID of the transformation |
$Transformation_Name | The name of the transformation |
$Transformation_Version | The deployed version of the transformation |
$DE_Processing_Local_DateTime | The local date time available on the Runtime processing partition |
$DE_Processing_UTC_DateTime | The UTC date time available on the Runtime processing partition |