Docs
DocumentationQuery ReferenceAPI Reference
Open Console→→
DocumentationQuery ReferenceAPI Reference

Introduction

Query reference overview

APL

IntroductionSample queriesAll features
Functions
Scalar functions
Array functions
Overview
array_concat
array_extract
array_iff
array_index_of
array_length
array_reverse
array_rotate_left
array_rotate_right
array_select_dict
array_shift_left
array_shift_right
array_slice
array_sort_asc
array_sort_desc
array_split
array_sum
bag_has_key
bag_keys
bag_pack
bag_zip
isarray
len
pack_array
pack_dictionary
strcat_array
Conditional functions
Overview
case
iff
Conversion functions
Overview
dynamic_to_json
ensure_field
isbool
toarray
tobool
todatetime
todouble, toreal
todynamic
tohex
toint, tolong
tostring
totimespan
Datetime functions
Overview
ago
datetime_add
datetime_diff
datetime_part
dayofmonth
dayofweek
dayofyear
endofday
endofmonth
endofweek
endofyear
getmonth
getyear
hourofday
monthofyear
now
startofday
startofmonth
startofweek
startofyear
unixtime_microseconds_todatetime
unixtime_milliseconds_todatetime
unixtime_nanoseconds_todatetime
unixtime_seconds_todatetime
week_of_year
GenAI functions
Overview
genai_concat_contents
genai_conversation_turns
genai_cost
genai_estimate_tokens
genai_extract_assistant_response
genai_extract_function_results
genai_extract_system_prompt
genai_extract_tool_calls
genai_extract_user_prompt
genai_get_content_by_index
genai_get_content_by_role
genai_get_pricing
genai_get_role
genai_has_tool_calls
genai_input_cost
genai_is_truncated
genai_message_roles
genai_output_cost
Hash functions
Overview
hash
hash_md5
hash_sha1
hash_sha256
hash_sha512
IP functions
Overview
format_ipv4
format_ipv4_mask
geo_info_from_ip_address
has_any_ipv4
has_any_ipv4_prefix
has_ipv4
has_ipv4_prefix
ipv4_compare
ipv4_is_in_range
ipv4_is_in_any_range
ipv4_is_match
ipv4_is_private
ipv4_netmask_suffix
ipv6_compare
ipv6_is_in_any_range
ipv6_is_in_range
ipv6_is_match
parse_ipv4
parse_ipv4_mask
Mathematical functions
Overview
abs
acos
asin
atan
atan2
cos
cot
degrees
exp
exp2
exp10
gamma
isfinite
isinf
isint
isnan
log
log2
log10
loggamma
max_of
min_of
not
pi
pow
radians
rand
range
round
set_difference
set_has_element
set_intersect
set_union
sign
sin
sqrt
tan
Metadata functions
Overview
column_ifexists
cursor_current
ingestion_time
Pair functions
Overview
find_pair
pair
parse_pair
Rounding functions
Overview
bin
bin_auto
ceiling
floor
String functions
Overview
base64_decode_toarray
base64_decode_tostring
base64_encode_fromarray
base64_encode_tostring
coalesce
countof
countof_regex
extract
extract_all
format_bytes
format_url
gettype
indexof
indexof_regex
isascii
isempty
isnotempty
isnotnull
isnull
parse_bytes
parse_csv
parse_json
parse_path
parse_url
parse_urlquery
quote
regex_quote
replace
replace_regex
replace_string
reverse
split
strcat
strcat_delim
strcmp
string_size
strlen
strrep
strip_ansi_escapes
substring
tolower
totitle
toupper
translate
trim
trim_end
trim_end_regex
trim_regex
trim_space
trim_start
trim_start_regex
unicode_codepoints_from_string
unicode_codepoints_to_string
url_decode
url_encode
SQL functions
Overview
parse_sql
format_sql
Time series functions
Overview
series_abs
series_acos
series_add
series_asin
series_atan
series_ceiling
series_cos
series_cosine_similarity
series_divide
series_dot_product
series_equals
series_exp
series_fft
series_fill_backward
series_fill_const
series_fill_forward
series_fill_linear
series_fir
series_floor
series_greater
series_greater_equals
series_ifft
series_iir
series_less
series_less_equals
series_log
series_magnitude
series_max
series_min
series_multiply
series_not_equals
series_pearson_correlation
series_pow
series_sign
series_sin
series_stats
series_stats_dynamic
series_subtract
series_sum
series_tan
Type functions
Overview
isimei
ismap
isreal
iscc
isstring
isutf8
Aggregation functions
Overview
arg_min
arg_max
avg
avgif
count
countif
dcount
dcountif
histogram
histogramif
make_list
make_list_if
make_set
make_set_if
max
maxif
min
minif
percentile
percentileif
percentiles_array
percentiles_arrayif
phrases
rate
spotlight
stdev
stdevif
sum
sumif
topk
topkif
variance
varianceif
Operators
Tabular operators
Overview
count
distinct
extend
extend-valid
externaldata
getschema
join
limit
lookup
make-series
mv-expand
order
parse
parse-kv
parse-where
project
project-away
project-keep
project-rename
project-reorder
redact
sample
search
sort
summarize
take
top
union
where
Scalar operators
Set membership operators
Overview
in
!in
in~
!in~
Logical
Numerical
String
Reference
Entity names
Map fields
Null values
Scalar data types
Set statement
Special field attributes
Migrate
Splunk SPL
SQL
Sumo Logic

