Skip to content

Function Reference

All 95 built-in functions of the Flowfile formula language. This reference is generated from the library's docstrings. Unless noted, every argument accepts a literal value, a [column] reference or a nested expression. Click Try it ▸ to load an example into the interactive playground.

Logic & Nulls (13)

between(value, min_val, max_val)Try it ▸

Checks if a value is between a minimum and maximum value (inclusive).

between([age], 30, 40) truewhen [age] is 35
Parameters & return value
  • value — The column or value to check
  • min_val — The column or value used as the minimum (inclusive)
  • max_val — The column or value used as the maximum (inclusive)
  • Returns — true if the value is between min and max (inclusive), otherwise false
coalesce(*values)Try it ▸

Returns the first non-empty value from a list of values.

coalesce([discount], 0) 0when [discount] is empty
Parameters & return value
  • *values — The columns or values to check in order
  • Returns — The first non-empty value, or null if all values are empty
contains(text, search_for)Try it ▸

Checks if some text contains a specific pattern.

contains([product], "Laptop") truewhen [product] is "Laptop Pro 15"
Parameters & return value
  • text — The column or value to search in
  • search_for — The pattern to look for
  • Returns — true if the pattern is found in the text, otherwise false
does_not_equal(value1, value2)Try it ▸

Checks if two values are different from each other.

does_not_equal([status], "cancelled") truewhen [status] is "shipped"
Parameters & return value
  • value1 — The column or value to compare
  • value2 — The column or value to compare it against
  • Returns — true if the values are different, false if they are the same
equals(value1, value2)Try it ▸

Checks if two values are equal to each other.

equals([status], "shipped") truewhen [status] is "shipped"
Parameters & return value
  • value1 — The column or value to compare
  • value2 — The column or value to compare it against
  • Returns — true if both values are equal, otherwise false
greatest(*values)Try it ▸

Returns the largest value from a list of values.

greatest([price], 100) 100when [price] is 79.99
Parameters & return value
  • *values — The columns or values to compare
  • Returns — The largest value
ifnull(value, default)Try it ▸

Returns a default value if the input is empty.

ifnull([discount], 0) 0when [discount] is empty
Parameters & return value
  • value — The column or value to check
  • default — The column or value to return if the first value is empty
  • Returns — The original value if not empty, otherwise the default value
is_empty(value)Try it ▸

Checks if a value is empty (missing).

is_empty([email]) truewhen [email] is empty
Parameters & return value
  • value — The column to check
  • Returns — true if the value is empty, otherwise false
is_not_empty(value)Try it ▸

Checks if a value contains something (is not missing).

is_not_empty([discount]) falsewhen [discount] is empty
Parameters & return value
  • value — The column to check
  • Returns — true if the value contains something, false if it is empty
is_string(value)Try it ▸

Checks if a literal value is text (a string). This works on fixed values, not on column references.

is_string("hello") true
Parameters & return value
  • value — The value to check
  • Returns — true if the value is text, otherwise false
least(*values)Try it ▸

Returns the smallest value from a list of values.

least([price], 100) 100when [price] is 249.99
Parameters & return value
  • *values — The columns or values to compare
  • Returns — The smallest value
nullif(value1, value2)Try it ▸

Returns null if the two values are equal, otherwise returns the first value.

nullif([status], "cancelled") nullwhen [status] is "cancelled"
Parameters & return value
  • value1 — The column or value to return
  • value2 — The value to compare against
  • Returns — null if both are equal, otherwise the first value
nvl(value, default)Try it ▸

Returns a default value if the input is empty (alias for ifnull).

nvl([email], "no email") "no email"when [email] is empty
Parameters & return value
  • value — The column or value to check
  • default — The column or value to return if the first value is empty
  • Returns — The original value if not empty, otherwise the default value

String (23)

concat(*text_parts)Try it ▸

Combines multiple text values into a single text.

concat([first_name], " ", [last_name]) "John Doe"when [first_name] is "John" and [last_name] is "Doe"
Parameters & return value
  • *text_parts — The columns or texts you want to combine
  • Returns — The combined text
count_match(text, pattern)Try it ▸

Counts how many times a pattern appears in text.

count_match([email], ".") 2when [email] is "john.doe@company.com"
Parameters & return value
  • text — The column or text to search in
  • pattern — The pattern to search for
  • Returns — The number of matches found
