# Step: Rename

## Overview

The **Rename** step changes the name of an existing variable.

#### Example starting data:

```
/*---------+--------*
 | student | score  |
 +---------+--------+
 | jane    | 83     |
 | neal    | 35     |
 | sam     | 74     |
 | pat     | 62     |
 *---------+--------*/
```

#### Example output data:

Rename `score` to `final_score`

```
/*---------+--------------*
 | student | final_score  |
 +---------+--------------+
 | jane    | 83           |
 | neal    | 35           |
 | sam     | 74           |
 | pat     | 62           |
 *---------+--------------*/
```

## Step structure

<figure><img src="/files/MxEM4bjXqiLuvD8srRsJ" alt=""><figcaption></figcaption></figure>

* There will be at least one rename block where you will define a variable and a new name.

## Input field definitions

<table><thead><tr><th width="228">Field</th><th>Definition</th></tr></thead><tbody><tr><td><strong>Source variable</strong></td><td>The variable that you want to rename.</td></tr><tr><td><strong>New name</strong></td><td>The name that your selected <code>source variable</code> will be given.<br><br>Note that this input needs to follow Redivis variable <a href="/pages/-LWB1uR_T2-TGoCmPoAN#characteristics">naming constraints</a>.</td></tr></tbody></table>

## Example

We can change the name of a variable to give more meaning to the data.

#### Starting data:

```
/*---------+-------+---------+------------*
 | test    | score | student | date       |
 +---------+-------+---------+------------+
 | quiz    | 83    | jane    | 2020-04-01 |
 | quiz    | 35    | pat     | 2020-04-01 |
 | quiz    | 89    | sam     | 2020-04-01 |
 | midterm | 74    | jane    | 2020-05-01 |
 | midterm | 62    | pat     | 2020-05-01 |
 | midterm | 100   | sam     | 2020-05-01 |
 | final   | 77    | jane    | 2020-06-01 |
 | final   | 59    | pat     | 2020-06-01 |
 | final   | 100   | sam     | 2020-06-01 |
 *---------+-------+---------+------------*/
```

#### Input fields:

<figure><img src="/files/FThQJ7L5LA4YOX7Mphsa" alt=""><figcaption></figcaption></figure>

* **Source variable:** The variable we want to rename is `date` so we select that here.
* **New name:** `date_taken` would be a better name for this variable, so we enter it here.

#### Output data:

```
/*---------+-------+---------+------------*
 | test    | score | student | date_taken |
 +---------+-------+---------+------------+
 | quiz    | 83    | jane    | 2020-04-01 |
 | quiz    | 35    | pat     | 2020-04-01 |
 | quiz    | 89    | sam     | 2020-04-01 |
 | midterm | 74    | jane    | 2020-05-01 |
 | midterm | 62    | pat     | 2020-05-01 |
 | midterm | 100   | sam     | 2020-05-01 |
 | final   | 77    | jane    | 2020-06-01 |
 | final   | 59    | pat     | 2020-06-01 |
 | final   | 100   | sam     | 2020-06-01 |
 *---------+-------+---------+------------*/
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.redivis.com/reference/workflows/transforms/step-rename.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
