Versions Compared

Key

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

...

How does it work in the search window?

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

Argument

Data type

String to convert / Integer to convert / Json to convert mandatory

string, integer, json

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

Example 1

In the demo.ecommerce.data table, we want to transform the values in our bytesTransferred column (integer) into float format. To do it, we will create a new column using the To Float operation.

...

  • float(number_string)

  • float(integer)

  • float(json_float)

Example 1

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

Code Block
from demo.ecommerce.data
  select float(bytesTransferred) as bytestransferred_Float

Example 2

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

Code Block
from demo.ecommerce.data
select jsonparse("{\"str\": \"hello\", \"int\": 1, \"float\": 2.5, \"boolean\": true, \"array\": [1,2,3], \"object\": {\"a\": 5}}") as json,
jqeval(jqcompile(".float"), json) as jsonFloat,
float(jsonFloat) as float