Advanced Modifiers

Data Mapping using a second version of mapping method.

ADVANCED MODIFIERS

Advanced Modifiers indicate a secondary and more developer-friendly approach to modify data.

There are two accepted formats for using advanced modifiers:

  • Format 1 (Keyword arguments): Specifying parameter names while passing values

Example:
ARRAY_APPEND([1,2,3], element=5) (or)
ARRAY_APPEND(source=[1,2,3], element=5)
  • Format 2: Without mentioning parameter names

Example:
ARRAY_APPEND([1,2,3], 5)
Note:
String must be passed by enclosing the data in single or double quotes.
GROUP and EXPRESSION are deprecated.

Description of Various Modifiers

ARRAY_APPEND

DESCRIPTION

Adds an element at the end of the array.

Note: If source is not a list, it returns source.

SYNTAX

ARRAY_APPEND(source*,element*)

PARAMETER

Name

Type

Description

source

list

Source field - array in which elements are to be appended

element

any

Element to be added at the end of source list

EXAMPLE

Source Data

Expression

Output

menu = ["chocolates","biscuits"]

ARRAY_APPEND(menu,"cakes")

["chocolates","biscuits","cakes"]

ARRAY_EXTEND

DESCRIPTION

Returns extended list if source and element are lists, else appends the element to the list.

SYNTAX

ARRAY_EXTEND(source*,element*,default)

PARAMETER

Name

Type

Description

source

list

Source field - array which is to be extended

element

list/ int/ float/ dictionary/ string

Element to be extended to the source list

default

string

Default value: "NOT_IN_SOURCE"

EXAMPLES

Source Data

Expression

Output

menu = ["chocolates","biscuits"]

new_items = ["cakes","ice creams"]

ARRAY_EXTEND(menu,element=new_items)

["chocolates","biscuits","cakes","ice creams"]

menu="chocolates"

new_items =["cakes","ice creams"]

ARRAY_EXTEND(menu,new_items)

["chocolates","cakes","ice creams"]

ARRAY_INSERT

DESCRIPTION

Adds an element at the specified index of the list. If the index is not mentioned, the element is added at the zeroth index.

SYNTAX

ARRAY_INSERT(source*,element*,index)

PARAMETER

Name

Type

Description

source

list

Source field - array in which element has to be inserted

element

any

Element to be inserted in the list

index

integer

Index at which the element has to be inserted.

Default value: 0

EXAMPLES

Source Data

Expression

Output

menu = ["chocolates","biscuits"]

ARRAY_INSERT(menu,"cakes",1)

["chocolates","cakes","biscuits"]

menu = ["chocolates","biscuits"]

ARRAY_INSERT(menu,"cakes")

["cakes","chocolates","biscuits"]

ARRAY_PUSH

DESCRIPTION

Returns a list containing the input.

Note: ignore_none must be used only as a keyword argument

SYNTAX

ARRAY_PUSH(args*,ignore_none)

PARAMETER

Name

Type

Description

args

any

n source fields (n>=1)

Data to be pushed into list

ignore_none

boolean

Indicates whether None should be taken into account or not

EXAMPLES

Source Data

Expression

Output

company="DCKAP"

ARRAY_PUSH(company)

["DCKAP"]

company="DCKAP"

product="INTEGRATOR"

ARRAY_PUSH(company,product)

["DCKAP","INTEGRATOR"]

company="DCKAP"

product="INTEGRATOR"

ARRAY_PUSH(company,product,sample)

["DCKAP","INTEGRATOR","NOT_IN_SOURCE"]

company="DCKAP"

product="INTEGRATOR"

ARRAY_PUSH(company,product,sample,ignore_none=True)

["DCKAP","INTEGRATOR"]

ARRAY_REMOVE

DESCRIPTION

Returns the list after removing the element if the element is mentioned.

(i) If index is only mentioned,

  • Returns the list after removing the element at the specified index if it is a valid index.

  • Returns source if the index is out of range.

(ii) If element is only mentioned,

  • Returns the list after removing the element mentioned if the element is present in the list.

  • Returns source if the element is not in the list.

