Devo Linq Query Language Syntax
Devo Linq Query Language Syntax
from Point to a table for the query. Specify a table decode switch/case equivalent clause to set conditionally column
name using tags. values:
from my.app.web.auth decode(column, checkValue, value,[ch‐
select Add column to result set: nvl Null-Coalescing operator. Allow to set an alternate value
select source_column or column when input value is null.
column] group:
avg(column); nnavg(column)
[every client_period]
group by statusCode count Returns the count of results on each group:
group every 10m count([column])
group every 10m by statusCode With argument, include only not null
every 1m entries in the count.
every Client aggregation filter: first / nnfirst Returns the first or the not null first entry of the results
every period on each group:
Aggregation functions and operators (cont) Aggregation functions and operators (cont)
last / nnlast Returns the last or the not null last entry of the ustddev / nnustddev Returns the unbiased standard deviation
results on each group: [ustddev] of the values or not null values
last(column); nnlast(column) [unnstddev] of the results on each group:
max / min Returns the maximum or the minimum value for ustddev/unnstddev
(column)
sum Returns the sum of the results on each group: values or not null values [unnvar] of the
has, [->] Case sensitive contains comparison. Using the operator replace Replaces only first occurrence of a string with a
-> only allows check one value: substitute string:
has(column, value1, [value2],…) replace(column, stringToSearch,
column -> value1 stringToReplace)
weakhas Case insensitive contains comparison: replaceall Replaces all occurrences of a search string with a
weakhas(column, value) substitute string:
in, [<-] Case sensitive is contained comparison. Using the replaceall(column, stringToSearch,
String operators and functions (cont) String operators and functions (cont)
subsall Returns a string replacing all substring occurrences damerau Returns Damerau distance:
based on a regular expression using a template damerau(column, value)
string as substitution value: hamming Returns Hamming distance:
FailValue is returned when is hamming(column, value)
provided and no occurrences found
levenshtein Returns Levenstein distance:
subs(column, regexp, template,
levenshtein(column, value)
[failValue])
osa Returns osa distance:
subs(column, re(string), templa‐
osa(column, value)
te(string), [failValue])
publicsuffix Returns the main public suffix of a hostname:
trim Returns the result of trimming both sides:
publicsuffix(hostnameColumn))
trim(column)
'www.my.site.co.uk' = 'co.uk'
ltrim Returns the result of trimming left side:
rootdomain Returns the root domain of a hostname part of an
ltrim(column)
url:
rtrim Returns the result of trimming right side:
rootdomain(hostnameUrlColumn)
rtrim(column)
'www.my.site.com' = 'site'
matches, [~] Matches function that finds occurrences in a column
rootprefix Returns the root prefix of a hostname part of an url:
using a regular expression:
rootpredix(hostnameUrlColumn))
matches(column, re(string) or
'www.my.site.com' = 'www.m‐
regexp value)
y.site'
column ~ re(string) or regexp value
rootsuffix Returns the root suffix of a hostname part of an url:
peek Returns the part of a string based on a regular
rootsuffix(hostnameUrlColumn))
expression, optionally indicating a specific part
'www.my.site.com' = 'my.si‐
occurrence:
te.com'
If no partNumber is provided then
returns first part occurrence. subdomain Returns the subdomain of a hostname part of an
url:
peek(column, re(string) or regexp,
subdomain(hostnameUrlColumn)
[partNumber])
'www.my.site.com' = 'www'
formatnumber Format a number with a specific mask and locale:
topleveldomain Returns the top level domain of a hostname part of
formatnumber(numberColumn, mask,
an url::
locale)
topleveldomain(hostnameUrlColumn)
formatnumber(totalAmount, "‐
'www.my.site.co.uk' = 'uk'
###.##", "en-GB")
shannonentropy
md5 pragmavalue
sha1 tablename
sha256
Data Types
sha512
str String
Web functions int Integer number: 1,58,12598
urischeme float Floating point number:24.256
urihost boolean Boolean: true, false
uriport timestamp Timestamp date in format: yyyy-MM-dd HH:mm:‐
uripath ss.SSS
urifragment boxar(int) Byte array in hexadecimal string format
uriquery duration Amount of time: an integer following by a letter
uriuser [d]ays, [h]ours, [m]inutes, [s]econds,
[No suffix]:milliseconds
urissp
uriauthority geocord Geographic coordinates set:
Latitude/longitude sexagesimal
absoluteuri
values: 40º24'N 3º41'W
opaqueuri
Hash representation of coordi‐
urldecode nates (geohash)
uaurl ip IPv4 address format: 192.168.5.56
uaname
ip6 IPv6 address format: 2001:0db8:85a3:‐
uatype 0000:0000:8a2e:0370:7334
uaversion net4 IPv4 address in format: {x.x.x.x/0
uaicon net6 IPv6 address in format: x.x.x.x.x.x/s
uarobot
regexp Regular expression: [^\w]
uainfourl
template Represents a substitution string mask.
uafamily
dc Represents a estimated count of distinct elements in
uacompany a data stream.
uacompanyurl image Image as Base64 encoding image.
uadeviceicon mac MAC address in format: 00:0a:95:9d:‐
uadeviceinfourl 68:16
uadevicetype namepattern Represents a part of a table name: my.app,
uaosurl demo, ...
eq, [=] Equals to function and operator: Math functions and operators
eq(column, value or column)
abs
column1 = value or column
add / [+]
eqic Case insensitive Equals to function:
sub / [-]
eqic(column, value or column)
mul / [*]
ge, [>=] Greater or equal function and operator:
div / [\]
ge(column, value or column)
column >= value or column rdiv / [/] Real division function and operator:
gt, [>] Greater than function and operator: mod / [%%] Module function:
gt(column, value or column) rem / [%] Return the remain of a division operation:
column > value or column pow Power function:
le, [<=] Less or equal function and operator: cbrt Cube root function:
le(column, value or column)
sqrt Square root function:
column <= value or column
ceil
lt, [<] Less than function and operator:
floor
lt(column, value or column)
round
column < value or column
signum
ne, [/=] Not equal function and operator:
ne(column, value or column)
Statistical and specialised statistical functions
column /= value or column
estimation
isnull Check if is null function:
isnull(column) pack
isnotnull(column)
Network functions
and isprivate
or ipip4
not ipprotocol
purpose
host
routing
httpstatusdescription
httpstatustype
reputation
score
sbl
net6
Date and time functions
mac
day
to16
dayofweek
from16
dayofyear
to64
month
from64
year
toutf8
epoch
fromutf8
hour
toz85
minute
fromz85
second
compatible
millisecond
mapped
today
translated
tomorrow
template
yesterday
timestamp
period
duration
re
Packet functions
parsedate
hasio4
formatdate
hastcp
humansize
hasudp
mkboxar
hasether
ip4fragment
ip4cs
ip4hl
ip4ds
ip4ecn
ip4tos
etherdst
ethersrc
etherpayload
etherstatus
ethertag
ethertype
tcpdst
tcpsrc
tcpstatus
tcpflags
tcppack
tcpcs
tcpseq
tcphl
tcppayload
tcpurg
tcpwin
udpsrc
udpport
udpstatus
udpcs
udplen
udppayload