-
Book Overview & Buying
-
Table Of Contents
Talend Open Studio Cookbook
By :
This simple recipe shows how to execute database management and table related commands.
Create a new job jo_cook_ch07_0100_tableManagement.
The steps to be performed are as follows:
Drag the cookbookDB connection onto the canvas and select the component tMysqlRow.
In the Query area add the following code:
" CREATE TABLE `test_mysqlrow` ( `id` int(11) NOT NULL, `data` varchar(45) DEFAULT NULL, PRIMARY KEY (`id`) ) "
Run the job and you will see that the table testMysqlRow has been created.
The tMysqlRow component is the database equivalent of both tJava and tJavaRow, it can be used within a flow like tJavaRow or standalone like tJava.
That said, the tMysqlRow component is most commonly used standalone, like tJava, as in this case, where we create a table.
This simple example shows a single, isolated use of tMysqlRow. On most occasions it is used prior to processing to create temporary tables or to drop constraints...