Literals
In an expression, a literal is a value that remains unchanged when data is migrated into the target; literal values are transferred exactly as written. In Integration Composer, you can specify literals for strings and for the following primitive data types: boolean, char, integer, and floating-point.
String
To specify a series of alphanumeric characters as a value in the target, use double quotes around a string of more than one alphanumeric character. For example, "MB."
You can use the following literals for escape sequences:
"\n" for New line
"\r" for Return
"\t" for Tab
"\b" for Backspace
"\f" for Form feed
"\'" for Single quote
"\"" for Double quote
"\?" for Question mark
"\\" for Backslash
Boolean
For a boolean data type, you can specify the following literal values:
true
false
Char
To specify a single character as a literal value in the target, use single quotes around a single character or escape sequence. For example, 'Y' or '\n'.
You can use the following literals for escape sequences:
'\n' for New line
'\r' for Return
'\t' for Tab
'\b' for Backspace
'\f' for Form feed
'\'' for Single Quote
'\"' for Double Quote
'\?' for Question Mark
'\\' for Backslash
In Java programming language, char values represent unicode characters. Unicode is an encoding standard that provides a unique number for every character; this standard is useful because it is independent of platforms, programs, and languages. You can convert unicode to ASCII characters using an escape sequence, as shown in the following example, which produces the copyright symbol.
char c = '\u00F6';
Character letter = new Character('\u00F6');
char copyright = '\u00A9';
Integer
You can express integer literals in decimal, octal, or hexadecimal format. For example, the value 64 may be specified in the following ways:
64 | Decimal is the default 32-bit value. |
0100 | Octal |
0X40 | Hexadecimal |
64L | To specify the 64-bit literal, use the suffix L for long. |
Floating-Point
Floating-point literals can be specified as a numeric value expressed in one of the following ways:
Literal | Example |
---|---|
Decimal point | 7.512 |
The letter E or e for scientific notation | 6.48e+9 |
The suffix F or f for a 32-bit float literal | 7.89f |
The suffix D or d for a 64-bit double literal | 456d |
The default for a floating-point literal without an f or d suffix is a 64-bit double literal.