# 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)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cloudfabrix.io/rda/rda-userguide/rda-aiops-studio/examples-jupyter/data-mapping-cfxdm-dm-functions/to_numeric.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
