# Data Mapping cfxdm - dm:fixcolumns

**dm: fixcolumns:** This dm function allows the user to remove the special characters like @,. (dot) etc from a column name. If there is a special character in between a column name,  it replaces it with an underscore (ex:  First. Last to First\_Last)

**dm: fixcolumns** synta&#x78;**:** It doesn't require any arguments. Just ingest the data into this tag/function using a pipe (-->)

### Example 1:

Default dm:  fixcolumns functionality is captured in this example.

Step 1: Create an empty **dm\_fixcolumns\_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-Mf40aP_cOLirVd3x2ic%2F-Mf41iOj3KxOf5UXoi2M%2FScreen%20Shot%202021-07-20%20at%2010.50.58%20AM.png?alt=media\&token=6a5fb2cb-fb16-4321-800d-5409f61ab2ff)

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 a set of records/dateset details coming from a vCenter`* \
*`##### environment. This dataset includes datastore details, Folder name, guest_hostname,`* \
*`##### guest_ip_address.`*\
\
*`######  This pipeline uses dm fixcolumns to fix the column names that has special`* \
*`######  characters and replace with '_' character for other operations.`*\
\
*`@dm:empty`* \
*``--> @dm:addrow datastore.1 = 'CFX-QA-Store-NFS-qnap' & Folder = '' & guest_full_name = 'CentOS 4/5/6/7 (64 bit)' & guest_hostname = 'test2.oia.cloudfabrix.com' & guest_ip_address = '10.95.134.17' & `VM Name` = 'test1'``*\
\
*``--> @dm:addrow datastore.1 = 'CFX-QA-Store-NFS-qnap' & Folder = 'User VMs' & guest_full_name = 'CentOS 4/5/6/7 (64 bit)' & guest_hostname = 'qa.oia.cloudfabrix.com' & guest_ip_address = '10.95.122.13' & `VM Name` = 'test2'``*\
\
*``--> @dm:addrow datastore.1 = 'ENG_ISOs,netapp-qa-nfs' & Folder = 'User VMs,Ravi-Pisupati,TestVMs' & guest_full_name = 'Ubuntu Linux (64 bit)' & guest_hostname = 'ubuntuqa' & guest_ip_address = '10.95.102.172' & `VM Name` = 'test3'``*\
\
*``--> @dm:addrow datastore.1 = 'datastore1 (6)' & Folder = 'Ravi-Pisupati' & guest_full_name = 'CentOS 4/5/6/7 (64 bit)' & guest_hostname = 'elkstack' & guest_ip_address = '10.95.121.218' & `VM Name` = 'test4'``*\
\
*`--> @dm:addrow datastore.1 = 'datastore1-198' & Folder = '' & guest_full_name = 'Microsoft Windows Server' & guest_hostname = 'spdnode.adwinstack' & guest_ip_address = '10.95.132.4'`* \
&#x20;*``& `VM Name` = 'test5'``*\
\
*``--> @dm:addrow datastore.1 = 'netapp-dev-nfs-01' & Folder = 'User VMs,Ravi-Pisupati,TestVMs' & guest_full_name = 'CentOS 4/5/6/7 (64 bit)' & guest_hostname = 'localhost' & guest_ip_address = '10.95.103.115' & `VM Name` = 'test6'``*\
\
*``--> @dm:addrow datastore.1 = 'netapp-dev-nfs-01' & Folder = 'User VMs,Ravi-Pisupati,TestVMs' & guest_full_name = 'CentOS 4/5/6/7 (64 bit)' & guest_hostname = 'localhost' & guest_ip_address = '10.95.103.115' & `VM Name` = 'test7'``*\
\
*``--> @dm:addrow datastore.1 = 'netapp-dev-nfs-02' & Folder = 'CFX-Drama,Capri-Demo' & guest_full_name = 'CentOS 4/5/6/7 (64 bit)' & guest_hostname = 'democloudp' & guest_ip_address = '10.95.122.212' & `VM Name` = 'test8'``*\
\
*``--> @dm:addrow datastore.1 = 'netapp-dev-nfs-02' & Folder = 'CFX-Drama,Capri-Demo' & guest_full_name = 'CentOS 4/5/6/7 (64 bit)' & guest_hostname = 'ravip-v201-platform' & guest_ip_address = '10.95.122.216' & `VM Name` = 'test9'``*\
\
*``--> @dm:addrow datastore.1 = 'netapp-dev-nfs-02' & Folder = 'CFX-Drama,Capri-Demo' & guest_full_name = 'CentOS 4/5/6/7 (64 bit)' & guest_hostname = 'cfxautomatesvc' & guest_ip_address = '10.95.125.116' & `VM Name` = 'test10'``*\
\
*`--> @dm:fixcolumns`*<br>

![Pipeline code added to empty pipeline](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mf429gNv8GZecZmMi3J%2F-Mf43mx2KabUaZ8byJn3%2FScreen%20Shot%202021-07-20%20at%2011.00.00%20AM.png?alt=media\&token=c690af84-7f7f-4a57-a74b-c22674bde5ca)

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.](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mf44-F_lBfkMu5E9896%2F-Mf44HkngVU-gDCxdkot%2FScreen%20Shot%202021-07-20%20at%2011.02.13%20AM.png?alt=media\&token=86f015b8-9c74-4fb8-be3f-a595cac59196)

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

![Screenshot-1](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mf44YgUbXGo9L7cvdtH%2F-Mf44mtc_6Kuary5VhQM%2FScreen%20Shot%202021-07-20%20at%2011.04.25%20AM.png?alt=media\&token=9558764a-fed0-43c8-ac68-90240d69e0cf)

![Screenshot -2 ](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mf44p2XEUzLozomn_0w%2F-Mf455zL6Y8WIgvTJMyN%2FScreen%20Shot%202021-07-20%20at%2011.05.47%20AM.png?alt=media\&token=d6001204-794e-41fa-ab94-0c616d5ff4ae)

Step 5: RDA uses the dm fixcolumns function to replace special characters (dot, space, etc) with underscore character as shown in the following screenshot.

![VM Name and datastore column names are replacd with '\_' character as shown above using fixcolumns](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mf45SZUsbCrSAFqhQQw%2F-Mf45ovU7UljS_b7xbRz%2FScreen%20Shot%202021-07-20%20at%2011.08.55%20AM.png?alt=media\&token=58483208-72fb-4cfa-98ce-5a2448f70016)
