You are not logged in.
Announcement
Unanswered posts
|
Pages: 1
I have a job where all that needs to happen is take a table in a mysql database and copy it to a remote mysql server. I'm fairly new to talend and I'm using the Talend Open Studio.
Either way, I managed to get my copies going, in the tMysqlOutput component I'm using "Drop table if exist and create" under "action on table", however, while running queries on the data today I realized that when Talend creates the table the table in the target server does not have any of the indexes (except for the primary key, which is indeed there).
Is there an option somewhere in Talend where I can have it mirror the table exactly as it is? indexes, storage engine, etc included?
Thanks in advance for your help,
Roderick Smith

Hi Roderick Smith
After dropping table and creating, you can use tMysqlRow to add indexes.
tMysqlInput-->tMysqlOutput
|
OnSubjobOk
|
tMysqlRow
Set query of tMysqlRow as follow.
ALTER TABLE tablename ADD INDEX index_name (column_list)
Regards,
Pedro
Offline
Pages: 1