(iii) If both element and index are mentioned,

  • Returns the list after removing the specified element if present (ignoring the index).

  • Returns source if the specified element is not in the list.

(iv) If both element and index are not mentioned,

  • Returns the list after removing the element at zeroth index.

(v) If source is not a list,

  • Returns source.

SYNTAX

ARRAY_REMOVE(source*,element,index)

PARAMETER

Name

Type

Description

source

list

Source field - array from which element has to be removed

element

any

Element to be removed

index

int

Index of the element to be removed

EXAMPLES

Source Data

Expression

Output

item_ids=[1001,1002,1003,1004]

ARRAY_REMOVE(item_ids,1003)

[1001,1002,1004]

item_ids=[1001,1002,1003,1004]

ARRAY_REMOVE(item_ids,index=2)

[1001,1002,1004]

item_ids=[1001,1002,1003,1004]

ARRAY_REMOVE(item_ids,2)

[1001,1002,1003,1004]

item_ids=[1001,1002,1003,1004]

ARRAY_REMOVE(item_ids)

[1002,1003,1004]

item_ids=[1001,1002,1003,1004]

ARRAY_REMOVE(item_ids,1001,3)

[1002,1003,1004]

item_ids=[1001,1002,1003,1004]

ARRAY_REMOVE(item_ids,1005)

[1001,1002,1003,1004]

CAPITALIZE

DESCRIPTION

Returns string with the first character of the string converted to capital (uppercase) letter while making all other characters in the string as lowercase letters.

Note: Returns source if source is not a string

SYNTAX

CAPITALIZE(source*)

PARAMETER

Name

Type

Description

source

string

Source field - data to capitalize

EXAMPLE

Source Data

Expression

Output

name="ironman"

CAPITALIZE(name)

"Ironman"

CONCATENATE

DESCRIPTION

Returns a string by joining the user inputs (with the mentioned join character, if any).

Note: join_chars must be used only as keyword argument

SYNTAX

CONCATENATE(args*,join_chars)

PARAMETER

Name

Type

Description

args*

string

n source fields (n>=1)

Fields to be joined

join_chars

string

The string that must appear between the sources when the source fields are joined. Default Value: ''

EXAMPLES

Source Data

Expression

Output

name="integrator"

connector="@"

domain ="dckap.com"

CONCATENATE(name,connector,domain)

"integrator@dckap.com"

first_name="Iron"

last_name="Man"

CONCATENATE(first_name,last_name,join_chars=" ")

"Iron Man"

CONVERT_TIME

DESCRIPTION

Converts time from 12 hrs format to 24 hrs format and vice versa

SYNTAX

CONVERT_TIME(source*)

PARAMETER

Name

Type

Description

source

string

Source Field - time to be converted

EXAMPLES

Source Data

Expression

Output

created_at='11:37:00 pm'

CONVERT_TIME(created_at)

"23:37:00"

created_at='23:37:00'

CONVERT_TIME(created_at)

"11:37:00 PM"

CONVERTER

DESCRIPTION

Looks for source in keys of converters dictionary and returns the corresponding value.

SYNTAX

CONVERTER(source*,converters*)

PARAMETER

Name

Type

Description

source

string

Source field - key which needs to be replaced with value from converters dictionary

converters (editable key-value pair icon)

dictionary

Reference dictionary from which the value of source is to be retrieved

EXAMPLES

Source Data

Converters

Expression

Output

country="United States"

{"India":"+91","United States":"+1"}

CONVERTER(country,converters)

"+1"

country="United Kingdom"

{"India":"+91","United States":"+1"}

CONVERTER(country,converters)

"NOT_IN_SOURCE"

country="United Kingdom"

{"India":"+91","United States":"+1","__default__":"Data Not Available"}

CONVERTER(country,converters)

"Data Not Available"

COUNT

DESCRIPTION

Returns the length of source;

Returns zero, if the source is of invalid datatype.

SYNTAX

COUNT(source*)

PARAMETER

Name

Type

Description

source

string/list/dictionary

Source field for which length has to be calculated

EXAMPLES

Source Data

Expression

Output

items=[100,200,300]

