-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[PPL-Lang]support earliest/latest
date-time functions
#957
Comments
@YANG-DB wonder do you have more documentations to provide as reference? If I understand this correct, If that is case, should the function also ask for the timestamp column as argument for the computation? (Assume there are multiple timestamp columns appear on the dataset). Also what's the meaning of the |
Hi
|
@YANG-DB To clarify on the reference syntax and usage, will this be similar to the Splunk counterpart? |
Yes in general |
@YANG-DB. I've taken a look through the above. It looks like a first step would be to add support for converting relative time strings to the datetime data type. I believe that this would sufficient, along with the existing comparison operators, to implement the desired functionality. If you also want to better align the syntax with Splunk, we could then add new functions Add Support for Relative Time Add support for automatically converting relative time strings to the datetime data type, and then use the existing comparison operators.
New Functions Add new functions
|
Yes sounds good to me |
[Catch All Triage - 1, 2, 3] @YANG-DB Can you please help make sure this repo is triaged as part of a team triage weekly? Thanks. |
Is your feature request related to a problem?
As a PPL query syntax for easily supporting predefined simple time ranges such as:
earliest week
,latest day
,latest month
,earliest hour
.Supporting for the predefined time units:
s
m
h
d
w
mnt
qrt
yr
What solution would you like?
source = logs | where status > 200 AND (earliest=-24h AND latest<@d)
source = logs | where status > 200 AND (earliest=-5d@w1 AND latest=@w6)
source = logs | where status > 200 AND (earliest='2023-11-15:20:00:00' AND latest='2023-11-22:20:00:00')
The text was updated successfully, but these errors were encountered: