Merge pull request #5955 from QiQiFang/dev

解决SQL数据集直连DB2时,编写SQL必须要带schema的问题。
This commit is contained in:
taojinlong 2023-08-24 10:19:54 +08:00 committed by GitHub
commit b46f3caa0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,10 +14,11 @@ public class Db2Configuration extends JdbcConfiguration {
public String getJdbc() {
if(StringUtils.isEmpty(extraParams.trim())){
return "jdbc:db2://HOSTNAME:PORT/DATABASE"
return "jdbc:db2://HOSTNAME:PORT/DATABASE:currentSchema=SCHEMA;"
.replace("HOSTNAME", getHost().trim())
.replace("PORT", getPort().toString().trim())
.replace("DATABASE", getDataBase().trim());
.replace("DATABASE", getDataBase().trim()
.replace("SCHEMA",getSchema().trim()));
}else {
return "jdbc:hive2://HOSTNAME:PORT/DATABASE?EXTRA_PARAMS"
.replace("HOSTNAME", getHost().trim())