ends_with(text, suffix)Try it ▸

Checks if text ends with a specific suffix.

ends_with([email], ".com") truewhen [email] is "john.doe@company.com"
Parameters & return value
  • text — The column or text to check
  • suffix — The suffix to look for at the end
  • Returns — True if the text ends with the suffix, False otherwise
find_position(text, sub)Try it ▸

Finds the position of a substring within text (0-based index).

find_position([order_id], "-") 3when [order_id] is "ORD-0001"
Parameters & return value
  • text — The column or text to search in
  • sub — The substring to find the position of
  • Returns — The position of the substring, or null if it is not found
left(text, num_chars)Try it ▸

Gets a specified number of characters from the beginning of text.

left([order_id], 3) "ORD"when [order_id] is "ORD-0001"
Parameters & return value
  • text — The column or text to extract from
  • num_chars — How many characters to take from the beginning
  • Returns — The extracted text
left_trim(text)Try it ▸

Removes spaces from the beginning of text.

left_trim([city]) "Amsterdam "when [city] is " Amsterdam "
Parameters & return value
  • text — The column or text you want to trim
  • Returns — The trimmed text
length(text)Try it ▸

Counts the number of characters in text.

length([city]) 9when [city] is "Amsterdam"
Parameters & return value
  • text — The column or text to measure
  • Returns — The number of characters
lowercase(text)Try it ▸

Converts text to all lowercase.

lowercase([department]) "engineering"when [department] is "Engineering"
Parameters & return value
  • text — The column or text to convert
  • Returns — The lowercase text
mid(text, start, num_chars)Try it ▸

Extracts a portion of text from the middle starting at a specified position.

mid([order_id], 4, 4) "0001"when [order_id] is "ORD-0001"
Parameters & return value
  • text — The column or text to extract from
  • start — The starting position (0-based index)
  • num_chars — How many characters to extract
  • Returns — The extracted text
pad_left(text, length, pad_character=' ')Try it ▸

Adds characters to the beginning of text to reach a specific length.

pad_left([order_id], 12, "0") "0000ORD-0001"when [order_id] is "ORD-0001"
Parameters & return value
  • text — The column or text you want to pad
  • length — How long you want the final text to be
  • pad_character — What character to use for padding (default is a space)
  • Returns — The padded text
pad_right(text, length, pad_character=' ')Try it ▸

Adds characters to the end of text to reach a specific length.

pad_right([order_id], 12, "0") "ORD-00010000"when [order_id] is "ORD-0001"
Parameters & return value
  • text — The column or text you want to pad
  • length — How long you want the final text to be
  • pad_character — What character to use for padding (default is a space)
  • Returns — The padded text
repeat(text, count)Try it ▸

Repeats text a specified number of times.

repeat([first_name], 2) "JohnJohn"when [first_name] is "John"
Parameters & return value
  • text — The column or text to repeat
  • count — How many times to repeat the text
  • Returns — The repeated text
replace(text, find_text, replace_with)Try it ▸

Replaces specific text with different text.

replace([email], ".com", ".org") "john.doe@company.org"when [email] is "john.doe@company.com"
Parameters & return value
  • text — The column or text where replacements will be made
  • find_text — The text you want to find and replace
  • replace_with — The new text that will replace the found text
  • Returns — The text after replacement
reverse(text)Try it ▸

Reverses the characters in text.

reverse([first_name]) "nhoJ"when [first_name] is "John"
Parameters & return value
  • text — The column or text to reverse
  • Returns — The reversed text
right_trim(text)Try it ▸

Removes spaces from the end of text.

right_trim([city]) "Amsterdam"when [city] is "Amsterdam "
Parameters & return value
  • text — The column or text you want to trim
  • Returns — The trimmed text
split(text, delimiter)Try it ▸

Splits text into a list using a delimiter.

split([product], " ") ["Laptop", "Pro"]when [product] is "Laptop Pro"
Parameters & return value
  • text — The column or text to split
  • delimiter — The character(s) to split on
  • Returns — A list of text parts
starts_with(text, prefix)Try it ▸

Checks if text starts with a specific prefix.

starts_with([order_id], "ORD") truewhen [order_id] is "ORD-0001"
Parameters & return value
  • text — The column or text to check
  • prefix — The prefix to look for at the start
  • Returns — True if the text starts with the prefix, False otherwise
