Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JDBC 数据源添加 SqlServer 时连接报错 #170

Closed
ZhengshuaiPENG opened this issue Jul 11, 2022 · 2 comments
Closed

JDBC 数据源添加 SqlServer 时连接报错 #170

ZhengshuaiPENG opened this issue Jul 11, 2022 · 2 comments
Assignees
Labels
bug Something isn't working byzer-notebook 1.2.3

Comments

@ZhengshuaiPENG
Copy link
Contributor

ZhengshuaiPENG commented Jul 11, 2022

Reproduce Step

  1. 在 Byzer Notebook 中的设置中添加 sqlserver(或其他非 mysql 的db)数据源

  2. 填入参数,参数可参考如下

CONNECT jdbc where
url="${JDBC_URL}"
and driver = "com.microsoft.sqlserver.jdbc.SQLServerDriver"
and databaseName = "${DB_NAME}"
and user= "${USER_NAME}"
and password = "${PASSWORD}"
and encrpty="true"
and trustServerCertificate="true"
as mssql_db_poc;
  1. 检测连接时就一直报错

原因分析

Byzer Notebook 的添加数据源的功能中是依靠引擎的 SQLJDBC ET 来实现的,该 ET 实现的过于简单,只传递了部分参数,对于其他的参数都没有办法传递,导致通过 SQLJDBC ET 实现的功能都没有办法支持非 mysql 的数据库 (比如 load jdbc 语句中的 direct query)

预期

  • 功能表现预期:Notebook 配置 sqlserver 功能连接正常

  • SQLJDBC ET 可以动态处理传入的参数,来支持不同的 jdbc 完成 direct query 的功能实现

注意, 此issue需要更改 Byzer 引擎中 SQLJDBC 的实现

@ZhengshuaiPENG ZhengshuaiPENG changed the title Byzer Byzer Notebook 执行 JDBC ET 语句时不符合预期 Jul 11, 2022
@ZhengshuaiPENG
Copy link
Contributor Author

关联的 byzer-lang issue:byzer-org/byzer-lang#1816

@wangcheng15
Copy link
Contributor

Test:

  • 以图示参数测试链接并保存
    image
    image
  • 在 notebook 中使用保存的连接获取数据
    image

Result:

  • SQLserver 连接正常
    image
  • 获取的数据正确
    image

测试通过

@ZhengshuaiPENG ZhengshuaiPENG added the bug Something isn't working label Sep 5, 2022
@ZhengshuaiPENG ZhengshuaiPENG changed the title Byzer Notebook 执行 JDBC ET 语句时不符合预期 JDBC 数据源添加 SqlServer 时连接报错 Sep 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working byzer-notebook 1.2.3
Projects
None yet
Development

No branches or pull requests

2 participants