当前位置:网站首页>DolphinScheduler使用系统时间
DolphinScheduler使用系统时间
2022-06-28 09:21:00 【编程爱好者熊浪】
1、DolphinScheduler 自定义参数(大括号和中括号):
(一)、用户自定义参数:${
参数名称}
(二)、用户自定义时间参数:$[yyyyMMddHHmmss],可以是任意组合$[yyyy-MM-dd HH:mm:ss]
(三)、系统时间参数(补数据的时候需要使用):
2、用法(年月日和时分秒可以分开加减,之后拼接):
(一)、add_months()加减月份,加减12月就是年份,格式可以说yyyyMMdd,yyyyMM,yyyy
后 N 年:$[add_months(yyyyMMdd,12*N)]
如:$[add_months(20220624,12*2)] 结果:20240624
前 N 年:$[add_months(yyyyMMdd,-12*N)]
如:$[add_months(20220624,-12*2)] 结果:20200624
后 N 月:$[add_months(yyyyMMdd,N)]
如:$[add_months(20220624,2)] 结果:20220824
前 N 月:$[add_months(yyyyMMdd,-N)]
如:$[add_months(20220624,-2)] 结果:20200424
(二)、直接±指的是加减天数,加减7天就是一周,格式可以说yyyyMMdd,yyyyMM,yyyy
后 N 周:$[yyyyMMdd+7*N]
如:$[20220624+7*2] 结果:20220708
前 N 周:$[yyyyMMdd-7*N]
如:$[20220624-7*2] 结果:20220610
后 N 天:$[yyyyMMdd+N]
如:$[20220624+2] 结果:20220626
前 N 天:$[yyyyMMdd-N]
如:$[20220624-2] 结果:20220622
(三)、时分秒±是加减也是天,天除以24小时,前面的就算小时,再除以60表示分钟
后 N 小时:$[HHmmss+N/24]
如:$[14:34:30+2/24] 结果:16:34:30
前 N 小时:$[HHmmss-N/24]
如:$[14:34:30-2/24] 结果:12:34:30
后 N 分钟:$[HHmmss+N/24/60]
如:$[14:34:30+2/24/60] 结果:14:36:30
前 N 分钟:$[HHmmss-N/24/60]
如:$[14:34:30-2/24/60] 结果:14:32:30
(四)、即使格式只是yyyy,yyyyMM,±也是天数的加减,yyyy,yyyyMM只是输出格式时分秒类似
前N天的年月:$[yyyyMM-N]
如:$[202206-1] 结果:202206
当前系统时间20220624,结果为20220623,小心跨月,年,如20220701,结果就是202206
前N分钟时分:$[HHmm-N/24/60]
如:$[14:34-2/24/60] 结果:14:32
(五)、补数据使用的参数
${
system.biz.date} : 日常调度实例定时的定时时间前一天,格式为 yyyyMMdd,补数据时,该日期 +1
${
system.biz.curdate} : 日常调度实例定时的定时时间,格式为 yyyyMMdd,补数据时,该日期 +1
${
system.datetime} : 日常调度实例定时的定时时间,格式为 yyyyMMddHHmmss,补数据时,该日期 +1
这样写,定时任务处理的就是昨天的数据,补数据的时候,如果选择补数据的时间是20220624,${system.biz.date}这个值就是20220624,正常调度,这个值就会是20220623



边栏推荐
- Is it safe for Huatai Securities to open an account online? What is the handling process
- 买卖股票费用计算
- Static page of pinyougou mall
- [share OpenGL tutorial]
- P2394 yyy loves Chemistry I
- Redis5.0 slot migration, free play (single machine migration cluster)
- Which securities company is better and safer to choose when opening an account for the inter-bank certificate of deposit fund with mobile phone
- JVM系列(2)——垃圾回收
- 1181: integer parity sort
- The concept of "tree structure" perfectly interprets the primary and secondary of things
猜你喜欢

SQL optimization experience: from 30248 seconds to 0.001 seconds

Decision table method for basic content learning of software testing (2)

The digital human industry is about to break out. What is the market pattern?

JMeter -- interface test 2

P2394 yyy loves Chemistry I

Apache Doris 成为 Apache 顶级项目

STL -- binder

rman備份報ORA-19809 ORA-19804

从知识到智慧:知识图谱还要走多远?

1182:合影效果
随机推荐
Valentine's Day - VBS learning (sentences, love words)
静态代码块永远先执行? 格局小了!!!
APICloud携手三六零天御,助力企业守好App安全“第一关”
Decision table method for basic content learning of software testing (2)
How do I open an account on my mobile phone? Is it safe to open an account online now?
The digital human industry is about to break out. What is the market pattern?
Summary of PMP learning experience
1180:分数线划定/P1068 [NOIP2009 普及组] 分数线划定
1180: fractional line delimitation /p1068 [noip2009 popularization group] fractional line delimitation
Assertions used in the interface automation platform
玩玩sftp上传文件
State machine program framework
全局异常处理器与统一返回结果
1. Kimball dimension modeling of data warehouse: what is a fact table?
rman备份报ORA-19809 ORA-19804
01 distributed system overview
Fastjason filter field
Android studio interview preparation
Scenario method and error recommendation method for learning basic content of software testing (2)
Edit the live broadcast source code with me. How to write the live broadcast app code