COUNT(items)

3

country_codes={"India":"+91","United States":"+1"}

COUNT(country_codes)

2

DATATYPE_CONVERTER

DESCRIPTION

Converts the input to requested datatype

SYNTAX

DATATYPE_CONVERTER(source*,datatype)

PARAMETER

Name

Type

Description

source

any

Source field which has to be converted

datatype

int,float,boolean,list,dict

Datatype to which source has to be converted. Can be provided with quotes like 'int'.

EXAMPLES

Source Data

Expression

Output

country_codes={"India":"+91","United States":"+1"}

DATATYPE_CONVERTER(country_codes,’list’)

["India","United States"]

price=100.123

DATATYPE_CONVERTER(price,int)

100

DATETIME_FORMATTER

DESCRIPTION

Formats the datetime (object or string) to user specified string date format.

SYNTAX

DATETIME_FORMATTER(source*,requested_format,default)

PARAMETER

Name

Type

Description

source

Datetime object/ string

Source field to be converted into the requested format

requested_format

string

Desired format of time

default

EXAMPLE

Source Data

Expression

Output

created_at='Sat, 27 Jan 2018 17:16:55 +0000'

DATETIME_FORMATTER(created_at,'%Y-%m-%d %I:%M:%S %p')

'2018-01-27 05:16:55 PM'

DECODE

DESCRIPTION

Decodes the encoded string (codec registry)

SYNTAX

DECODE(source*)

PARAMETER

Name

Type

Description

source

bytes

Source field - bytes data to be decoded

EXAMPLE

Source Data

Expression

Output

secret=b'St\xc3\xa5le'

DECODE(secret)

'Ståle'

EMAIL_VALIDATOR

DESCRIPTION

Returns the email address if valid, else default

SYNTAX

EMAIL_VALIDATOR(source*,default)

PARAMETER

Name

Type

Description

source

string

Source field - email to be validated

default

string

Value to display if email is invalid

Default value: "NOT_IN_SOURCE"

EXAMPLES

Source Data

Expression

Output

contact_mail="integrator@dckap.com"

EMAIL_VALIDATOR(contact_email)

"integrator@dckap.com"

contact_mail="integrator"

EMAIL_VALIDATOR(contact_email)

"NOT_IN_SOURCE"

contact_mail="integrator"

EMAIL_VALIDATOR(contact_email,"Invalid email")

"Invalid email"

ENCODE

DESCRIPTION

Encodes the string (codec registry)

SYNTAX

ENCODE(source)

PARAMETER

Name

Type

Description

source

string

Source field to be encoded

EXAMPLE

Source Data

Expression

Output

secret='Ståle'

ENCODE(secret)

b'St\xc3\xa5le'

ENDSWITH

DESCRIPTION

Returns true if the string ends with the mentioned suffix in the specified index range else False. Returns false if source is not a string.

SYNTAX

ENDSWITH(source*,suffix*,start,end)

PARAMETER

Name

Type

Description

source

string

Source field

suffix

string

Suffix string with which the check on source has to be made.

start

integer

Start index of the string

end

integer

End index of the string

EXAMPLES

Source Data

Expression

Output

message="Great Day"

ENDSWITH(message,"ay")

true

message="Great Day"

ENDSWITH(message,"ay",1,5)

false

FIND_AND_MATCH

DESCRIPTION

For the given source dictionary,

Returns result_key if the value of find_key is check_value.

Returns default otherwise.

SYNTAX

FIND_AND_MATCH(source*,find_key*,check_value*,result_key*,default)

PARAMETER

Name

Type

Description

source

dictionary

Source field

find_key

string

Key to search in source dictionary

check_value

any

Value to check for find_key

result_key

string

Key whose value is to be returned as result

default

string

String to display in absence of find_key or result_key or a different check_value

Default Value: "NOT_IN_SOURCE"

EXAMPLES

Source Data

Expression

Output

signatures= {"Subject":"Request", "Sign":"Sincerely"}

FIND_AND_MATCH(signatures,"Subject",'Request','Sign')

"Sincerely"

signatures= {"Subject":"Request", "Sign":"Sincerely"}

