ZaneYork commented on issue #17124: URL: https://github.com/apache/dolphinscheduler/issues/17124#issuecomment-3560946809
看了下SQL节点的处理代码,推测出有这两处模板预替换逻辑: [内置日期变量](https://github.com/apache/dolphinscheduler/blob/83ac81c59fb82dd31a5935c272122a9a1b327dbe/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java#L419C18-L419C19) [局部变量预替换](https://github.com/apache/dolphinscheduler/blob/83ac81c59fb82dd31a5935c272122a9a1b327dbe/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java#L439) 不难得知,使用$[YYYYmmdd]可以直接实现功能,如果需要进行变量加工传递,使用!{dt}进行参数传递可以实现高级替换功能。经过验证,两种都能正确产生最终的sql。 但是还是得diss一下sql节点的说明文档(或者参数传递那边的文档),通篇没看到有提这个感叹号替换的参数模式,也没提日期替换这种替换模式的特殊性 -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
