DQL/DPL question/puzzle

Hello,

Last day of the year question/puzzle…

When showing tags from a host, an array is retuned.

I want to extract the contents of a specific tag.

So my thought was to convert the array to a string, and use DPL to extract the value.

Am I on the correct track, or maybe there are better ways to achieve this?

For later, happy new year!

@henk_stobbe yes, this is one of the solutions. you can also use a combination of expand / parse / filter - for example how get the dt.owner tag value:

fetch dt.entity.host
| fieldsAdd tags
| expand tags
| parse tags, """((LD:tag (!<<'\\' ':') LD:value)|LD:tag)"""
| fieldsAdd dt.owner = if(isNotNull(value), value)
| filter tag=="dt.owner"
| fieldsRemove value, tags, tag

Hi Julius,

Best wishes! And thanks for your great answer,

KR Henk