FIND_AND_MATCH(signatures,"Subject",'Friend','Sign','Data not available')

"Data not available"

IFELSE

DESCRIPTION

If the condition is satisfied, it executes on_success, else runs on_fail.

SYNTAX

IFELSE(condition,on_success,on_fail)

PARAMETER

Name

Type

Description

condition

field/another expression

Field or expression to be checked for some value

on_success

field/another expression

If value exists, field/expression to be returned

on_fail

field/another expression

If value does not exist, field/expression to be returned

EXAMPLES

Source Data

Expression

Output

company_name='DCKAP'

IFELSE(company_name,company_name,'INTEGRATOR')

"DCKAP"

first_name="Iron"

last_name="Man"

IFELSE(company_name,company_name,CONCATENATE(first_name,last_name),join_chars=" ")

"Iron Man"

IFELSE supports additional capabilities to check conditions with the operators <, <=, >, >=, ==, !=

Examples:

IFELSE(AGE>=18,"Yes","No")

IFELSE(COUNT('ABC')>=COUNT(LSTRIP(" ABC")),UPPER(first_name),"No Name")

IGNORE_ASCII

DESCRIPTION

Returns string after removing Unicode characters.

Returns source if the source is not a string.

SYNTAX

IGNORE_ASCII(source*)

PARAMETER

Name

Type

Description

source

string

Source field from which Unicode characters are to be removed

EXAMPLE

Source Data

Expression

Output

name='Škoda'

IGNORE_ASCII(name)

'koda'

ISLOWER

DESCRIPTION

For string, returns true if all the alphabets are lowercase(a-z) else returns false.

Note: If source is not a string, return false.

SYNTAX

ISLOWER(source*)

PARAMETER

Name

Type

Description

source

string

Source field which is to be checked

EXAMPLE

Source Data

Expression

Output

category="chocolate"

ISLOWER(category)

true

ISUPPER

DESCRIPTION

For string, returns true if all the alphabets are uppercase(A-Z) else returns false.

If source is not a string, it returns false.

SYNTAX

ISUPPER(source*)

PARAMETER

Name

Type

Description

source

string

Source field which is to be checked

EXAMPLE

Source Data

Expression

Output

category="chocolate"

ISUPPER(category)

false

LJUST

DESCRIPTION

Left aligns the string, using a specified character (space is default) as the fill character for making the length of the output string as the mentioned width.

Note: Returns source, if source is not a string.

SYNTAX

LJUST(source*,width*,fillchar)

PARAMETER

Name

Type

Description

source

string

Source Field

width

integer

Length of the output

fillchar

string

String to make the text to the desired width and left justified

Default value:' '

EXAMPLES

Source Data

Expression

Output

message='hello'

LJUST(message,10)

'hello '

message='hello'

LJUST(message,10,'-')

'hello-----'

LOWER

DESCRIPTION

Converts all uppercase characters in the string to lowercase

SYNTAX

LOWER(source*)

PARAMETER

Name

Type

Description

source

string

Source field to be converted into lowercase

EXAMPLES

Source Data

Expression

Output

gender='Male'

LOWER(gender)

'male'

LSTRIP

DESCRIPTION

Returns a copy of string with leading prefix characters removed.

If no prefix is passed, it removes leading spaces.

Note: If source is not a string, returns source.

SYNTAX

LSTRIP(source*,prefix)

PARAMETER

Name

Type

Description

source

string

Source field

prefix

string

String to be stripped

EXAMPLES

Source Data

Expression

Output

city=' Chennai'

LSTRIP(city)

'Chennai'

city='XXXXChennai'

LSTRIP(city,'X')

'Chennai'

MATH

DESCRIPTION

Performs arithmetic operations and returns the result.

Note: operator must be used only as keyword argument

SYNTAX

MATH(args*,operator*)

PARAMETER

Name

Type

Description

args

int/float

Two Source fields to be given (operands)

operator

'+','-','*','/','**','%','//'

Operation to be performed

EXAMPLES

Source Data

Expression

Output

MATH(10,3,operator='**')

1000

price=100,

quantity=5

