# Highest

**Highest**\
Returns highest non-null value from the list of integer values. \
@param default (optional), Type int. \
If provided none of the input values are non-null, returns default. \
Input must be a number or list of numbers.&#x20;

This function is helpful when a user wants to get the highest value from a dataset (or set of column values).

### Example 1:&#x20;

Step 1: Create an empty **highest\_example\_1** using AIOps studio as shown in the below screenshot.

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MdZXbxRj0cQTOoZ-bVX%2F-MdZY5IsDgU8gdqstzNv%2FScreen%20Shot%202021-07-01%20at%205.08.55%20PM.png?alt=media\&token=247802d8-57e9-4554-bb70-ac52d176ebf7)

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 list of rows with various numbers (int values) for various`* \
*`##### ids using AIOps studio.`*\
\
*`##### RDA function highest is used to demo this example. In this pipeline, each row added`*\
*`##### has three columns with various numerical values. Pipeline uses RDA dm function`* \
*`##### highest to pick the highest value from set of values and prints that highest value`*\
*`##### for each row/id.`* \
\
*`@dm:empty`* \
*`--> @dm:addrow id = 'a1' & x = 10 & y = 3 & z = 9`*\
*`--> @dm:addrow id = 'a2' & x = 1 & y = 13 & z = 4`*\
*`--> @dm:addrow id = 'a3' & x = 7 & y = 3  & z = 3`*\
*`--> @dm:addrow id = 'a4' & x = 4 & y = -1 & z = 9`*\
*`--> @dm:map to = "MAX_VALUE" & from = "x,y,z" & func = 'highest'`*

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MdZY8-7W5fnEQ8m51O9%2F-MdZYIDdkn9mCyPx6Zn_%2FScreen%20Shot%202021-07-01%20at%205.10.08%20PM.png?alt=media\&token=aace130b-6a57-4686-ad2e-38fb496a747b)

Step 3: Click verify button to make sure syntax and pipeline code is correct (as shown below)

![Pipeline code is validated by selecting verify button](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MdZYbI4AFPQsb2MEmSI%2F-MdZZTg-pEJtbtB1-P12%2FScreen%20Shot%202021-07-01%20at%205.15.14%20PM.png?alt=media\&token=746fb152-4be4-4880-be2a-36379dcab088)

Step 4:  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-MdZf6gPXDdB3KJQ_Q3e%2F-MdZfKGKxyPYkdlgsdxO%2Fimage.png?alt=media\&token=37f562ec-6beb-49e9-90cb-7e96e874f59a)

Step 5: RDA uses the dm function 'highest' to select the 'highest' numerical number (or value) from the dataset and map that to variable "MAX\_VALUE" and prints the output for each dataset (or row) as shown in the following screenshot.

![](https://2978683539-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LhoMVYxiQlKXh6OxX98%2F-MdZfO4RwyPuwkyTxFYc%2F-MdZflcDiytcXfa9BPCh%2FScreen%20Shot%202021-07-01%20at%205.47.08%20PM.png?alt=media\&token=4de92054-4338-46bf-97ee-73c32fde6fa7)
