create indexes in mysql table

create indexes in mysql table

Hello guys,
I am trying to create index for a mysql table using talend, but, so far, i couldnt figure it out.
I tried to insert a query like this on tMysqlInput component:
ALTER TABLE `fh_datamart`.`dim_date`
ADD INDEX `index2` (`year4` ASC)
, ADD INDEX `index3` (`month2` ASC) ;

but it returns me the following error:
java.sql.SQLException: Can not issue data manipulation statements with executeQuery().
Can somebody help me figure out , how do to this?
Thank you in advance.
Seventeen Stars

Re: create indexes in mysql table

You probably used a tMysqlInput component to execute this statement. This component expect a query and is not designed to execute arbitary other statements.
Use the tMysqlRow component instead.

Re: create indexes in mysql table

You probably used a tMysqlInput component to execute this statement. This component expect a query and is not designed to execute arbitary other statements.
Use the tMysqlRow component instead.

That was it! Thank you.
I am new to Talend ETL so, sometimes i just dunno whats the better components or aproach, to resolve a certain problem.
It comes with time, i guess... Smiley Happy