MATH(price,quantity,operator='*')

500

NOW

DESCRIPTION

Current datetime will be returned based on timezone.

SYNTAX

NOW()

EXAMPLE

Source Data

Expression

Output

NOW()

2022-02-04 09:26:59.624294

PARTITION

DESCRIPTION

Splits the string at the first occurrence of the separator and returns a tuple containing the part before the separator, separator, and the part after the separator.

Note: If the input is not a string, returns string.

SYNTAX

PARTITION(source*,separation*)

PARAMETER

Name

Type

Description

source

string

Source Field

separation

string

String at which partition has to be made

EXAMPLES

Source Data

Expression

Output

message= 'Hello world'

PARTITION(message,'l')

'He', 'l', 'lo world'

RAW_VALUE

DESCRIPTION

If consider_source is set to True, returns value from source (if source exists and is not None) else returns value.

SYNTAX

RAW_VALUE(source*,value*,consider_source)

PARAMETER

Name

Type

Description

source

any

Source field

value

any

Value to be returned if source doesn’t exist

consider_source

boolean

Whether to take source value into consideration or not

EXAMPLES

Source Data

Expression

Output

product='INTEGRATOR'

RAW_VALUE(product,'DCKAP')

'DCKAP'

product='INTEGRATOR'

RAW_VALUE(product,'DCKAP',True)

'INTEGRATOR'

REMOVE_SPECIAL_CHARACTERS

DESCRIPTION

Removes special characters from the string. Selective special characters can be alone removed by using the parameter selections. Selective special characters can be alone retained by using the parameter exceptions.

SYNTAX

REMOVE_SPECIAL_CHARACTERS(source*,selections,exceptions)

PARAMETER

Name

Type

Description

source

string

Source field

selections

string

Special characters to remove

exceptions

string

Special characters to retain

EXAMPLES

Source Data

Expression

Output

email='abc_d@dckap.com###'

REMOVE_SPECIAL_CHARACTERS(email)

'abcddckapcom'

email='abc_d@dckap.com####'

REMOVE_SPECIAL_CHARACTERS(email,selections='#')

'abc_d@dckap.com'

email='abc_d@dckap.com####'

REMOVE_SPECIAL_CHARACTERS(email,exceptions='#')

'abcddckapcom####'

REGEX

DESCRIPTION

Supports findall, search, split, sub and match operations.

SYNTAX

REGEX(source*, pattern*, regex_function, sub_value, sub_count)

PARAMETER

Name

Type

Description

source

string

Source field

pattern

string

Pattern to search

regex_function

'findall', 'search', 'split', 'sub', 'match'

Function to perform

sub_value

string

Value to be substituted for 'sub' function

sub_count

integer

Number of substitutions to be made for 'sub' function

EXAMPLES

Source Data

Expression

Output

message= 'Hello my Number is 123456789 and my friend's number is 987654321'

REGEX(message,'\d+')

["123456789","987654321"]

message= 'Hello my Number is 123456789 and my friend's number is 987654321'

REGEX(message,'\d+','search')

true

message= 'Hello my Number is 123456789 and my friend's number is 987654321'

REGEX(message,'\d+','split')

['Hello my Number is ', ' and my friend number is ', '']

message= 'Hello my Number is 123456789 and my friend's number is 987654321'

REGEX(message,'\d+','sub','XXXX',1)

Hello my Number is XXXX and my friend's number is 987654321'

message= 'Hello World!'

REGEX(message,'\d+','match')

false

REPLACE

DESCRIPTION

Returns a copy of the string where all occurrences of a substring are replaced with another substring

SYNTAX

REPLACE(source*,old*,new*,count)

PARAMETERS

Name

Type

Description

source

string

Source field

old

string

String to change

new

string

String to be replaced with

count

integer

Number of replacements required

EXAMPLES

Source Data

Expression

Output

item="banana"

REPLACE(item,"n","b",1)

"babana"

RJUST

DESCRIPTION

Right aligns the string, using a specified character (space is default) as the fill character for making the length of the output string as the mentioned width.

SYNTAX

RJUST(source*,width*,fillchar)

