Data Mapping cfxdm - dm:save
Save input data into a named dataset
Last updated
Save input data into a named dataset
Last updated
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 syntax: 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. Note: It can be used only with cfxDimensions platform configuration.
This extension tag is typically used along with dm: recall
To list the named datasets, use dm: savedlist
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.
Download the incidents.csv file to the local machine as shown below using a standard web browser.
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.
Step 2: Upload the file 'incidents.csv' to AIOps studio using file-browser (as shown below)
Step 3: 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).
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.
##### 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 *
Step 5: Check the data from incidents.csv by executing the pipeline and verifying using inspect data as shown below (screenshot -1 & screenshot-2)
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
##### 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
Step 6: Click execute button and execute the pipeline. RDA will execute the pipeline without any errors (as shown below)
Step 7: Verify that the incidents-summary dataset is part of the dm:savedlist call as shown in the below screenshot.