cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Unable to convert event.start from fetch bizevents into timestamp using timestampFromUnixNanos

AlanFoley
Helper

Hi All

I have this DQL which produces the desired output:

fetch bizevents
| filter event.type == "cost.list.spend"
| lookup [fetch dt.entity.host | fieldsAdd entity.name,osArchitecture,osType],sourceField:dt.entity.host,lookupField:id,prefix:"host."
| fieldsAdd event.start_timestamp = timestampFromUnixNanos(event.start)

However I am unable to convert event.start into a timstamp using timestampFromUnixNanos

As per the documentation here: Business Analytics — Dynatrace Docs 

event.start string  stable The event start timestamp in UTC (given in Grail preferred Linux timestamp nano precision format).

The value in my DQL output for event.start in this case is  1740622469442 so there is a value there (translates as 27 February 2025 15:20:45 )

Am I using the correct function? Any suggestions appreciated
Thanks
Alan
2 REPLIES 2

mark_bley
Dynatrace Champion
Dynatrace Champion

It's a string (green) 

| fieldsAdd timestampFromUnixMillis(toLong(event.start))

mark_bley_0-1740696166287.png

 

Thanks Mark

You are correct in both instances - it needs to be converted from a string and i need to use timestampFromUnixMillis instead

Appreciate your time

Regards

Alan

Featured Posts