Fenl Catalog v0.1.0-dev

add


πŸ§ͺ

add(a: number, b: number) -> number

Operator: a + b

Returns the sum of two numbers.

  • math

add_time


πŸ§ͺ

add_time(delta: timedelta, time: timestamp_ns) -> timestamp_ns

Adds a time delta (duration or interval) to a time.

  • time

ceil


πŸ§ͺ

ceil(n: number) -> number

Rounds the number up to the next largest integer.

  • math

clamp


πŸ§ͺ

clamp(value: number, min: number = null, max: number = null) -> number

Returns value clamped between the bounds of min and max.

πŸ“˜

Returns value if value is between min and max. Returns min if value < min. Returns max if value > max. Returns null if value is null, or if min > max. If min or max are null, then no clamping on that side will be performed.

  • math

count


πŸ§ͺ

count(input: any) -> u32

Counts each distinct, non-null value across the input.

  • aggregation

day_of_month


πŸ§ͺ

day_of_month(time: timestamp_ns) -> u32

Return the day-of-month for the given time, starting with 1.

  • time

day_of_month0


πŸ§ͺ

day_of_month0(time: timestamp_ns) -> u32

Return the day-of-month for the given time, starting with 0.

  • time

day_of_year


πŸ§ͺ

day_of_year(time: timestamp_ns) -> u32

Return the day-of-year for the given time, starting with 1.

  • time

day_of_year0


πŸ§ͺ

day_of_year0(time: timestamp_ns) -> u32

Return the day-of-year for the given time, starting with 0.

  • time

days


πŸ§ͺ

days(days: i64) -> interval_days

Produces an interval corresponding to the given number of calendar days.

πŸ“˜

NOTE: While the argument takes an i64 negative numbers of days and values greater than i32::MAX produce null intervals.

  • time

days_between


πŸ§ͺ

days_between(t1: timestamp_ns, t2: timestamp_ns) -> interval_days

Returns the number of days between the first and second timestamp

πŸ“˜

If the first timestamp is greater than the second, the result will be a positive interval. If the second timestamp is greater than the first, the result with be a negative interval.

  • time

div


πŸ§ͺ

div(a: number, b: number) -> number

Operator: a / b

Returns the division of two numbers.

πŸ“˜

Note: The result of dividing two numbers maintains the type of number. Numeric values are promoted to be compatible, for instance x / 2.0 would promote x to f64.

  • math

else


πŸ§ͺ

else(default: any, value: any) -> any

Return the value if it is not null, default otherwise.

  • logical

eq


πŸ§ͺ

eq(a: any, b: any) -> bool

Operator: a == b

Return true if a is equal to b.

  • comparison

exp


πŸ§ͺ

exp(power: f64) -> f64

Returns e^power.

πŸ“˜

The exponential function applies to f64 numbers only. Other numbers will be promoted appropriately.

  • math

first


πŸ§ͺ

first(input: any) -> any

Computes the first value present across the input.

πŸ“˜

NOTE: The first value is inclusive of any values at the current time.

  • aggregation

floor


πŸ§ͺ

floor(n: number) -> number

Rounds the number down to the next smallest integer.

  • math

gt


πŸ§ͺ

gt(a: ordered, b: ordered) -> bool

Operator: a > b

Return true if a is greater than b.

  • comparison

gte


πŸ§ͺ

gte(a: ordered, b: ordered) -> bool

Operator: a >= b

Return true if a is greater than or equal to b.

  • comparison

hash


πŸ§ͺ

hash(input: any) -> u64

Returns the hash of the input.

  • misc

if


πŸ§ͺ

if(condition: bool, value: any) -> any

Return the value if condition is true, null otherwise.

  • logical

is_valid


πŸ§ͺ

is_valid(input: any) -> bool

Returns true if input is not null.

  • misc

last


πŸ§ͺ

last(input: any) -> any

Computes the last value present across the input.

πŸ“˜

NOTE: The last value is inclusive of any values at the current time.

  • aggregation

len


πŸ§ͺ

len(s: string) -> i32

Returns the length of the string s.

  • string

logical_and


πŸ§ͺ

logical_and(a: bool, b: bool) -> bool

Operator: a and b

Returns the logical conjunction (AND) of two booleans.

  • logical

logical_or


πŸ§ͺ

logical_or(a: bool, b: bool) -> bool

Operator: a or b

Returns the logical disjunction (OR) of two booleans.

  • logical

lower


πŸ§ͺ

lower(s: string) -> string

Converts the string to lower case.

  • string

lt


πŸ§ͺ

lt(a: ordered, b: ordered) -> bool

Operator: a < b

Return true if a is less than b.

  • comparison

lte


πŸ§ͺ

lte(a: ordered, b: ordered) -> bool

Operator: a < b

Return true if a is less than or equal to b.

  • comparison

max


πŸ§ͺ

max(input: ordered) -> ordered

Computes the maximum of values across the input.

  • aggregation
  • math

mean


πŸ§ͺ

mean(input: number) -> f64

Computes the arithmetic mean of values across the input.

  • aggregation
  • math

min


πŸ§ͺ

min(input: ordered) -> ordered

Computes the minimum of values across the input.

  • aggregation
  • math

month_of_year


πŸ§ͺ

month_of_year(time: timestamp_ns) -> u32

Return the month-of-year for the given time, startiing with 1.

πŸ“˜

This is 1 indexed, with January corresponding to 1.

  • time

month_of_year0


πŸ§ͺ

month_of_year0(time: timestamp_ns) -> u32

Return the month-of-year for the given time, startiing with 0.

πŸ“˜

