Hello,
Is it possible to rename the result of a DQL query?
I would like to display SQL instead of ‘SP00’ for example
Hello @Etienne1
How is going? I can help you with that ![]()
You can simply add this code snippet to yours:
| fieldsAdd Name = replaceString(entityName(dt.entity.host), "SP00", "SQL")
| fields arrayLast(availability), Name
and should work as you want.
Hello, @Etienne1 !
Yeah, make sense, the fieldsadd creates a new Field (Column), so putting all in the same Field name as “Host”, must work. But I’m not sure what you want, could you share your full example (Change the data of course), and your purpose with this query.
Best regards,
Maximiliano Lopes
Is there a way to rename a field dynamically ? I am creating a comparison dashboard, and need to show the column like column_prod, column_cap. But the environment is a variable and chosen by user. I am not able to rename the column using a variable. Any help is really appreciated.