# Data Mapping cfxdm - dm:save

**dm:save:** This dm function allows the user to save the retrieved data from an extension's tag as a named dataset for later consumption.

**dm: save** synta&#x78;**:** Below arguments are supported.

* **name** (mandatory):  Name (unique) of the dataset to which data needs to be saved.
* **publish** (optional):  Name of the tag to ingest or publish into cfxDimensions platform. \
  \
  \&#xNAN;*Note: It can be used only with cfxDimensions platform configuration.*

{% hint style="info" %}
This extension tag is typically used along with **dm: recall**&#x20;
{% endhint %}

{% hint style="info" %}
To list the named datasets, use **dm: savedlist**
{% endhint %}

This section explains how users can use a CSV file loaded into a dataset. This saved dataset will be used to explain how the dm: head function can be used to check the head of the stored dataset.

{% hint style="info" %}
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. &#x20;
{% endhint %}

### Example 1:

Default dm: save functionality is captured in this example.

Step 1:  Download 'incidents.csv' to the AIOps RDA environment as shown below from the local file system.

![Downloaded file on local filesystem](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MbcP9EIKrFoHAbWI8Z-%2F-MbcPmsKgRqacQ_K6i0b%2FScreen%20Shot%202021-06-07%20at%202.39.56%20PM.png?alt=media\&token=040ff7f2-7727-4d80-97f4-e9b0c623bf8c)

Step &#x32;**:** Upload the file 'incidents.csv' to AIOps studio using file-browser (as shown below)

![Screenshot displays how to upload a file into AIOps Studio.](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MbcQ0K667BQu4t52Hiq%2F-MbcQiEiFxhuzCwcyT76%2FScreen%20Shot%202021-06-07%20at%202.44.05%20PM.png?alt=media\&token=19f361ae-a091-4756-9b99-2b6024429717)

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MbcQwOj1mPfKDMzZ4dU%2F-MbcRNIUtmLyJ08hPjZu%2FScreen%20Shot%202021-06-07%20at%202.46.54%20PM.png?alt=media\&token=d7d4743c-eb78-471a-9f76-35dfa4cce90e)

Step &#x33;**:** Add a new empty pipeline with the name "**dm\_save\_example\_1**" as shown below and click the "Save" button (this step will create an empty pipeline and saves it to AIOps studio).

![Empty pipeline ](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mf4B8bWRyY44zSOzVaL%2F-Mf4BUweXR8zq3VT6jIm%2FScreen%20Shot%202021-07-20%20at%2011.33.42%20AM.png?alt=media\&token=aee891ae-9c4f-4525-b454-39aa57e1596a)

Step 4: Add the following pipeline commands into the empty pipeline text field that you have created in above Step 3.

You can copy the below code into your pipeline and execute that in your environment.\
\&#xNAN;*`##### This pipeline loads incidents.csv file into AIOps Studio.`*                          \
*`##### AIOps studio stores the data loaded from incidents.csv file`*\
*`##### into local dataset named 'incident-summary'.`*\
*`##### prints the data that was stored`*\
*`@files:loadfile filename = "incidents.csv"`*\
*`--> @dm:save name = 'incidents-summary'`*\
*`--> *dm:filter *`*&#x20;

Step 5:  Check the data from incidents.csv by executing the pipeline and verifying using inspect data as shown below (screenshot -1 & screenshot-2)

![screenshot -1](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MegKJRnjWjL5GqvFq3m%2F-MegL9NYruL-J6k495qk%2FScreen%20Shot%202021-07-15%20at%203.45.22%20PM.png?alt=media\&token=095a3020-bf56-4981-b860-3131561956fb)

![screenshot -2](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MegLIr1pl1D_adhtUjW%2F-MegLgTFQxCVo-IS1Kqz%2FScreen%20Shot%202021-07-15%20at%203.47.42%20PM.png?alt=media\&token=7262b162-b4ae-4755-96d6-81009b3db834)

Step 5:  Use dm: savedlist to check the logical datasets that were used to store the data using dm: save function as shown in the following screenshot.

You can copy the below code into your pipeline and execute that in your environment to verify that incidents-summary dataset is stored using the pipeline \
\
\&#xNAN;*`##### This pipeline loads incidents.csv file into AIOps Studio.`*                          \
*`##### AIOps studio stores the data loaded from incidents.csv file`*\
*`##### into local dataset named 'incident-summary'.`*\
*`##### prints the data that was stored`*\
*`@files:loadfile filename = "incidents.csv"`*\
*`--> @dm:save name = 'incidents-summary'`*\
\
*`--> @c:new-block`*\
*`--> *dm:savedlist`*<br>

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mf4tJpaZWMqzehuEcaI%2F-Mf4uX1i7ulO37ATYXTt%2FScreen%20Shot%202021-07-20%20at%202.54.30%20PM.png?alt=media\&token=0314f00c-90b0-4ea7-861b-2dc6b9dbfe0a)

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

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mf4uhQR3BJxLzgeUUHs%2F-Mf4v0RByYIfwMj_eP8n%2FScreen%20Shot%202021-07-20%20at%202.56.43%20PM.png?alt=media\&token=b8a46db6-0793-4f7e-aff9-4df2fe533a15)

Step 7: Verify that the incidents-summary dataset is part of the dm:savedlist call as shown in the below screenshot.

!['incident-summary' dataset is part of dm:savedlist  and is as shown above screenshot](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-Mf4uhQR3BJxLzgeUUHs%2F-Mf4v_tehqSTl2taanCz%2FScreen%20Shot%202021-07-20%20at%202.59.25%20PM.png?alt=media\&token=e693ea99-78b4-4b41-9602-9c1a5079339c)
