-->

In pentaho..How to pass a text file which contains

2019-05-29 09:54发布

问题:

I am using jdbc connection and i am passing parameters with example ${sample_db_connection} and that parameters has been defined in server in a text file as sample_db_connection=localhost and i want to pass the text file in the job step so that whenever the job ran and it found this parameter ,automatically it will take the value defined in text file.

回答1:

You need to create a KTR file using "Property Input" as the input step and "Modified Java Script" Step to define the key value mapping. Check the image below:

Define your filename in the input step. In the JS step, you can use "setVariable" function to define the key-value mapping.

Once this job is executed at the start, pentaho will set the variables for all the connection.

Hope i have understood the question correctly and this is what you are looking for !! :)