This is 0 indexed, with January corresponding to 0.

  • time

months


πŸ§ͺ

months(months: i64) -> interval_months

Produces an interval corresponding to the given number of calendar months.

πŸ“˜

NOTE: While the argument takes an i64 negative numbers of months and values greater than i32::MAX produce null intervals.

  • time

months_between


πŸ§ͺ

months_between(t1: timestamp_ns, t2: timestamp_ns) -> interval_months

Returns the number of months between the first and second timestamp

πŸ“˜

If the first timestamp is greater than the second, the result will be a positive interval. If the second timestamp is greater than the first, the result with be a negative interval.

  • time

mul


πŸ§ͺ

mul(a: number, b: number) -> number

Operator: a * b

Returns the product of two numbers.

  • math

neg


πŸ§ͺ

neg(n: signed) -> signed

Operator: -n

Returns the negation of n.

  • math

neq


πŸ§ͺ

neq(a: any, b: any) -> bool

Operator: a <> b

Return true if a is not equal to b.

  • comparison

not


πŸ§ͺ

not(input: bool) -> bool

Operator: !input

Returns the logical negation of a boolean.

  • logical

null_if


πŸ§ͺ

null_if(condition: bool, value: any) -> any

Return the value if condition is false, null otherwise.

  • logical

powf


πŸ§ͺ

powf(base: f64, power: f64) -> f64

Returns base^power.

πŸ“˜

The power function applies to f64 numbers only. Other numbers will be promoted appropriately.

  • math

round


πŸ§ͺ

round(n: number) -> number

Rounds the number to the nearest integer.

πŸ“˜

Note: Rounds half-way numbers away from 0. For example, 0.5 rounds to 1.0 and -0.5 rounds to -1.0.

  • math

seconds


πŸ§ͺ

seconds(seconds: i64) -> duration_s

Produces a duration corresponding to the given number of seconds.

  • time

seconds_between


πŸ§ͺ

seconds_between(t1: timestamp_ns, t2: timestamp_ns) -> duration_s

Returns the number of seconds between the first and second timestamp

πŸ“˜

If the first timestamp is greater than the second, the result will be a positive duration. If the second timestamp is greater than the first, the result with be a negative duration.

  • time

shift_to


πŸ§ͺ

shift_to(time: timestamp_ns, value: any) -> any

Produces the current value shifted forward to the given time.

πŸ“˜

If multiple values for the same group key are shifted to the same time all of them will be emitted in the order they originally appeared. New subsort IDs will be assigned to each row.

  • time

shift_until


πŸ§ͺ

shift_until(predicate: bool, value: any) -> any

Produces the value shifted forward to the time the predicate is true

πŸ“˜

If multiple values for the same group key are shifted to the same time, all of them will be emitted in the order they originally appeared. New subsort IDs will be assigned to each row. A value may be produced at the same time it occurs if the predicate evaluates to true at that time.

  • time

sub


πŸ§ͺ

sub(a: number, b: number) -> number

Operator: a - b

Returns the difference of two numbers.

  • math

substring


πŸ§ͺ

substring(s: string, start: i64 = null, end: i64 = null) -> string

Takes a substring of the input bounded by the start and end indices.

πŸ“˜

Note: start is inclusive and end is exclusive. The start and end may be left null to indicate the first and last indices of the string respectively. Negative indices may be passed, and are interpreted as counting backwards from the end of the string. E.g. str[-1] == str[length-1]. If end > start, an empty string is returned.

  • string

sum


πŸ§ͺ

sum(input: number) -> number

Computes the sum of values across the input.

  • aggregation
  • math

time_of


πŸ§ͺ

time_of(input: any) -> timestamp_ns

Returns the timestamp of the input.

πŸ“˜

Returns the time the input, a non-literal expression, produces values. Time is measured as a Unix epoch, counting the seconds from 00:00:00.000 on 1 January 1970, excluding leap seconds as a 64-bit integer.

  • time

timestamp_ns


πŸ§ͺ

timestamp_ns(input: timestamp_ns) -> timestamp_ns

Function to coerce a value to timestamp_ns.

  • time

upper


πŸ§ͺ

upper(s: string) -> string

Converts the string to upper case.

  • string

variance


πŸ§ͺ

variance(input: number) -> f64

Computes the sample variance of values across the input.

πŸ“˜

This uses the sample variance formula, which divides by the number of values minus 1, rather than the population variance which divides by the number of values.

  • aggregation
  • math

when


πŸ§ͺ

when(condition: bool, value: any) -> any

Produces the current value when the condition evaluates to true.

πŸ“˜

If the value is continuous (eg., the result of an aggregation) returns the latest result of the aggregation. If the value is not continuous (eg., taken directly from events) returns the current value if it exists, and null otherwise.

  • time

year


πŸ§ͺ

year(time: timestamp_ns) -> i32

Return the year of the given timestamp.

  • time

zip_max


πŸ§ͺ

zip_max(a: ordered, b: ordered) -> ordered

Returns the maximum of two values.

πŸ“˜

Returns a if a > b, otherwise returns b. Specifically, if a or b is NaN b will be returned.

  • math

zip_min


πŸ§ͺ

zip_min(a: ordered, b: ordered) -> ordered

Returns the minimum of two values.

πŸ“˜

Returns a if a < b, otherwise returns b. Specifically, if a or b is NaN b will be returned.

  • math

generated on 2021-09-21 16:15:49Z


Β© Copyright 2021 Kaskada, Inc. All rights reserved. Privacy Policy

Kaskada products are protected by patents in the United States, and Kaskada is currently seeking protection internationally with pending applications.