You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by "dufeng1010 (via GitHub)" <gi...@apache.org> on 2023/10/19 06:34:46 UTC
[I] [Bug] [API] sql default separator is ;\n , but save sql content to ds database, it display ;\r\n [dolphinscheduler]
dufeng1010 opened a new issue, #15048:
URL: https://github.com/apache/dolphinscheduler/issues/15048
### 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
I create sql task in 3.2.0 version. write two sql command in one sql task. use ;\n to separate it. but it execute fail.
i view database in ds. it save ;\r\n, not ;\n. cause not correctly separate it.
我安装了一个3.2.0版本的dolphinscheduler,创建了一个Sql任务,任务里面编写了两个SQL,然后执行执行失败。
### What you expected to happen
because ;\n is default sql separator, write more sql command in one sql task, it should separate it correctly.
因为3.2.0版本的dophinscheduler中sql任务的默认分隔符是;\n,正常来说应该能够正常执行。
### How to reproduce
1. create a sql task.
2. write two sql command in created sql task. for example
```
select current_date();
select current_date()
```
3. execute online
4. start execute
1. 创建一个Sql任务
2. 在创建的Sql任务里面添加两个sql命令,例如
```
select current_date();
select current_date();
```
3. 上线工作流
4. 执行工作流
### Anything else
跟踪代码发现,存储到数据库中的sql分隔符是;\r\n,导致代码无法正常分割多个SQL,最终sql任务执行失败。
### Version
3.2.x
### 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: commits-unsubscribe@dolphinscheduler.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [API] sql default separator is ;\n , but save sql content to ds database, it display ;\r\n [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on issue #15048:
URL: https://github.com/apache/dolphinscheduler/issues/15048#issuecomment-1776500065
> > This might caused by the browser environment? Are you use windows? `\r\n` is used in windows.
>
> yes, i use brower in windows. @ruanwenjun
I submit https://github.com/apache/dolphinscheduler/pull/15062 to fix this.
--
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
Re: [I] [Bug] [API] sql default separator is ;\n , but save sql content to ds database, it display ;\r\n [dolphinscheduler]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #15048:
URL: https://github.com/apache/dolphinscheduler/issues/15048#issuecomment-1770152021
### 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
I create sql task in 3.2.0 version. write two sql command in one sql task. use ;\n to separate it. but it execute fail.
i view database in ds. it save ;\r\n, not ;\n. cause not correctly separate it.
I installed a 3.2.0 version of dolphinscheduler, created a Sql task, and wrote two SQLs in the task, and then the execution failed.
### What you expected to happen
because ;\n is default sql separator, write more sql command in one sql task, it should separate it correctly.
Because the default separator for sql tasks in version 3.2.0 dophinscheduler is;\n, normally it should be able to execute normally.
### How to reproduce
1. create a sql task.
2. write two sql command in created sql task. for example
```
select current_date();
select current_date()
```
3. execute online
4. start execute
1. Create a Sql task
2. Add two sql commands to the created Sql task, for example
```
select current_date();
select current_date();
```
3. Online workflow
4. Execute workflow
### Anything else
Tracking the code, it was found that the sql delimiter stored in the database was;\r\n, which caused the code to be unable to split multiple SQLs normally, and ultimately the sql task failed to execute.
### Version
3.2.x
### 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: commits-unsubscribe@dolphinscheduler.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Bug] [API] sql default separator is ;\n , but save sql content to ds database, it display ;\r\n [dolphinscheduler]
Posted by "dufeng1010 (via GitHub)" <gi...@apache.org>.
dufeng1010 commented on issue #15048:
URL: https://github.com/apache/dolphinscheduler/issues/15048#issuecomment-1776293670
> This might caused by the browser environment? Are you use windows? `\r\n` is used in windows.
yes, i use brower in windows. @ruanwenjun
--
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
Re: [I] [Bug] [API] sql default separator is ;\n , but save sql content to ds database, it display ;\r\n [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on issue #15048:
URL: https://github.com/apache/dolphinscheduler/issues/15048#issuecomment-1774388657
This might caused by the browser environment? `\r\n` is used in windows.
--
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
Re: [I] [Bug] [API] sql default separator is ;\n , but save sql content to ds database, it display ;\r\n [dolphinscheduler]
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun closed issue #15048: [Bug] [API] sql default separator is ;\n , but save sql content to ds database, it display ;\r\n
URL: https://github.com/apache/dolphinscheduler/issues/15048
--
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