Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel2
typeflat

...

Adds a new column that returns the length of a string.

For arrays, sets and map data types, the operation is called size.

How does it work in the search window?

Select Create column field in the search window toolbar, then select the Length operation. You need to specify one argument:

Argument

Data type

String mandatory

string

The data type of the values in the new column is integerfield is integer.

Info

Automatic conversion

Fields of a different data type will be automatically converted to the correct data type for the operation, if possible. When not possible, you must first convert the field to the expected data type.

Example

In the demosiem.logtrust.ecommerceweb.dataactivity table, we want to know the length of the strings in the userAgent columnheaders field. To do it, we will create a new column field using the Length operation.

The arguments needed to create the new column field are:

  • String userAgent columnheaders field

...

Click Create column and you will see the following result:

...

Use the operator select... as...  and add the operation syntax to create the new column. This is the syntax for the Length operation:

  • length(string)

Example

You can copy the following LINQ script and try the above example on the demo.ecommerce.data table. 

Code Block
from demo.ecommerce.data
  select length(userAgent) as userAgent_