Search…
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 columnOldNametoNewName
rename dsetOldSource.OldAliastoNewSource.NewAlias

Details

Renaming a column

When renaming a column, OldName may be a fully qualified column name. If it is not fully qualified then the column OldName in the default DSET will be renamed.
The NewName argument must not be fully qualified.
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.

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 definitions referencing the renamed DSET will automatically be updated with the new name.

Examples

Renaming columns:
1
# Rename the column 'UnitCost' in the default DSET to 'Cost'
2
rename column UnitCost to Cost
3
4
# Rename the column 'UnitCost' in the DSET 'custom.prices' to 'CustomCost'
5
rename column custom.prices.UnitCost to CustomCost
Copied!
Renaming a DSET:
1
# Usage file has yyyyMMdd in filename
2
import "system/extracted/AzureJuly/${dataDate}.ccr" source AzureJuly
3
4
# The resulting DSET will have an ID of 'AzureJuly.yyyyMMdd'
5
# where yyyyMMdd is the current dataDate
6
7
#
8
# Any additional processing would be done here
9
#
10
11
# Remove the yyyyMMddfrom the DSET ID
12
rename dset AzureJuly.${dataDate} to Azure.July
13
14
# Create 'Azure.July.rdf'
15
finish
Copied!
Last modified 2yr ago