<?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: [resolved] tMysqlRow update from Excel - does this look right? in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-tMysqlRow-update-from-Excel-does-this-look-right/m-p/2310369#M81503</link>
    <description>I switched to using a tMap. I have to filter out records that aren't correct so in the tMap
&lt;BR /&gt;I take the excel input and check it for the correct string then pass it on through the other side
&lt;BR /&gt;of the tMap using a variable. As you can see from the pics it's passing the name through correctly 
&lt;BR /&gt;but the query doesn't like it for some reason. Help!</description>
    <pubDate>Thu, 14 Jan 2010 22:45:33 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2010-01-14T22:45:33Z</dc:date>
    <item>
      <title>[resolved] tMysqlRow update from Excel - does this look right?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tMysqlRow-update-from-Excel-does-this-look-right/m-p/2310368#M81502</link>
      <description>My job needs to grab the value from the excel file, compare it to a column in the mysql table
&lt;BR /&gt;and increment a count value if they match. I've got a tFileInputExcel component and tMysqlRow
&lt;BR /&gt;component. I've attached pics of the job. The update query contains the only tFileInput Excel variable
&lt;BR /&gt;that was available. I can't tell that it's the right one though. Take a look and see if this should work. Thanks in advance!</description>
      <pubDate>Sat, 16 Nov 2024 13:36:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tMysqlRow-update-from-Excel-does-this-look-right/m-p/2310368#M81502</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T13:36:31Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tMysqlRow update from Excel - does this look right?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tMysqlRow-update-from-Excel-does-this-look-right/m-p/2310369#M81503</link>
      <description>I switched to using a tMap. I have to filter out records that aren't correct so in the tMap
&lt;BR /&gt;I take the excel input and check it for the correct string then pass it on through the other side
&lt;BR /&gt;of the tMap using a variable. As you can see from the pics it's passing the name through correctly 
&lt;BR /&gt;but the query doesn't like it for some reason. Help!</description>
      <pubDate>Thu, 14 Jan 2010 22:45:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tMysqlRow-update-from-Excel-does-this-look-right/m-p/2310369#M81503</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-14T22:45:33Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tMysqlRow update from Excel - does this look right?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tMysqlRow-update-from-Excel-does-this-look-right/m-p/2310370#M81504</link>
      <description>Hello 
&lt;BR /&gt;What's the data type of account field in your table? 
&lt;BR /&gt;The first way is not correct, the global var is only avaliable after the component finished. So you should design the jobs like: 
&lt;BR /&gt;tFileInputExcel_1---tLogRow 
&lt;BR /&gt; | 
&lt;BR /&gt;onSubJobok 
&lt;BR /&gt; | 
&lt;BR /&gt;tMysqlRow 
&lt;BR /&gt;on tMysqlRow: if account is a Integer/int try 
&lt;BR /&gt;"update Users set loginAccount=loginAccount+1 where account="+((Integer)globalMap.get("tFileInputExcel_1_NB_LINE")) 
&lt;BR /&gt;if account is a string, try 
&lt;BR /&gt;"update Users set loginAccount=loginAccount+1 where account='"+String.valueOf(((Integer)globalMap.get("tFileInputExcel_1_NB_LINE")))+"'" 
&lt;BR /&gt;About the second way, if account is a string, try 
&lt;BR /&gt;"update Users set loginAccount=loginAccount+1 where account='"+filterset.account+"'" 
&lt;BR /&gt;Best regards 
&lt;BR /&gt; shong</description>
      <pubDate>Fri, 15 Jan 2010 02:35:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tMysqlRow-update-from-Excel-does-this-look-right/m-p/2310370#M81504</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-15T02:35:39Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] tMysqlRow update from Excel - does this look right?</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-tMysqlRow-update-from-Excel-does-this-look-right/m-p/2310371#M81505</link>
      <description>Thanks for the response Shong. Before getting this post I had already figured out how to make it work. 
&lt;BR /&gt;tFileInputExcel ---&amp;gt; tFilterRow ----&amp;gt; tMysqlRow 
&lt;BR /&gt;The account is a string value. I use tFilterRow's advanced setting to look for "input_row.account.endsWith("@TDOTX.TX")". 
&lt;BR /&gt;The Filter flow is then ran to the mysql component and this query runs on each row : 
&lt;BR /&gt;"Update users set logincount = logincount + 1 
&lt;BR /&gt;where account = \""+row2.account+"\"" 
&lt;BR /&gt;One of my issues yesterday was that I needed to use escape characters for the double quotes around row2.account. 
&lt;BR /&gt;It was passing the first part of the account and getting an error when it hit the @ symbol. Once I figured that out 
&lt;BR /&gt;I switched back to tFilterRow so I didn't have to alter incorrect accounts just so they'd never match in the update query. 
&lt;BR /&gt;After that I realized it was running but not updating the logincount. It took a few minutes but I dug in there and 
&lt;BR /&gt;found out I'd set the columns default value to null. null = null + 1 doesn't compute. I set the default value for that column 
&lt;BR /&gt;to 0 and ran the import again. This time everything worked. 
&lt;BR /&gt;It always amazes me that the job ends up being pretty simple when you step back and think about it. I seem to try and make it 
&lt;BR /&gt;more complicated than it has to be sometimes. 
&lt;BR /&gt;Thanks for that String.valueOf() comment. That will come in handy later when I need the cell value. I had been wondering how it 
&lt;BR /&gt;was going to translate that integer into the string value of the cell. 
&lt;BR /&gt;Thanks again. Hope this post helps somebody down the line!</description>
      <pubDate>Fri, 15 Jan 2010 14:51:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-tMysqlRow-update-from-Excel-does-this-look-right/m-p/2310371#M81505</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-01-15T14:51:24Z</dc:date>
    </item>
  </channel>
</rss>

