Data mapping - cfxdm - dm:map
This tag allows the user to manipulate or transform the columns and its values.
Last updated
This tag allows the user to manipulate or transform the columns and its values.
Last updated
dm:map: This tag allows the user to manipulate or transform the columns and their values.
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:
dm:map from = 'COLUMN_X' & to = 'COLUMN_Y'
OR
dm:map attr = 'COLUMN_Y' & func = "<function-name>" & <argument syntax>
Following two data CSV files are used to explain dm: map functionality
Step 1:
Download the "surveys.csv" file to the local machine as shown below using a standard web browser. Download the incidents.csv file to the local machine as shown below using a standard web browser.
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)
Launch AIOps studio using the RDA provided text field to start AIOps studio.
Select the files and upload them into the studio environment (as shown below).
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.
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.
##### 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)
Step 3: Once execution is completed, verify that the 'dm: map' cloned a column as expected (as shown below).