string_similarity(text1, text2, method='levenshtein')

Measures how similar two texts are to each other, on a scale of 0 to 1. A value of 1 means the texts are identical, while 0 means they are completely different.

string_similarity([first_name], [last_name], "levenshtein") 0.4when [first_name] is "John" and [last_name] is "Jones"
Parameters & return value
  • text1 — The first column or text to compare
  • text2 — The second column or text to compare
  • method — Which comparison method to use (default is 'levenshtein')
  • Returns — A similarity score between 0 and 1
substring(text, start, num_chars)Try it ▸

Extracts a portion of text starting at a specified position (alias for mid).

substring([order_id], 0, 3) "ORD"when [order_id] is "ORD-0001"
Parameters & return value
  • text — The column or text to extract from
  • start — The starting position (0-based index)
  • num_chars — How many characters to extract
  • Returns — The extracted text
titlecase(text)Try it ▸

Converts Text To Title Case, Where Each Word Is Capitalized.

titlecase([event]) "Tech Conference"when [event] is "tech conference"
Parameters & return value
  • text — The column or text to convert
  • Returns — The title case text
trim(text)Try it ▸

Removes spaces from both the beginning and end of text.

trim([city]) "Amsterdam"when [city] is " Amsterdam "
Parameters & return value
  • text — The column or text you want to trim
  • Returns — The trimmed text
uppercase(text)Try it ▸

Converts text to ALL UPPERCASE.

uppercase([city]) "AMSTERDAM"when [city] is "Amsterdam"
Parameters & return value
  • text — The column or text to convert
  • Returns — The uppercase text

Math (23)

abs(number)Try it ▸

Returns the absolute value of each value in a column (removes the negative sign).

abs([price]) 5.0when [price] is -5.0
Parameters & return value
  • number — The column or value to get the absolute value of
  • Returns — The non-negative version of the value
acos(number)Try it ▸

Calculates the arccosine (inverse cosine) of each value in a column.

acos([ratio]) 0.0when [ratio] is 1
Parameters & return value
  • number — The column or value to take the arccosine of (values between -1 and 1)
  • Returns — The angle in radians whose cosine equals the value
asin(number)Try it ▸

Calculates the arcsine (inverse sine) of each value in a column.

asin([ratio]) 0.0when [ratio] is 0
Parameters & return value
  • number — The column or value to take the arcsine of (values between -1 and 1)
  • Returns — The angle in radians whose sine equals the value
atan(number)Try it ▸

Calculates the arctangent (inverse tangent) of each value in a column.

atan([ratio]) 0.0when [ratio] is 0
Parameters & return value
  • number — The column or value to take the arctangent of
  • Returns — The angle in radians whose tangent equals the value
ceil(number)Try it ▸

Rounds each value in a column up to the nearest whole number.

ceil([price]) 5.0when [price] is 4.2
Parameters & return value
  • number — The column or value to round up
  • Returns — The value rounded up to a whole number
cos(angle)Try it ▸

Calculates the cosine of each value in a column, where values are angles in radians.

cos([angle]) 1.0when [angle] is 0
Parameters & return value
  • angle — The column or value with angles in radians
  • Returns — The cosine of the angle
exp(number)Try it ▸

Calculates e raised to the power of each value in a column.

exp([discount]) 1.0when [discount] is 0.0
Parameters & return value
  • number — The column or value to use as the exponent of e
  • Returns — The result of e raised to the value
floor(number)Try it ▸

Rounds each value in a column down to the nearest whole number.

floor([price]) 4.0when [price] is 4.7
Parameters & return value
  • number — The column or value to round down
  • Returns — The value rounded down to a whole number
log(number)Try it ▸

Calculates the natural logarithm (base e) of each value in a column.

log([price]) 0.0when [price] is 1.0
Parameters & return value
  • number — The column or value to take the natural logarithm of
  • Returns — The natural logarithm of the value
log10(number)Try it ▸

Calculates the base-10 logarithm of each value in a column.

log10([salary]) 4.0when [salary] is 10000.0
Parameters & return value
  • number — The column or value to take the base-10 logarithm of
  • Returns — The base-10 logarithm of the value
log2(number)Try it ▸

Calculates the base-2 logarithm of each value in a column.

