TRANSLATE
Translates the given value using a given dictionary.
Syntax
Arguments
Name | Type | Description | Default Value |
---|---|---|---|
dictionary | string | ||
keepValuesWithoutTranslation | boolean | Whether to keep values that have that are not mapped to a value in the feature | |
emptyAsNull | boolean | If set, empty values will be treated as null | |
input | string/numeric |
Returns
Returns a string
value.
Examples
dictionary | keepValuesWithoutTranslation | emptyAsNull | input | Output |
---|---|---|---|---|
'a,Antman | ||||
b,Batman | ||||
d,' | false | false | 'a' |
|
'a,Antman | ||||
b,Batman | ||||
d,' | false | false | 'b' |
|
'a,Antman | ||||
b,Batman | ||||
d,' | false | false | 'c' | null |
'a,Antman | ||||
b,Batman | ||||
d,' | true | false | 'c' |
|
'a,Antman | ||||
b,Batman | ||||
d,' | true | true | 'd' | null |
'a,Antman | ||||
b,Batman | ||||
d,' | true | false | 'd' | `` |
'1234.0,good' | false | false | 1234 |
|
'1234.0,good' | false | false | 1234 |
|
'0.0,good' | false | false | 0 |
|
'-0.0,good' | false | false | 0 |
|
'-0.0,good' | false | false | 0 |
|
'1.23456e17,good' | false | false | 123456000000000000 |
|
'6.000000000000001,good' | false | false | 6 | null |
Transformation job example
SQL
Query result
dictionary | keepValuesWithoutTranslation | emptyAsNull | input | Output |
---|---|---|---|---|
'a,Antman | ||||
b,Batman | ||||
d,' | false | false | 'a' |
|
Last updated