You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/11/09 08:49:26 UTC

[GitHub] [dolphinscheduler] lenian commented on pull request #12841: [fix-12837] resolve SqlTask parses global variables having single quotes

lenian commented on PR #12841:
URL: https://github.com/apache/dolphinscheduler/pull/12841#issuecomment-1308415100

   test case: 
   global variable:current_time : ${system.datetime}
   SqlTask definition:ALTER TABLE cdc_test.lab_report RENAME cdc_test.lab_report_archive_${current_time};
   SqlTask parse result:ALTER TABLE cdc_test.lab_report RENAME cdc_test.lab_report_archive_20221109155439;
   
   Process_instance  run result log:
   [INFO] 2022-11-09 16:30:56.578 +0800 - Begin to pulling task
   [INFO] 2022-11-09 16:30:56.582 +0800 - Begin to initialize task
   [INFO] 2022-11-09 16:30:56.583 +0800 - Set task startTime: 1667982656582
   [INFO] 2022-11-09 16:30:56.588 +0800 - Set task envFile: /etc/profile
   [INFO] 2022-11-09 16:30:56.589 +0800 - Set task appId: 5_8
   [INFO] 2022-11-09 16:30:56.589 +0800 - End initialize task
   [INFO] 2022-11-09 16:30:56.608 +0800 - Set task status to TaskExecutionStatus{code=1, desc='running'}
   [INFO] 2022-11-09 16:30:59.577 +0800 - TenantCode:lenian check success
   [INFO] 2022-11-09 16:30:59.582 +0800 - ProcessExecDir:/tmp/dolphinscheduler/exec/process/lenian/7486873665920/7494408333056_1/5/8 check success
   [INFO] 2022-11-09 16:30:59.582 +0800 - Resources:{} check success
   [INFO] 2022-11-09 16:30:59.596 +0800 - Task plugin: SQL create success
   [INFO] 2022-11-09 16:30:59.596 +0800 - Success initialized task plugin instance success
   [INFO] 2022-11-09 16:30:59.597 +0800 - Success set taskVarPool: null
   [INFO] 2022-11-09 16:30:59.598 +0800 - Full sql parameters: SqlParameters{type='MYSQL', datasource=3, sql='ALTER TABLE cdc_test.lab_report RENAME cdc_test.lab_report_archive_${current_time};', sqlType=1, sendEmail=null, displayRows=10, limit=0, udfs='null', showType='null', connParams='null', groupId='0', title='null', preStatements=[], postStatements=[]}
   [INFO] 2022-11-09 16:30:59.598 +0800 - sql type : MYSQL, datasource : 3, sql : ALTER TABLE cdc_test.lab_report RENAME cdc_test.lab_report_archive_${current_time}; , localParams : [],udfs : null,showType : null,connParams : null,varPool : [] ,query max result limit  0
   [INFO] 2022-11-09 16:30:59.642 +0800 - after replace sql , preparing : ALTER TABLE cdc_test.lab_report RENAME cdc_test.lab_report_archive_20221109163056;
   [INFO] 2022-11-09 16:30:59.642 +0800 - Sql Params are replaced sql , parameters:
   [INFO] 2022-11-09 16:30:59.646 +0800 - can't find udf function resource
   [INFO] 2022-11-09 16:30:59.773 +0800 - prepare statement replace sql : ALTER TABLE cdc_test.lab_report RENAME cdc_test.lab_report_archive_20221109163056;, sql parameters : {}
   [INFO] 2022-11-09 16:30:59.783 +0800 - main statement execute update result: 0, for sql: ALTER TABLE cdc_test.lab_report RENAME cdc_test.lab_report_archive_20221109163056;
   [INFO] 2022-11-09 16:30:59.785 +0800 - Send task execute result to master, the current task status: TaskExecutionStatus{code=7, desc='success'}
   [INFO] 2022-11-09 16:30:59.785 +0800 - Remove the current task execute context from worker cache
   [INFO] 2022-11-09 16:30:59.785 +0800 - The current execute mode isn't develop mode, will clear the task execute file: /tmp/dolphinscheduler/exec/process/lenian/7486873665920/7494408333056_1/5/8
   [INFO] 2022-11-09 16:30:59.788 +0800 - Success clear the task execute file: /tmp/dolphinscheduler/exec/process/lenian/7486873665920/7494408333056_1/5/8
   
   


-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org