log2([price]) 3.0when [price] is 8.0
Parameters & return value
  • number — The column or value to take the base-2 logarithm of
  • Returns — The base-2 logarithm of the value
mod(dividend, divisor)Try it ▸

Calculates the remainder after dividing each value in a column (modulo).

mod([quantity], 3) 1when [quantity] is 10
Parameters & return value
  • dividend — The column or value to be divided
  • divisor — The number to divide by
  • Returns — The remainder of the division
negation(number)

Flips the sign of each value in a column (positive becomes negative, negative becomes positive).

negation([price]) -19.99when [price] is 19.99
Parameters & return value
  • number — The column or value to flip the sign of
  • Returns — The value with its sign flipped
negative()Try it ▸

Returns the constant value -1; it takes no arguments.

negative() -1
Parameters & return value
  • Returns — The value -1
pow(base, exponent)Try it ▸

Raises each value in a column to a power (alias for power).

pow([quantity], 2) 16when [quantity] is 4
Parameters & return value
  • base — The column or value to raise
  • exponent — The power to raise the base to
  • Returns — The result of base raised to the power of exponent
power(base, exponent)Try it ▸

Raises each value in a column to a power.

power([quantity], 2) 9when [quantity] is 3
Parameters & return value
  • base — The column or value to raise
  • exponent — The power to raise the base to
  • Returns — The result of base raised to the power of exponent
random_int(min_value=0, max_value=2)Try it ▸

Generates a random whole number for each row, from min_value (inclusive) up to max_value (exclusive).

random_int(1, 100) a random value such as 57
Parameters & return value
  • min_value — The smallest possible number to generate (default is 0)
  • max_value — The upper bound, which is never reached (default is 2)
  • Returns — A random whole number for each row in the given range
round(number, decimal_places=None)Try it ▸

Rounds each value in a column to a specified number of decimal places.

round([price], 2) 19.99when [price] is 19.987
Parameters & return value
  • number — The column or value to round
  • decimal_places — How many decimal places to keep (default is 0)
  • Returns — The rounded value
sign(number)Try it ▸

Returns the sign of each value in a column (-1, 0, or 1).

sign([quantity]) -1when [quantity] is -2
Parameters & return value
  • number — The column or value to check
  • Returns — 1 if negative, 0 if zero, 1 if positive
sin(angle)Try it ▸

Calculates the sine of each value in a column, where values are angles in radians.

sin([angle]) 0.0when [angle] is 0
Parameters & return value
  • angle — The column or value with angles in radians
  • Returns — The sine of the angle
sqrt(number)Try it ▸

Calculates the square root of each value in a column.

sqrt([price]) 3.0when [price] is 9.0
Parameters & return value
  • number — The column or value to take the square root of
  • Returns — The square root of the value
tan(angle)Try it ▸

Calculates the tangent of each value in a column, where values are angles in radians.

tan([angle]) 0.0when [angle] is 0
Parameters & return value
  • angle — The column or value with angles in radians
  • Returns — The tangent of the angle
tanh(number)Try it ▸

Calculates the hyperbolic tangent of each value in a column; the result is always between -1 and 1.

tanh([discount]) 0.0when [discount] is 0.0
Parameters & return value
  • number — The column or value to take the hyperbolic tangent of
  • Returns — The hyperbolic tangent of the value

Date & Time (28)

add_days(date_value, days)Try it ▸

Adds a number of days to a date.

add_days([hire_date], 5) 2021-03-20when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to add days to
  • days — How many days to add
  • Returns — The new date
add_hours(date_value, hours)Try it ▸

Adds a number of hours to a datetime.

add_hours([order_date], 3) 2024-01-15 13:30:00when [order_date] is 2024-01-15 10:30:00
Parameters & return value
  • date_value — The datetime column or expression to add hours to
  • hours — How many hours to add
  • Returns — The new date and time
add_minutes(date_value, minutes)Try it ▸

Adds a number of minutes to a datetime.

add_minutes([order_date], 15) 2024-01-15 10:45:00when [order_date] is 2024-01-15 10:30:00
Parameters & return value
  • date_value — The datetime column or expression to add minutes to
  • minutes — How many minutes to add
  • Returns — The new date and time
add_months(date_value, months)Try it ▸

Adds a number of months to a date.

add_months([hire_date], 2) 2021-05-15when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to add months to
  • months — How many months to add
  • Returns — The new date
