Skip to main content Link Search Menu Expand Document (external link)

Processing - len and listlen

Table of contents
  1. len
  2. listlen
  3. Example

len

  • len(variable)

If the variable is string type, return length of the string.

listlen

  • listlen(variable)

If the variable is list type, return size of the list.

Example

search {from="-30d@d", to="-20@d"} sContent("@source","cloudtrail")
let {sourceIPAddress,eventName,eventSource} =f("@cloudtrail")
where eventSource=="ec2.amazonaws.com" and sContains(eventName,"Describe")==false
aggregate count_sourceIPAddress=count() by sourceIPAddress
let lens=len(sourceIPAddress)