SciDB Functions

SciDB Functions

Table of All Functions

The following table lists the current functions available in SciDB expressions. The third column indicates which library contains that function.  Where functions have individual pages, click the link to access those pages. For additional info on other functions, run: list('functions').

Function Name

Description

 Library

Function Name

Description

 Library

%

Remainder.

scidb

*

Multiplication.

scidb

+

Addition.

scidb

-

Subtraction or additive inverse.

scidb

/

Division.

scidb

<

Less than.

scidb

<=

Less than or equal to.

scidb

<>

Not equal.

scidb

=

Equal.

scidb

>

Greater than.

scidb

>=

Greater than or equal to.

scidb

abs

Absolute value.

scidb

acos

Inverse (arc) cosine in radians.

scidb

allzeros

Return a zero-values timestamp.

timeseries

and

Infix logical AND.

scidb

append_offset

Appends a GMT offset in seconds to a datetime attribute, yielding a datetimetz value.

scidb

apply_offset

Converts a GMT datetime to local datetime by subtracting the offset timezone value, and stores the result as datetimetz including the offset timezone value.

scidb

asin

Inverse (arc) sine in radians.

scidb

atan

Inverse (arc) tangent in radians.

scidb

binomcdf

Binomial cummulative distribution function.

linear algebra

ceil

Round to next larger whole integer.

scidb

chi2cdf

Chi-squared cumulative distribution function.

linear algebra

cos

Cosine, input in radians.

scidb

current_date

Current date value.

timeseries

current_time

Current time value.

timeseries

current_timestamp

Current timestamp value.

timeseries

date_dt

Day of a date value.

timeseries

date_fm

Datatype conversion.

timeseries

day_of_week

Returns an integer alue representing the day of the week: 0 (Sunday) through 6 (Saturday).

scidb

day_ts

Day of a timestamp value.

timeseries

days_i

Days of an interval value.

timeseries

exp

Exponential function.

scidb

extract_dt

Extract a field you supply from a date value.

timeseries

extract_i

Extract a field you supply from an interval value.

timeseries

extract_tm

Extract a field you supply from a time value.

timeseries

extract_ts

Extract a field you supply from a timestamp value.

timeseries

first_index

The initial dimension value of the supplied dimension. This function takes two arguments: array name as a string, and optionally, dimension name as a string.

scidb

floor

Round to the next-lowest integer.

scidb

format_dt

Apply a format string to a date value.

timeseries

format_i

Apply a format sting to an interval value.

timeseries

format_tm

Apply a format string to a time value.

timeseries

format_ts

Apply a format string to a timestamp value.

timeseries

gcd_hf

Great circle distance, Haversine formula.

linear algebra

gcd_slc

Great circle distance, spherical law of cosines.

linear algebra

gcd_vif

Great circle distance, Vincenty formula.

linear algebra

geomcdf

Geometric cumulative distribution function.

linear algebra

get_offset

Returns the timezone offset, in seconds.

scidb

high

Returns the maximum dimension value where the cell is is non-empty. This function takes two arguments: array name as a string, and optionally, dimension name as a string.

scidb

hour_i

Hour of an interval value.

timeseries

hour_of_day

Extracts the hour from a datetime attribute.

scidb

hour_tm

Hour of a time value.

timeseries

hour_ts

Hour of a timestamp value.

timeseries

hygecdf

Hypergeometric cumulative distribution function

linear algebra

hygepmf

Hypergeometric probability mass function.

linear algebra

hygequant

Hypergeometric quantile function.

linear algebra

ibinomcdf

Inverse binomial cumulative distribution function.

linear algebra

ichi2cdf

Inverse chi-squared cumulative distribution function.

 linear algebra

igeomcdf

Inverse geometric cumulative distribution function.

linear algebra

ihygecdf

Inverse hypergeometric cumulative distribution function.

linear algebra

iif

Inline if: iif(expression, value_if_true, value_otherwise).

scidb

inegbinomcdf

Inverse negative binomial cumulative distribution function.

linear algebra

inormcdf

Inverse normal cumulative distribution function.

linear algebra

instanceid

Returns the instance ID (int64) of the SciDB instance on which it is run.  SciDB arrays are spread across some or all of the instances in the SciDB cluster. Thus, you can use the instanceid function to determine where the chunks of an array are stored.

scidb

interval

Datatype conversion.

timeseries

is_nan

Is NaN (not a number).

scidb

is_null

Is NULL.

scidb

itcdf

Inverse student's t-distribution cumulative distribution function.

linear algebra

last_index

The final dimension value of the supplied dimension. This function takes two arguments: array name as a string, and optionally, dimension name as a string.

scidb

length

Returns the size of the supplied dimension. This function takes two arguments: array name as a string, and optionally, dimension name as a string.

scidb

localtime

The local time.

timeseries

localtimestamp

The timestamp, based on the local timezone.

timeseries

log

Natural logarithm.

scidb

log10

Base-10 logarithm.

scidb

low

Returns the minimum dimension value where the cell is is non-empty. This function takes two arguments: array name as a string, and optionally, dimension name as a string.

scidb

make_dt

Returns a date value, assembled from individual values for year, month, and day.

timeseries

make_i

Returns an interval value, assembled from days, hours, minutes, seconds, and microseconds.
OR
Returns an interval value, assembled from an integer and a unit: the unit can be 'sec', 'min', 'hour', or 'day'.
OR
Returns an interval value, assembled from hours, minutes, seconds, and microseconds.

timeseries

make_tm

Returns a time value, assembled from individual values for hour, minutes, second, and microsecond.

timeseries

make_ts

Returns a timestamp value, assembled from individual values for year, month, day, hour, minute, second, and microsecond.
OR
Returns a timestamp value, assembled from a date value and a time value.

timeseries

max

Does not do what the name suggests.  To find the maximum of two values, use iif(a > b, a, b) .

  • With two bool arguments, it returns their logical OR.  Use the infix or function instead.

  • With two string arguments, it returns the string that is higher in the ASCII collating sequence.

 scidb

min

Does not do what the name suggests.  To find the minimum of two values, use iif(a < b, a, b) .

  • With two bool arguments, it returns their logical AND.  Use the infix and function instead.

  • With two string arguments, it returns the string that is lower in the ASCII collating sequence.

scidb

min_i

Minutes of an interval value.

timeseries

min_tm

Minutes of a time value.

timeseries

min_ts

Minute of a timestamp value.

timeseries

missing

Converts an int32 value into a NULL value with that missing reason code.  Valid values must be in the range 0 ≤ x < 128. 

scidb

missing_reason

Returns the missing reason code for a value, or -1 if the value is not missing.

scidb

month_dt

Month of a date value.

timeseries

month_ts

Month of a timestamp value.

timeseries

msec_i

Milliseconds of an interval value.

timeseries

msec_tm

Milliseconds of a time value.

timeseries

msec_ts

Milliseconds of a timestamp value.

timeseries

negbinomcdf

Negative binomial cumulative distribution function.

linear algebra

normcdf

Normal cumulative distribution function.

linear algebra

not

Boolean NOT.