You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "github-actions[bot] (via GitHub)" <gi...@apache.org> on 2023/04/26 11:10:33 UTC

[GitHub] [dolphinscheduler] github-actions[bot] commented on issue #14019: [Improvement][Module Name] Improvement the scheduler date parameter

github-actions[bot] commented on issue #14019:
URL: https://github.com/apache/dolphinscheduler/issues/14019#issuecomment-1523239137

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement.
   
   
   ### Description
   
   In the actual business scenario, the parameter transfer faced by the scheduled job task may not be limited to the timing time of the daily scheduling instance timing, but a more complex date calculated based on the system time or timing time. For example:
   - end of month
   - end of ten days
   - beginning of quarter
   - end of quarter
   - The current quarter is the quarter of the year
   - More....
   
   In codes such as Java or Python, these parameters are easy to obtain, but when executing SQL, calculating such parameters requires nesting several layers of functions to obtain them, which is inefficient, difficult to maintain, and poor in readability.
   
   I hope that more abundant global parameters or SQL Task Plugin task-level parameters can be built into DS, so as to support more complex business scenarios without relying on external tools.
   
   My idea is to design a set of parameter syntax for DS, which includes the following parts:
   1. Identification header [required]: determine whether to replace the variable
   2. Date span [required]: It can be used when calculating the start time and end time of the span based on the scheduled timing time, such as the beginning of the month, the end of the month, the end of the year, etc.
   3. Parameter format flag [required]: format the output date according to the flag, such as 20230426, 2023-01-01, etc.
   4. Step size [optional]
   5. Unit [optional]
   6. Identifier [optional]: increase or decrease. The combination of step size, unit and identifier can perform a simple date addition and subtraction. For example, I want to calculate the first month of the date 10 days ago.
   7. Span time period: the start date or end date of the date span where the scheduled timing time is located
   
   The function mentioned above, I have used python to implement it before, as a plug-in for HiveSQL to perform preprocessing, supporting more than 90% of the date parameter usage scenarios in the data warehouse business logic of a financial company
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org