add_seconds(date_value, seconds)Try it ▸

Adds a number of seconds to a datetime.

add_seconds([order_date], 30) 2024-01-15 10:30:30when [order_date] is 2024-01-15 10:30:00
Parameters & return value
  • date_value — The datetime column or expression to add seconds to
  • seconds — How many seconds to add
  • Returns — The new date and time
add_weeks(date_value, weeks)Try it ▸

Adds a number of weeks to a date.

add_weeks([hire_date], 2) 2021-03-29when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to add weeks to
  • weeks — How many weeks to add
  • Returns — The new date
add_years(date_value, years)Try it ▸

Adds a number of years to a date.

add_years([hire_date], 1) 2022-03-15when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to add years to
  • years — How many years to add
  • Returns — The new date
date_diff_days(date1, date2)Try it ▸

Calculates the number of days between two dates (the first minus the second).

date_diff_days(today(), [hire_date]) 30when [hire_date] is 30 days before today
Parameters & return value
  • date1 — The date column or expression to subtract from
  • date2 — The date column or expression to subtract
  • Returns — The number of days between the two dates
date_trim(date_value, part)Try it ▸

Removes the smaller parts of a date or time.

date_trim([order_date], "day") 2024-01-15 00:00:00when [order_date] is 2024-01-15 10:30:45
Parameters & return value
  • date_value — The datetime column or expression to trim
  • part — Which part to keep ('year', 'month', 'day', 'hour', 'minute', or 'second')
  • Returns — The trimmed date and time
date_truncate(date_value, truncate_by)Try it ▸

Rounds a date down to the nearest specified unit.

date_truncate([order_date], "1d") 2024-01-15 00:00:00when [order_date] is 2024-01-15 10:30:45
Parameters & return value
  • date_value — The datetime column or expression to truncate
  • truncate_by — The time unit to round down to (like "1d", "2h", "15m")
  • Returns — The truncated date and time
datetime_diff_nanoseconds(date1, date2)Try it ▸

Calculates the number of nanoseconds between two datetimes (the first minus the second), for very precise time measurements.

datetime_diff_nanoseconds([end], [start]) 1000000000when [start] is 2024-01-15 10:00:00 and [end] is 2024-01-15 10:00:01
Parameters & return value
  • date1 — The datetime column or expression to subtract from
  • date2 — The datetime column or expression to subtract
  • Returns — The number of nanoseconds between the two datetimes
datetime_diff_seconds(date1, date2)Try it ▸

Calculates the number of seconds between two datetimes (the first minus the second).

datetime_diff_seconds([end], [start]) 3600when [start] is 2024-01-15 10:00:00 and [end] is 2024-01-15 11:00:00
Parameters & return value
  • date1 — The datetime column or expression to subtract from
  • date2 — The datetime column or expression to subtract
  • Returns — The number of seconds between the two datetimes
day(date_value)Try it ▸

Gets the day of the month from a date.

day([hire_date]) 15when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to extract the day from
  • Returns — The day of the month as a number (1-31)
dayofweek(date_value)Try it ▸

Gets the day of the week from a date (alias for weekday, 1=Monday, 7=Sunday).

dayofweek([hire_date]) 1when [hire_date] is 2021-03-15, a Monday
Parameters & return value
  • date_value — The date column or expression to extract the day of week from
  • Returns — The day of the week as a number (1-7)
dayofyear(date_value)Try it ▸

Gets the day of the year from a date (1-366).

dayofyear([hire_date]) 74when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to extract the day of year from
  • Returns — The day of the year as a number (1-366)
end_of_month(date_value)Try it ▸

Gets the last day of the month for a given date.

end_of_month([hire_date]) 2021-03-31when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to get the end of month for
  • Returns — The last day of the month
format_date(date_value, date_format='%Y-%m-%d')Try it ▸

Formats a date as text using a specified format.

format_date([hire_date], "%B %d, %Y") "March 15, 2021"when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to format
  • date_format — The output format string (default is year-month-day)
  • Returns — The formatted date as text
hour(date_value)Try it ▸

Gets the hour from a datetime.

hour([order_date]) 10when [order_date] is 2024-01-15 10:30:45
Parameters & return value
  • date_value — The datetime column or expression to extract the hour from
  • Returns — The hour as a number (0-23)
minute(date_value)Try it ▸

