# rename

## Overview

The `rename` statement is used to change the name of an existing column in a DSET, or to change the source and/or alias of a DSET

## Syntax

**`rename column`***`OldName`***`to`***`NewName`*

**`rename dset`***`OldSource.OldAlias`***`to`***`NewSource.NewAlias`*

## Details

### Renaming a column

When renaming a column, *OldName* may be a [fully qualified](/3.4.3/advanced/digging-deeper/dataset-lifecycle.md) column name. If it is not fully qualified then the column *OldName* in the [default](/3.4.3/data-pipelines/transform/language/default.md) DSET will be renamed.

The *NewName* argument must not be fully qualified.

{% hint style="warning" %}
Any dots (`.`) in the new column name will automatically be replaced by underscores (`_`), as a dot is a reserved character used to implement DSET namespaces.
{% endhint %}

### Renaming a DSET

When renaming a DSET, *NewSource.NewAlias* must contain exactly one dot and must not be the name of an existing DSET. The rename takes immediate effect, thus any subsequent reference to the renamed DSET in the transcript task must use its new name.

Any pending [service](/3.4.3/data-pipelines/transform/language/service.md) definitions referencing the renamed DSET will automatically be updated with the new name.

## Examples

Renaming columns:

```
# Rename the column 'UnitCost' in the default DSET to 'Cost'
rename column UnitCost to Cost

# Rename the column 'UnitCost' in the DSET 'custom.prices' to 'CustomCost'
rename column custom.prices.UnitCost to CustomCost
```

Renaming a DSET:

```
# Usage file has yyyyMMdd in filename
import "system/extracted/AzureJuly/${dataDate}.ccr" source AzureJuly

# The resulting DSET will have an ID of 'AzureJuly.yyyyMMdd'
# where yyyyMMdd is the current dataDate

#
# Any additional processing would be done here
#

# Remove the yyyyMMddfrom the DSET ID
rename dset AzureJuly.${dataDate} to Azure.July

# Create 'Azure.July.rdf'
finish
```


---

# 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://olddocs.exivity.io/3.4.3/data-pipelines/transform/language/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.
