> For the complete documentation index, see [llms.txt](https://docs.cloudfabrix.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cloudfabrix.io/rda/rda-userguide/rda-aiops-studio/examples-jupyter/data-mapping-cfxdm-dm-functions/to_numeric.md).

# To\_Numeric

**To\_Numeric**\
\
Convert input value into numeric

### Example 1:&#x20;

Step 1: Create an empty **to\_numeric\_example\_1** using AIOps studio as shown in the below screenshot. 

![Empty pipeline](/files/-MeSYm49B8Nh2QPxqFNX)

Step 2: Add the following pipeline code/commands into the above-created pipeline as shown in the below screenshot:

You can copy the below code into your pipeline and execute that in your environment.\
\
\&#xNAN;*`##### This pipeline creates disk size in bytes as a dataset row. Pipeline uses`*\
*`##### dm function to_numeric to convert string data into numeric. Next uses`*\
*`##### mathematical operation to convert bytes to GB and displays both bytes`* \
*`##### and Gb to the output`*\
\
*`@dm:empty`* \
*`--> @dm:addrow disk_size_in_bytes = '10737418240'`*\
*`--> @dm:map attr = 'disk_size_in_bytes' & func = 'to_numeric'`* \
*`--> @dm:map from = 'disk_size_in_bytes' & to = 'disk_size_in_GB' & func = evaluate & expr = "disk_size_in_bytes/1024/1024/1024"`*\ <br>

![Pipeline code added to empty pipeline created](/files/-MeS_Pm6Io06R3KN82N5)

Step 3: Click verify button to make sure syntax and pipeline code is correct (as shown below)

![Pipeline code is verified using 'Verify' button as shown above.](/files/-MeS_kc0zEIo158_z1Va)

Step 4:  Click execute button and execute the pipeline. RDA will execute the pipeline without any errors (as shown below)

![Successful execution of pipeline without any errors](/files/-MeSa9e7ayAOUyay_cIG)

Step 5: RDA uses the dm function to\_numeric to convert string data into numeric, which in turn is used to convert disk size that was in bytes to convert to GB as shown in the output.\
&#x20;This function will be useful when the dataset contains strings that need to be converted to numeric and perform some mathematical logic similar to the above-explained example.

![Successful execution of pipeline using dm function 'to\_numeric' and prints output in Gb](/files/-MeSb-4Sx8qBQQp1HgId)
