# Data Mapping cfxdm - dm:to\_type

**dm:to\_type:** It allows to change or set the data type to string or integer (numeric) or float for specified columns.&#x20;

@param '**columns**' (mandatory, comma separated list of column names), @param '**type**' (mandatory, supported options are: str / int / float)

**dm:to\_type:** Syntax

* **columns** (mandatory)**:** Comma-separated list of column names
* **type** (mandatory)**:** Supported options are: **str** (string or text) / **int** (integer or numeric) / **float**

### Example 1:

Step 1: Create an empty **dm\_to\_type\_example\_1** using AIOps studio as shown in the below screenshot

![Empty pipeline](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mg7bsnFaRiAXK9Ft6RM%2F-Mg7cLjdud1l92kL-yHT%2FScreen%20Shot%202021-08-02%20at%201.49.58%20PM.png?alt=media\&token=15b205ce-05d9-4674-9bf8-2231cd1a4068)

*`##### This pipeline creates a set of records/dateset details with different datatypes`*\
*`##### String and integer.`*\
\
*`######  This pipeline uses dm to_type to convert basic string data type to int datatype`*\
\
~~*`--> @dm:empty`*~~ \
~~*`--> @dm:addrow id = 'a1' & x = '10.0' & y = '3.11' & z = 9`*~~                                \
~~*`--> @dm:addrow id = 'a2' & x = '1.0' & y = '13.0'  & z = 4`*~~ \
~~*`--> @dm:addrow id = 'a3' & x = '7.0' & y = '3.0'   & z = 3`*~~ \
~~*`--> @dm:addrow id = 'a4' & x = '4.0' & y = '-1.4'  & z = 9`*~~\
&#x20;~~*`--> @dm:to_type columns ='x,y' & type = 'int'`*~~<br>

![Pipeline code added to above created empty pipeline](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mg7eFvisBLLz5uLns7J%2F-Mg7eyUXjK_Qc-8qGHoL%2FScreen%20Shot%202021-08-02%20at%202.01.18%20PM.png?alt=media\&token=79901dd6-28aa-4d8c-8b7e-80153aee32af)

Step &#x33;**:** Click verify button to verify the pipeline. RDA will verify the pipeline without any errors (as shown below)

![Pipeline code verified ](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mg7f5TuJIwqF3wfQNpJ%2F-Mg7fSEHnOf_t581WXNC%2FScreen%20Shot%202021-08-02%20at%202.03.31%20PM.png?alt=media\&token=aa2196f0-046a-4fbe-8408-e371a5889a54)

Step &#x34;**:** Click execute button to execute the pipeline. RDA will execute the pipeline without any errors (as shown below)

![Pipeline execution without any errors](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mg7f_ad17idg43v0WuG%2F-Mg7fs75-TQyKWKhWHED%2FScreen%20Shot%202021-08-02%20at%202.05.21%20PM.png?alt=media\&token=671f975a-6e70-46c2-9e61-43d5d07c9b0e)

Step 5: Verify that the output data is enriched with the requested column names and print the output as shown in the below screenshot.

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mg7g0HZvEmBZVOmwXxW%2F-Mg7gO7s5WU3zv7b7OKa%2FScreen%20Shot%202021-08-02%20at%202.07.34%20PM.png?alt=media\&token=c0fc1012-63f2-4657-ab64-2c26114c88ac)

As shown in the above pipeline, this function is used to convert string to int (or float) datatype needed for any integer manipulation, etc.
