<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: how to update rows with tMysqlOutput ? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300557#M72773</link>
    <description>In TOS 2.0.x, tMysqlOutput doesn't build this kind of query. The update queries follow this template:
&lt;BR /&gt;
&lt;PRE&gt;update users&lt;BR /&gt;  set firstname = 'Pierrick', lastname = 'LE GALL'&lt;BR /&gt;  where id = 2&lt;/PRE&gt;
&lt;BR /&gt;"id" is a key column in the schema, "firstname" and "lastname" are simple columns.
&lt;BR /&gt;You can do the specific query you ask with a tMysqlRow.</description>
    <pubDate>Fri, 23 Mar 2007 14:33:07 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2007-03-23T14:33:07Z</dc:date>
    <item>
      <title>how to update rows with tMysqlOutput ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300556#M72772</link>
      <description>Hi all,
&lt;BR /&gt;sorry if this question has already been posted, or if a documentation exists : I don't find it.
&lt;BR /&gt;I don't see, and don't understand how to make an update on MySQL datas... the SQL request would be :
&lt;BR /&gt;update tableA set flag=0
&lt;BR /&gt;where NOM in (select NOM from tableB).
&lt;BR /&gt;So the tables A and B must be linked in any way.
&lt;BR /&gt;I have tried some things but none works.
&lt;BR /&gt;Thank you for responses.</description>
      <pubDate>Sat, 16 Nov 2024 14:37:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300556#M72772</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T14:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: how to update rows with tMysqlOutput ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300557#M72773</link>
      <description>In TOS 2.0.x, tMysqlOutput doesn't build this kind of query. The update queries follow this template:
&lt;BR /&gt;
&lt;PRE&gt;update users&lt;BR /&gt;  set firstname = 'Pierrick', lastname = 'LE GALL'&lt;BR /&gt;  where id = 2&lt;/PRE&gt;
&lt;BR /&gt;"id" is a key column in the schema, "firstname" and "lastname" are simple columns.
&lt;BR /&gt;You can do the specific query you ask with a tMysqlRow.</description>
      <pubDate>Fri, 23 Mar 2007 14:33:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300557#M72773</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-23T14:33:07Z</dc:date>
    </item>
    <item>
      <title>Re: how to update rows with tMysqlOutput ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300558#M72774</link>
      <description>OK it's clear when you know that simple columns of output are put in the "SET" part of query, and the key columns in "WHERE" part.
&lt;BR /&gt;In fact, my query can indeed be realized with a tMap component, I test it and it works :
&lt;BR /&gt;it is like this in the tMap :
&lt;BR /&gt;- the "(select NOM from tableB)" is simply the input table
&lt;BR /&gt;- the "update tableA set flag=0" is the output table with column "flag" (not a key !) force to "0"
&lt;BR /&gt;- the "where NOM in " part is a link between column NOM of output (a key !) and column NOM of input.
&lt;BR /&gt;then the tMap build queries like you say for each value of tableB.
&lt;BR /&gt;Thank you for help.</description>
      <pubDate>Sun, 25 Mar 2007 11:07:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300558#M72774</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-25T11:07:39Z</dc:date>
    </item>
    <item>
      <title>Re: how to update rows with tMysqlOutput ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300559#M72775</link>
      <description>A precision :
&lt;BR /&gt;it works only if input table is different of output table, if not it fall in dead lock between the SELECT of tDBInput and the UPDATE of tDBOuput on same rows...
&lt;BR /&gt;But it works if another component (like a tAggregateRow after the tDBInput) "break" the flow and free the locks of the SELECT before the UPDATE comes.</description>
      <pubDate>Wed, 28 Mar 2007 14:21:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300559#M72775</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2007-03-28T14:21:31Z</dc:date>
    </item>
    <item>
      <title>Re: how to update rows with tMysqlOutput ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300560#M72776</link>
      <description>I got the problem described in the previous post: when I try to update data in the row selected by tMysqlInput writing it to MySQLOutput through tMap the job hangs.
&lt;BR /&gt;When I simply insert a tAggregateRow between input and output it does not help. I tried different intermediate components like tReplace, tConvertType, tSleep but nothing changes.</description>
      <pubDate>Tue, 24 May 2011 07:57:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300560#M72776</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-24T07:57:58Z</dc:date>
    </item>
    <item>
      <title>Re: how to update rows with tMysqlOutput ?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300561#M72777</link>
      <description>I found a solution to my problem. tJavaRow can be used to separate SELECT from UPDATE. Table consists of 3 fields col1, col2, col3. (col1, col2) is a key. col3 value need to be changed from 0 to 1. code inside tJavaRow looks like:
&lt;BR /&gt;Long col1, col2; //temp variables for input row key fields
&lt;BR /&gt;col1=input_row.col1; // this field is a part of key
&lt;BR /&gt;col2=input_row.col2; // this field is a part of key
&lt;BR /&gt;output_row.col1 = col1; //this field is not changed
&lt;BR /&gt;output_row.col2 = col2; //this field is not changed
&lt;BR /&gt;output_row.col3 = 1; //this is the field I want to update</description>
      <pubDate>Tue, 24 May 2011 09:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/how-to-update-rows-with-tMysqlOutput/m-p/2300561#M72777</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2011-05-24T09:05:01Z</dc:date>
    </item>
  </channel>
</rss>

