Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
Does any one know how to read database parameters from a file instead of filling in the information directly in the tDbInput component ?
thank you
Hi @Ons Dridi ,
You can use tContextLoad component to achieve your requirement.
The job should flow as tfileInputDelimited ---> tContextLoad ---> onsubjobok ---> tDBInput…
tfileInput file should contains the database parameters like,
host;localhost
port;3306
database;test
username;root
password;talend
Select the context view of the Job to define the following parameters,
host, String type
port, String type
database, String type
username, String type
password, Password type
Then while describing the parameters of tDBInput component,
use--> context.host, context.port, context.database, context.username,
context.password.
Hope this would help you.
Regards,
Shalini
Hi @Ons Dridi ,
You can use tContextLoad component to achieve your requirement.
The job should flow as tfileInputDelimited ---> tContextLoad ---> onsubjobok ---> tDBInput…
tfileInput file should contains the database parameters like,
host;localhost
port;3306
database;test
username;root
password;talend
Select the context view of the Job to define the following parameters,
host, String type
port, String type
database, String type
username, String type
password, Password type
Then while describing the parameters of tDBInput component,
use--> context.host, context.port, context.database, context.username,
context.password.
Hope this would help you.
Regards,
Shalini
thank you so much @Shalini M , it's very helpful , I tried it and it works !
Hello,
Here is online documentation about: TalendHelpCenter: Reading data from different MySQL databases using dynamically loaded connection pa...
Best regards
Sabrina