简体   繁体   English

从Kettle外部的属性文件连接数据库连接不起作用

[英]Connecting DB Connection from properties file outside the Kettle is not working

I am trying to remove DB Connection from ktr file and I am trying to connect to DBConnection by using the properties file which contains information about the connection. 我试图从ktr file删除数据库连接,并且试图通过使用包含有关连接信息的属性文件连接到DBConnection。 I used this link as reference; 我用这个链接作为参考。

Pass DB Connection parameters to a Kettle aka PDI table Input step dynamically from Excel . 从Excel动态将DB Connection参数传递到Kettle aka PDI表Input步骤

I followed all the steps but I am not able to get the required output. 我遵循了所有步骤,但无法获得所需的输出。

I want to connect to the database using properties file and have to excute the SQL using the DB defined in the properties file and the output has to be transfered into the output(Excel,csv,output-table etc). 我想使用属性文件连接到数据库,并且必须使用属性文件中定义的数据库执行SQL,并且必须将输出传输到输出(Excel,csv,输出表等)中。

Try something like this: 尝试这样的事情:

1- A Index job for start all (is my way) 1-全部开始的索引作业(是我的方式)

This job call a transformation whose job is to load the connection data to the database 此作业称为转换,其转换是将连接数据加载到数据库中

指数

2- The transformation that load the connection data pass this variables like parameters 2-加载连接数据的转换将像参数一样传递此变量

变数

3- The middle job is only for repeat the process if is necessary, only work like a bridge, pass the parameters 3-中间作业仅在必要时用于重复该过程,仅像桥梁一样工作,传递参数

中间

4- In this transformation does all DB work 4-在此转换中,所有数据库均起作用

选择

5- The datasource look like this. 5-数据源看起来像这样。

数据源

PS: sorry for my poor english :( PS:对不起,我英语不好:(

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM