XQL - Time alteration

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

XQL - Time alteration

Hello,

Here is the scenario:

I have a table lookup looking for a specific event.

dataset = xdr_data

| filter event_type = SOME EVENT   

| alter TimeOfIntereset = _time

Now I want to join this again with the dataset table to enrich it and perform further analysis based on the time.

| join type = inner (

dataset = xdr_data

| filter event_type = SOME EVENT )

At this part when the join happens I only want to look at 30 seconds to 1 minute of events after the time the event of interest occurred.

| filter _time > TimeOfIntereset and  _time < TimeOfIntereset + 30s

The issue is that you cannot just add time to a time field.
Personally I believe that XQL is super rigid.

The scenario is essentially a sequence event where I want to look for events occurring up to a minute after a specific event.

so The question is how can I alter the field to be able to add 30 seconds or 1 minute to it and then use it for the filter.



1 accepted solution

Accepted Solutions

Hello Again,
I was able to find the solution:
| alter EndTime = to_timestamp(add(to_epoch(ClipTime , "SECONDS") , 30))
This is how you do it.


View solution in original post

1 REPLY 1

Hello Again,
I was able to find the solution:
| alter EndTime = to_timestamp(add(to_epoch(ClipTime , "SECONDS") , 30))
This is how you do it.


  • 1 accepted solution
  • 229 Views
  • 1 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!