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

   ### 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
   
   Datax shell cannot run when 'Global Variables' contains space in Workflow 
Definition(I can't access the production environment right now to provide 
detailed exception information and screenshot). eg:
   
   'Global Variables' name: `std.start.time`
   The value of the first type global variable:`$[yyyy-MM-dd HH:00:00]`
   The value of the second type global variable(Added single 
quotes):`'$[yyyy-MM-dd HH:00:00]'`
   
   The first type of DS generated Datax shell scripts:
   `${PYTHON_LAUNCHER} ${DATAX_LAUNCHER} --jvm="-Xms1G -Xmx1G" -p 
"-Dstd.start.time='2023-10-26 14:00:00' 
-DStartParams='{"std.start.time":"2023-10-26 14:00:00"}'`
   The `Dstd.start.time` value has single quotes,and `std.start.time` in 
DStartParams doesn‘t have single quotes. The Datax shell can't run success.
   
   The second type of DS generated Datax shell scripts:
   `${PYTHON_LAUNCHER} ${DATAX_LAUNCHER} --jvm="-Xms1G -Xmx1G" -p 
"-Dstd.start.time=''2023-10-26 14:00:00'' 
-DStartParams='{"std.start.time":"'2023-10-26 14:00:00'"}'`
   The `Dstd.start.time` value has DOUBLE single quotes.Datax shell also 
doesn't work.
   
   
   
   ### What you expected to happen
   
   I found that the `CUSTOM_PARAM` attribute in the 
`org.apache.dolphinscheduler.plugin.task.datax.DataxTask` class adds the single 
quote:
   `public static final String CUSTOM_PARAM = " -D%s='%s'";`
   
   It works fine after this modification (the code is poorly written):
   
![微信截图_20231030165108](https://github.com/apache/dolphinscheduler/assets/3906745/c3d672fd-3278-4f83-87da-cef001190c71)
   
   
   
   ### How to reproduce
   
   Use global variables with spaces value in process definitions that contain 
Datax tasks
   
   ### Anything else
   
   no
   
   ### Version
   
   3.2.x
   
   ### Are you willing to submit 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: [email protected]

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

Reply via email to