<?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 do this 'simple' MySQL to MySQL job in Talend? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/How-to-do-this-simple-MySQL-to-MySQL-job-in-Talend/m-p/2224889#M17422</link>
    <description>Hi,&lt;BR /&gt;To your question, yes indeed</description>
    <pubDate>Fri, 10 Jan 2014 17:31:20 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2014-01-10T17:31:20Z</dc:date>
    <item>
      <title>How to do this 'simple' MySQL to MySQL job in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-do-this-simple-MySQL-to-MySQL-job-in-Talend/m-p/2224887#M17420</link>
      <description>Here is my MySQL query to track daily the number of rows in a given table: 
&lt;BR /&gt; 
&lt;PRE&gt;INSERT INTO updateRecords&lt;BR /&gt;SELECT&lt;BR /&gt;SUBDATE(CURDATE(),1),&lt;BR /&gt;'tableName',&lt;BR /&gt;COUNT(*)&lt;BR /&gt;FROM tableName&lt;/PRE&gt; 
&lt;BR /&gt;I don't know how I can turn this into a Talend job; I have several tables to do and I'd like to run one after the other as one big job 
&lt;BR /&gt;Here is my attempt at the query in a Talend tMySQLRow component: 
&lt;BR /&gt; 
&lt;PRE&gt;"SELECT&lt;BR /&gt;SUBDATE(CURDATE(),1) as 'date',&lt;BR /&gt;'tableName' as 'table',&lt;BR /&gt;COUNT(*) as 'rows'&lt;BR /&gt;FROM tableName"&lt;/PRE&gt; 
&lt;BR /&gt;The error I am currently receiving is 
&lt;B&gt;"Column 'date' cannot be null"&lt;/B&gt; 
&lt;BR /&gt;Thanks 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MACn.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/154443iC5B8CACEF3D12C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MACn.png" alt="0683p000009MACn.png" /&gt;&lt;/span&gt;</description>
      <pubDate>Thu, 09 Jan 2014 23:03:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-do-this-simple-MySQL-to-MySQL-job-in-Talend/m-p/2224887#M17420</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-09T23:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to do this 'simple' MySQL to MySQL job in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-do-this-simple-MySQL-to-MySQL-job-in-Talend/m-p/2224888#M17421</link>
      <description>Hi, 
&lt;BR /&gt;tXXXRow component is usually used to any type of sql statement excepts select statement, we use txxxInput component to execute a select statement, if you use use tXXXRow to execute a select statement, it returns a record set, and you are required to use a tParseRecordSet component after tXXXRow to parse the record sets. 
&lt;BR /&gt;If I understand your requirement well, do you want to monitor database modification(Inserted, updated, deleted)? 
&lt;BR /&gt;Best regards 
&lt;BR /&gt;Sabrina</description>
      <pubDate>Fri, 10 Jan 2014 03:21:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-do-this-simple-MySQL-to-MySQL-job-in-Talend/m-p/2224888#M17421</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-10T03:21:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to do this 'simple' MySQL to MySQL job in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-do-this-simple-MySQL-to-MySQL-job-in-Talend/m-p/2224889#M17422</link>
      <description>Hi,&lt;BR /&gt;To your question, yes indeed</description>
      <pubDate>Fri, 10 Jan 2014 17:31:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-do-this-simple-MySQL-to-MySQL-job-in-Talend/m-p/2224889#M17422</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-10T17:31:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to do this 'simple' MySQL to MySQL job in Talend?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/How-to-do-this-simple-MySQL-to-MySQL-job-in-Talend/m-p/2224890#M17423</link>
      <description>You could write your query dynamically by using context variables.&lt;BR /&gt;tFixedFlowInput --row1--&amp;gt; tFlowToIterate --- iterate --&amp;gt; tMysqlInput ---&amp;gt; any output...&lt;BR /&gt;For the tFixedFlowInput you setup a simple schema with one column called table_name.&lt;BR /&gt;Configure in the tFixedFlowInput the list of tables you want to measure. Alternatively you could read the list also from a text file with tFileInputDelimited. The only important thing is in the flow and the column table_name you will get the name of the table to check.&lt;BR /&gt;For the tMysqlInout you use this query:&lt;BR /&gt;&lt;PRE&gt;"SELECT&lt;BR /&gt;   SUBDATE(CURDATE(),1) as curr_date,&lt;BR /&gt;   '" + ((String) globalMap.get("row1.table_name")) + "' as table_name,&lt;BR /&gt;   COUNT(1) as num_rows&lt;BR /&gt;FROM '" + ((String) globalMap.get("row1.table_name")) + "'"&lt;/PRE&gt;&lt;BR /&gt;Hint for creating queries for MySQL. I have no clue why people putting identifier into the quotas. This is absolute not necessary and could lead into trouble. Do not do this even if Talend unfortunately does this also by default - totally useless!! The only reason could be if you have identifier which is a keyword, but this is also a very bad design!</description>
      <pubDate>Sat, 11 Jan 2014 00:07:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/How-to-do-this-simple-MySQL-to-MySQL-job-in-Talend/m-p/2224890#M17423</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-01-11T00:07:19Z</dc:date>
    </item>
  </channel>
</rss>

