apache / dolphinscheduler

Apache DolphinScheduler is the modern data orchestration platform. Agile to create high performance workflow with low-code
https://dolphinscheduler.apache.org/
Apache License 2.0
12.73k stars 4.58k forks source link

[Feature][param] The built-in parameters cannot express the beginning date of the month for n-1 days #16510

Open 12frame opened 1 month ago

12frame commented 1 month ago

Search before asking

Description

example: Today is August 26, 2024 Yesterday: $[yyyy-MM-dd-1] = 2024-08-25 At the beginning of the month: ??? = 2024-08-25 --> 2024-08-01 Unable to obtain the beginning date of the month based on $[yyyy-MM-dd-1]

Use case

I hope to express it through built-in parameters and pass the parameters through another task

Related issues

No response

Are you willing to submit a PR?

Code of Conduct

charan2628 commented 1 month ago

@12frame did you tried this $[month_begin(yyyy-MM-dd, -1)]

12frame commented 1 month ago

Sorry, there may be a problem with my expression. You first convert it to the beginning of the month, then subtract one day What I want is to subtract one day now and convert it to the beginning of the month This way I can count the data for July on August 1st. August 2nd Statistics for August

charan2628 commented 1 month ago

@SbloodyS for this month_begin function first param has to accept expression of this format yyyyMMdd-N, so finally it will look like this $[month_begin(yyyMMdd-1, 0)] and it will also accept old format with $[month_begin(yyyy-MM-dd, -1)]?