PARAMETER

Name

Type

Description

source

string

Source field

width

integer

Length of the output

fillchar

string

String to make the text to the desired width and right justified

Default value:' '

EXAMPLES

Source Data

Expression

Output

message='hello'

RJUST(message,10)

' hello'

message='hello'

RJUST(message,10,'-')

'-----hello'

ROUND

DESCRIPTION

Rounds off the input number.

SYNTAX

ROUND(source*,digits)

PARAMETER

Name

Type

Description

source

float

Source field

digits

integer

Number of values to be considered after decimal point while rounding off

EXAMPLES

Source Data

Expression

Output

price=10.68

ROUND(price,1)

11.0

RSPLIT

DESCRIPTION

Returns a list of strings by breaking the input string from the right side by the specified separator

SYNTAX

RSPLIT(source*,char,maxsplit)

PARAMETER

Name

Type

Description

source

string

Source field

char

string

String at which split has to be made

maxsplit

integer

Maximum number of split points

EXAMPLES

Source Data

Expression

Output

RSPLIT('Great Day',char='a')

['Gre', 't D', 'y']

message='Great Day'

RSPLIT(message,'a',1)

['Great D', 'y']

RSTRIP

DESCRIPTION

Returns string with trailing suffix characters removed.

If no argument is passed, it removes trailing spaces.

Note: If source is not a string, returns source

SYNTAX

RSTRIP(source*,chars)

PARAMETER

Name

Type

Description

source

string

Source field

chars

string

String to be stripped

Default Value: " "

EXAMPLES

Source Data

Expression

Output

city='Chennai '

RSTRIP(city)

'Chennai'

city='ChennaiXXXX'

RSTRIP(city,'X')

'Chennai'

DESCRIPTION

Gets the element at the specified index in list/string for valid index else returns default.

Note: Returns source if the source is of datatype other than list/string/tuple.

SYNTAX

SEARCH(source*,index*,default_value)

PARAMETER

Name

Type

Description

source

list/string

Source field

index

integer

Index value to be checked

default_value

string

Default Value: "NOT_IN_SOURCE"

EXAMPLES

Source Data

Expression

Output

item_ids=[10,20,30]

SEARCH(items_ids,2)

30

message='Hello'

SEARCH(message,6,'No data available')

'No data available'

SLICE

DESCRIPTION

Slices values from string/array

SYNTAX

SLICE(source*, step, start_index, stop_index)

PARAMETER

Name

Type

Description

source

string

Source field

step

integer

Step value

start_index

integer

Starting index to slice

stop_index

integer

Ending index to slice

EXAMPLES

Source Data

Expression

Output

item_ids=[10, 20, 30, 40, 50]

SLICE(item_ids, 2,1,5)

[20, 40]

message= 'hello world'

SLICE(message,start_index=5)

' world'

SPLIT

DESCRIPTION

Returns a list of strings by breaking the input string from the left side by the specified separator

Note: If source is not a string, returns source.

SYNTAX

SPLIT(source*,char,maxsplit)

PARAMETER

Name

Type

Description

source

string

Source field

char

string

String at which split has to be made

maxsplit

integer

Maximum number of split points

EXAMPLES

Source Data

Expression

Output

SPLIT('Great Day')

["Great", "Day"]

message='Great Day'

SPLIT(message,'a',1)

['Gre', 't Day']

STARTSWITH

DESCRIPTION

Returns True if the string starts with the mentioned prefix in the specified index range else False.

Note: If source is not a string, returns source.

SYNTAX

STARTSWITH(source*,prefix,start,end)

PARAMETER

Name

Type

Description

source

string

Source field

prefix

string

Prefix string with which the check on source has to be made.

start

integer

Start index of the string

end

integer

End index of the string

EXAMPLES

Source Data

Expression

Output

message="Great Day"

STARTSWITH(message,"ay")

false

message="Great Day"

STARTSWITH(message,"r",1,5)

true

STRIP

DESCRIPTION

Returns string with mentioned characters removed. If no argument is passed, it removes spaces.

Note: Returns source if source is not a string.

SYNTAX

STRIP(source*,chars)

