Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.21 KB

project-rename-operator.md

File metadata and controls

44 lines (31 loc) · 1.21 KB
title description ms.reviewer ms.topic ms.date
project-rename operator
Learn how to use the project-rename operator to rename columns in the output table.
alexans
reference
01/16/2023

project-rename operator

Renames columns in the output table.

Syntax

T | project-rename NewColumnName = ExistingColumnName [, ...]

[!INCLUDE syntax-conventions-note]

Parameters

Name Type Required Description
T string ✔️ The input tabular data.
NewColumnName string ✔️ The new column name.
ExistingColumnName string ✔️ The name of the existing column to rename.

Returns

A table that has the columns in the same order as in an existing table, with columns renamed.

Examples

[!div class="nextstepaction"] Run the query

print a='a', b='b', c='c'
|  project-rename new_b=b, new_a=a

Output

new_a new_b c
a b c