Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
How to execute .sql file in talend when i run a job?
for example:
If i run a job in talend the file(.sql) which i placed in desktop should be triggered and it should affect in mysql database
The .sql file may contain any qurey like create table or update or insert etc........
Hi
Set the Use Home Directory to <Mysql installation directory/bin>, and execute the command like
"cmd /c mysql -uUsername -pPassword -DDatabaseName <D:/files/in.sql"
hi,
can you please explain me how we can do it in tsystem component
Thanks
You should be able to do it by reading the file into a string with a tFileInputRaw component, write the contents into the globalMap, and use the globalMap entry as the Query in a tMysqlRow component.
Hi
Set the Use Home Directory to <Mysql installation directory/bin>, and execute the command like
"cmd /c mysql -uUsername -pPassword -DDatabaseName <D:/files/in.sql"
I can just see the expression on our security manager's face. "That's a password... in plain text... in a Talend job... you're fired!"
hi shong,
Thanks now it is working