A conditional statement can be simple or complex depending on individual requirements. To build a correct statement, follow these rules.
Literal Values
When using literal values such as "New York," enclose the value in double quotation marks. Attribute names and numeric values do not require quotation marks. Any numeric value enclosed in quotation marks, such as "123" will be read as a literal value.
Comments
You can use "/*" as a comment character at the beginning of a line. For multi-line comments, use "/*" at the beginning of each line.
Example
/* Example of comments in the Transformer
/* conditional
statements
Multiple Lines
You can extend a conditional statement into multiple lines. Use "\" as a continuation character at the beginning of each additional line.
Example
SET ATTRIBUTE1 = TRIM(ATTRIBUTE2) |: TRIM(ATTRIBUTE3)
\ |: TRIM(ATTRIBUTE4)
\ |: TRIM(ATTRIBUTE5)
Renamed Attributes
If you have changed the name of an attribute in the Schema Editor and you want to use that attribute in the conditional statements, you must use the original name of the attribute instead of the new name. You can find the original name of the attribute in the Schema Editor.
To find the original name of the attribute