[Bug] [dolphinscheduler-task-plugin] Built-in parameters replaced failed in sql task
Search before asking
- [X] I had searched in the issues and found no similar issues.
What happened
- create SQL task
- type in
select '$[yyyyMMdd]', '$[yyyyMMdd-1]', '$[HH]', '$[HHmmss]'as SQL statement - start the workflow
- as the task log just print literal self, not the replaced built-in parameters. logs example:
[INFO] 2022-09-20 10:11:16.293 +0800 [taskAppId=TASK-20220920-6932014227904_5-67-133] TaskLogLogger-class ... - [WorkflowInstance-67][TaskInstance-133] - display sql result 1 rows as follows:
[INFO] 2022-09-20 10:11:16.293 +0800 [taskAppId=TASK-20220920-6932014227904_5-67-133] TaskLogLogger-class ... - [WorkflowInstance-67][TaskInstance-133] - row 1 : {"_col0":"$[yyyyMMdd]","_col1":"$[yyyyMMdd-1]","_col2":"$[HH]","_col3":"$[HHmmss]"}
What you expected to happen
SqlTask's behavior should be consistent with ShellTask.
As in ShellTask, script like echo '$[yyyyMMdd]', '$[yyyyMMdd-1]', '$[HH]', '$[HHmmss]' print the replaced parameters. logs example:
[INFO] 2022-09-20 10:11:13.816 +0800 [taskAppId=TASK-20220920-6932014227904_5-67-132] TaskLogLogger-class org.apache.dolphinscheduler.plugin.task.shell.ShellTask:[139] - [WorkflowInstance-67][TaskInstance-132] - raw script : echo '20220920', '20220919', '10', '101113'

How to reproduce
follow the steps in "What happened"
Anything else
No response
Version
3.0.0
Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
Code of Conduct
- [X] I agree to follow this project's Code of Conduct
Thank you for your feedback, we have received your issue, Please wait patiently for a reply.
- In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
- If you haven't received a reply for a long time, you can join our slack and send your question to channel
#troubleshooting
This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.
This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.