| 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/20/2025 |
[!INCLUDE applies] [!INCLUDE fabric] [!INCLUDE azure-data-explorer] [!INCLUDE monitor] [!INCLUDE sentinel]
Renames columns in the output table.
T | project-rename NewColumnName = ExistingColumnName [, ...]
[!INCLUDE syntax-conventions-note]
| 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. |
A table that has the columns in the same order as in an existing table, with columns renamed.
If you have a table with columns a, b, and c, and you want to rename a to new_a and b to new_b while keeping the same order, the query would look like this:
:::moniker range="azure-data-explorer"
[!div class="nextstepaction"] Run the query ::: moniker-end
print a='alpha', b='bravo', c='charlie'
| project-rename new_a=a, new_b=b, new_c=cOutput
| new_a | new_b | new_c |
|---|---|---|
| alpha | bravo | charlie |