MPL

Language featuresSample queriesMigrate
APL/Functions

String functions

Learn how to use and combine different string functions in APL

The table summarizes the string functions available in APL.

NameDescription
base64_decode_toarrayDecodes a Base64-encoded string into an array of bytes.
base64_decode_tostringDecodes a base64 string to a UTF-8 string.
base64_encode_fromarrayConverts a sequence of bytes into a Base64-encoded string.
base64_encode_tostringEncodes a string as base64 string.
coalesceEvaluates a list of expressions and returns the first non-null (or non-empty for string) expression.
countof_regexCounts occurrences of a substring in a string. Regex matches don’t.
countofCounts occurrences of a substring in a string.
extract_allGets all matches for a regular expression from a text string.
extractGets a match for a regular expression from a text string.
format_bytesFormats a number of bytes as a string including bytes units
format_urlFormats an input string into a valid URL by adding the necessary protocol if it’s escaping illegal URL characters.
gettypeReturns the runtime type of its single argument.
indexofFunction reports the zero-based index of the first occurrence of a specified string within input string.
isasciiChecks whether all characters in an input string are ASCII characters.
isemptyReturns true if the argument is an empty string or is null.
isnotemptyReturns true if the argument isn’t an empty string or a null.
isnotnullReturns true if the argument isn’t null.
isnullEvaluates its sole argument and returns a bool value indicating if the argument evaluates to a null value.
parse_bytesParses a string including byte size units and returns the number of bytes
parse_csvSplits a given string representing a single record of comma-separated values and returns a string array with these values.
parse_jsonInterprets a string as a JSON value and returns the value as dynamic.
parse_urlParses an absolute URL string and returns a dynamic object contains all parts of the URL.
parse_urlqueryParses a URL query string and returns a dynamic object contains the Query parameters.
quoteReturns a string representing the input enclosed in double quotes, with internal quotes and escape sequences handled appropriately.
replace_regexReplaces all regex matches with another string.
replace_stringReplaces all string matches with another string.
replaceReplace all regex matches with another string.
reverseFunction makes reverse of input string.
splitSplits a given string according to a given delimiter and returns a string array with the contained substrings.
strcat_delimConcatenates between 2 and 64 arguments, with delimiter, provided as first argument.
strcatConcatenates between 1 and 64 arguments.
strcmpCompares two strings.
string-sizeReturns the length, in characters, of the input string.
strlenReturns the length, in characters, of the input string.
strrepRepeats given string provided number of times (default = 1).
substringExtracts a substring from a source string.
tolowerConverts a string to lower case.
totitleConverts a string to title case.
toupperConverts a string to upper case.
translateSubstitutes characters in a string, one by one, based on their position in two input lists.
trim_end_regexRemoves trailing match of the specified regular expression.
trim_endRemoves trailing match of the specified cutset.
trim_regexRemoves all leading and trailing matches of the specified regular expression.
trim_spaceRemoves all leading and trailing whitespace from a string.
trim_start_regexRemoves leading match of the specified regular expression.
trim_startRemoves leading match of the specified cutset.
trimRemoves all leading and trailing matches of the specified cutset.
unicode_codepoints_from_stringConverts a UTF-8 string into an array of Unicode code points.
unicode_codepoints_to_stringConverts an array of Unicode code points into a UTF-8 encoded string.
url_decodeConverts encoded URL into a regular URL representation.
url_encodeConverts characters of the input URL into a format that can be transmitted over the Internet.
Was this page helpful?
Suggest edits on GitHub
PreviousfloorNextbase64_decode_toarray