izualzhy opened a new issue, #12054:
URL: https://github.com/apache/dolphinscheduler/issues/12054

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   1. create SQL task
   2. type in `select '$[yyyyMMdd]', '$[yyyyMMdd-1]', '$[HH]', '$[HHmmss]'` as 
SQL statement
   3. start the workflow
   4. 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'
   ```
   
   
![image](https://user-images.githubusercontent.com/2315481/191153078-4e13f763-2030-45e8-97ec-cb28ad90bba3.png)
   
   
   ### 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](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: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to