PARAMETER

Name

Type

Description

source

string

Source field

chars

string

String to be stripped

Default Value: " "

EXAMPLES

Source Data

Expression

Output

city=' Chennai '

STRIP(city)

'Chennai'

city='XChennaiXXXX'

STRIP(city,'X')

'Chennai'

TITLE

DESCRIPTION

Returns title cased string (first character in upper case, rest in lower).

Note: Returns source if source is not a string.

SYNTAX

TITLE(source*)

PARAMETER

Name

Type

Description

source

string

Source field to be changed into title case

EXAMPLES

Source Data

Expression

Output

message='hello worlD'

TITLE(message)

'Hello World'

TO_ARRAY

DESCRIPTION

Returns an array containing the input strings

SYNTAX

TO_ARRAY(*args)

PARAMETER

Name

Type

Description

args

string

source fields (n>=1)

Data to be pushed into list

EXAMPLES

Source Data

Expression

Output

first_name='Iron'

last_name='man'

TO_ARRAY(first_name,last_name)

['Iron','man']

TO_ASCII

DESCRIPTION

Converts Unicode characters to ASCII.

Note: Returns source, if source is not a string.

SYNTAX

TO_ASCII(source)

PARAMETER

Name

Type

Description

source

string

Source field to remove

EXAMPLES

Source Data

Expression

Output

item_name='Škoda'

TO_ASCII(item_name)

'Skoda'

TO_NUMBER

DESCRIPTION

Retrieves number in a string. Puts all the numbers in source as a list which can be indexed and accessed. Returns the value at zeroth index by default.

Note: Returns " " if source is not a string.

SYNTAX

TO_NUMBER(source*,index)

PARAMETER

Name

Type

Description

source

string

Source field

index

integer

Index of the number need

Default Value: 0

EXAMPLES

Source Data

Expression

Output

line1='14/3, 3055 GRAND AVE 75215, DALLAS, Texas'

TO_NUMBER(line1)

"14/3"

line1='14/3, 3055 GRAND AVE 75215, DALLAS, Texas'

TO_NUMBER(line1,1)

"3055"

TO_STRING

DESCRIPTION

Converts an array to string.

SYNTAX

TO_STRING(source*,join_characters)

PARAMETER

Name

Type

Description

source

list

Source field

join_characters

string

Join string to connect the elements in source array

Default Value=','

EXAMPLES

Source Data

Expression

Output

alphabets=["h","e","l","l","o" ]

TO_STRING(alphabets)

"h,e,l,l,o"

alphabets=["h","e","l","l","o" ]

TO_STRING(alphabets,'*')

"h*e*l*l*o"

TO_TIMESTAMP

DESCRIPTION

Converts the given datetime to timestamp.

SYNTAX

TO_TIMESTAMP(source*, date_format, from_time_zone)

PARAMETER

Name

Type

Description

source

Datetime object/String

Source field

date_format

String

Format of the date if source is a string

Ex: "%Y-%m-%d %H:%M:%S"

time_zone

String

EXAMPLE

Source Data

Expression

Output

created_at='2021-05-27 01:30:00 PM'

TO_TIMESTAMP(created_at,'%Y-%m-%d %H:%M:%S %p')

1622079000.0

TRUNCATE

DESCRIPTION

Truncates count characters . If reverse is set to True, the characters from right are truncated.

SYNTAX

TRUNCATE(source*,count,reverse)

PARAMETER

Name

Type

Description

source

string

Source Field

count

integer

Number of characters to be truncated from right

reverse

boolean

Set to True to truncate characters from left

Default Value: False

EXAMPLES

Source Data

Expression

Output

message='test'

TRUNCATE(message,2)

'st'

message='test'

TRUNCATE(message,2,True)

'te'

UPPER

DESCRIPTION

Converts all lowercase characters in the string to uppercase.

Note: Returns source if source is not a string.

SYNTAX

UPPER(source*)

PARAMETER

Name

Type

Description

source

string

Source field

EXAMPLE

Source Data

Expression

Output

message='Great Day'

UPPER(message)

'GREAT DAY'

Last updated