> 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-map.md).

# Data mapping - cfxdm - dm:map

**dm:map:** This tag allows the user to manipulate or transform the columns and their values.&#x20;

Below are some of the operations you can perform using this tag.

* Copy the Column X along with its values as is and create a new Column Y
* Transform values from a Column to something else using 'functions' based on the user's requirement

**dm: map syntax:**&#x20;

* **dm:map from = '*****COLUMN\_X*****' & to = '*****COLUMN\_Y*****'**

OR

* **dm:map attr = '*****COLUMN\_Y' &*****&#x20;func&#x20;*****= "\<function-name>"  & \<argument syntax>***

Following two data CSV files are used to explain dm: map functionality

**Step 1**:&#x20;

Download the "[surveys.csv](https://macaw-amer.s3.amazonaws.com/rda/data/surveys.csv)" file to the local machine as shown below using a standard web browser.\
Download the [incidents.csv](https://macaw-amer.s3.amazonaws.com/rda/data/incidents.csv) file to the local machine as shown below using a standard web browser.

![](/files/-M_x4sZ7UOPhSWH-a2bm)

**Step 2**:  Upload (load) the above file into your RDA system as shown below.

* Using a web browser, connect to the RDA system \<https\://\<rda-ipaddress>:9998>
* Click on the CFXDX Python 3 icon from the main landing page of the RDA launcher (as shown below)&#x20;

![](/files/-M_x5Sc0C1-2QjcfMEsl)

* Launch AIOps studio using the RDA provided text field to start AIOps studio.

![](/files/-M_x5o_GvIsotp1GQDyi)

Select the files and upload them into the studio environment (as shown below).

![Select the two downloaded files locally to a folder.](/files/-M_x7oxqlBkQgx1qUKo0)

![Uploaded files into AIOps studio](/files/-M_x8rW8tx8leok1XWEq)

### **Example 1:** Clone the Column (copy)

This section explains two scenarios :\
1\. Creating a dataset from surveys.csv and incidents.csv files and create pipelines using AIOps studio functionality\
2\. Get the data from each dataset which includes some of the columns, **clone** the column X to column Y\
3\. Execute the pipeline.

### **Example 1a: Column names from surveys.csv file:**

* record\_id
* plot\_id
* length
* date etc

Step 1:  \
Create and add the following pipeline code/commands into the pipeline text field.

You can copy the below code into your pipeline and execute that in your AIOps environment.\
\&#xNAN;*`##### This pipeline loads surveys.csv file into AIOps studio stores the data loaded from ##### surveys.csv file into local dataset named 'cfxdm-map-clone-column'. Once`* \
*`##### the data is saved in 'cfxdm-map-clone-column' dataset, RDA functionality`* \
*`##### '@dm:map' is used to clone columns/names from the complete dataset that`* \
*`##### was read from csv file and rename those with user defined names as follows.`*\
\
*`@files:loadfile filename = "surveys.csv"`*\
*`--> @dm:save name = 'cfxdm-map-clone-column'`*\
*`--> @dm:map from = 'record_id' & to = 'Survey_record_id'`*\
*`--> @dm:map from = 'sex' & to = 'Gender'`*

Step 2: \
Verify the above pipeline code using the 'Verify' button and execute the pipeline (as shown below)

![Verify the pipeline code ](/files/-M_xEZ6CncuN2B-I_Ygt)

![Execute the pipeline](/files/-M_xF1KQks5gCiENP9aP)

Step 3:\
Once execution is completed, verify that the 'dm: map' cloned a column as expected (as shown below).

![After pipeline execution, dm: map columns are cloned to 'Gender', 'Survey\_record\_id'](/files/-M_xGAXk129uE_oIDHbT)