Gets the minute from a datetime.

minute([order_date]) 30when [order_date] is 2024-01-15 10:30:45
Parameters & return value
  • date_value — The datetime column or expression to extract the minute from
  • Returns — The minute as a number (0-59)
month(date_value)Try it ▸

Gets the month from a date.

month([hire_date]) 3when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to extract the month from
  • Returns — The month as a number (1-12)
now()Try it ▸

Gets the current date and time.

now() the current date and time
Parameters & return value
  • Returns — The current date and time
quarter(date_value)Try it ▸

Gets the quarter from a date (1-4).

quarter([hire_date]) 1when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to extract the quarter from
  • Returns — The quarter as a number (1-4)
second(date_value)Try it ▸

Gets the second from a datetime.

second([order_date]) 45when [order_date] is 2024-01-15 10:30:45
Parameters & return value
  • date_value — The datetime column or expression to extract the second from
  • Returns — The second as a number (0-59)
start_of_month(date_value)Try it ▸

Gets the first day of the month for a given date.

start_of_month([hire_date]) 2021-03-01when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to get the start of month for
  • Returns — The first day of the month
today()Try it ▸

Gets the current date.

today() the current date
Parameters & return value
  • Returns — The current date
week(date_value)Try it ▸

Gets the ISO week number from a date (1-53).

week([hire_date]) 11when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to extract the week from
  • Returns — The week number as a number (1-53)
weekday(date_value)Try it ▸

Gets the day of the week from a date (1=Monday, 7=Sunday).

weekday([hire_date]) 1when [hire_date] is 2021-03-15, a Monday
Parameters & return value
  • date_value — The date column or expression to extract the weekday from
  • Returns — The day of the week as a number (1-7)
year(date_value)Try it ▸

Gets the year from a date.

year([hire_date]) 2021when [hire_date] is 2021-03-15
Parameters & return value
  • date_value — The date column or expression to extract the year from
  • Returns — The year as a number

Type Conversion (8)

to_boolean(value)Try it ▸

Converts a column or value to true or false. Non-zero numbers and text like "true", "yes", "t" or "y" become true; zero and text like "false", "no", "f" or "n" become false.

to_boolean([quantity]) truewhen [quantity] is 1
Parameters & return value
  • value — The column or value to convert to a boolean
  • Returns — The boolean value (true or false)
to_date(text, date_format='%Y-%m-%d')Try it ▸

Parses a text column or value into a date.

to_date("2023-05-15") the date 2023-05-15
Parameters & return value
  • text — The text column or value to parse as a date
  • date_format — How to interpret the date text (default is "%Y-%m-%d")
  • Returns — The date value
to_datetime(s, date_format='%Y-%m-%d %H:%M:%S')Try it ▸

Parses a text column or value into a datetime.

to_datetime("2023-05-15 14:30:00") the datetime 2023-05-15 14:30:00
Parameters & return value
  • s — The text column or value to parse as a datetime
  • date_format — How to interpret the datetime text (default is "%Y-%m-%d %H:%M:%S")
  • Returns — The datetime value
to_decimal(value, precision=None)Try it ▸

Converts a column or value to a decimal number rounded to a fixed number of decimal places.

to_decimal([price], 2) 19.99when [price] is 19.987
Parameters & return value
  • value — The column or value to convert to a decimal
  • precision — How many decimal places to keep (default is None, which keeps all decimal places)
  • Returns — The decimal number
to_float(value)Try it ▸

Converts a column or value to a number with decimal places.

to_float([quantity]) 3.0when [quantity] is 3
Parameters & return value
  • value — The column or value to convert to a floating-point number
  • Returns — The floating-point number
to_integer(value)Try it ▸

Converts a column or value to a whole number, truncating any decimal places.

to_integer([price]) 19when [price] is 19.99
Parameters & return value
  • value — The column or value to convert to an integer
  • Returns — The integer value (decimal places are truncated)
to_number(value)Try it ▸

Converts a column or value to a number (same as to_float).

to_number([quantity]) 3.0when [quantity] is 3
Parameters & return value
  • value — The column or value to convert to a number
  • Returns — The numeric value
to_string(value)Try it ▸

Converts a column or value to text.

to_string([age]) "30"when [age] is 30
Parameters & return value
  • value — The column or value to convert to text
  • Returns — The text representation