Document toolboxDocument toolbox

To BigInt (bigint)

Description

Converts a valid number string, a float number, an int, a json that contains a valid number, or a MAC address into a big integer number. Note that float numbers are not rounded, so the result will be the integral part.

This operation is for big integers that are higher than int64s. Otherwise, use the To Int operation. 

How does it work in the search window?

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

Argument

Data type

Argument

Data type

String to convert / Number to convert / MAC to convert / Json to convert mandatory

string, float, mac, json

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

Example

Using the Free Text Query option we introduce the following:

from siem.logtrust.web.activity select 12345678901234567890987654321 as BI select 9223372036854775805 as int64

We want to divide the values of the BI column by 2.5, and then transform the resulting float values into integer. First, use the Division (div, \) operation to get the results needed in a new column (BIFloat). Then, add a new column using the To BigInt operation. The arguments needed are:

  • Number to convert - BIFloat column

Click on the create column and you will see the following result:

How does it work in LINQ?

Use the operator select... as...  and add the operation syntax to create the new column. These are the valid formats of the To BigInt operation:

  • bigint(number_string)

  • bigint(float)

  • bigint(mac)

  • bigint(json_integer)

Example

You can copy the following LINQ script and try the first example explained above on the siem.logtrust.web.activity table. 

from siem.logtrust.web.activity select BI \ 2.5 as BIFloat, bigint(BIFloat) as BIInteger