<?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] Sending message to tFlowMeterCatcher in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320543#M90676</link>
    <description>End of the story...
&lt;BR /&gt;I have an explanation why the log messages appears twice in my console and my log file. The "Logs &amp;amp; stats" parameters of my project were still enabled.
&lt;BR /&gt;By the way, I am still interested to have your point of view about my workaround, even if I am still convinced that the best way to deal with this use case should be to extend the capabilities of the tFlowMeter component, especially to support iterate, row and trigger links as input, and provide a parameter in the component view to let the job designer setting the value according to its needs.
&lt;BR /&gt;Best regards.
&lt;BR /&gt;Bruno</description>
    <pubDate>Mon, 14 Dec 2015 17:10:27 GMT</pubDate>
    <dc:creator>blh</dc:creator>
    <dc:date>2015-12-14T17:10:27Z</dc:date>
    <item>
      <title>[resolved] Sending message to tFlowMeterCatcher</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320539#M90672</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;I would like to count data inserted into my table. The usual way is to insert tFlowMeter component on the row link to perform this. But as you can see on the screenshot below, I use 'bulk' components to load the data into the table for performance purpose. So there is no row link outgoing from the tOracleBulkExec component to connect to a tFlowMeter component.&lt;BR /&gt;However, the tOracleBulkExec component stores these information into some global variables, and I would like to send the values of these variables to the tFlowMeterCatcher.&lt;BR /&gt;I tried to connect a tJava to the tOracleBulkExec with the following java code but it seems this does not work (no trace on the console):&lt;/P&gt; 
&lt;PRE&gt;talendMeter_METTER.addMessage("DATA_INSERTED", ((Integer)globalMap.get("tOracleBulkExec_1_NB_LINE_INSERTED")), "null", "", "");&lt;/PRE&gt; 
&lt;P&gt;&lt;BR /&gt;Does someone know a workaround or another way to send a message to the tFlowMeterCatcher ?&lt;BR /&gt;Thanks in advance for your help.&lt;BR /&gt;Bruno&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGzL.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143301i7A3CC4ACAB263472/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGzL.jpg" alt="0683p000009MGzL.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 11 Dec 2015 15:52:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320539#M90672</guid>
      <dc:creator>blh</dc:creator>
      <dc:date>2015-12-11T15:52:05Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Sending message to tFlowMeterCatcher</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320540#M90673</link>
      <description>Hi
&lt;BR /&gt;You should use a tFlowMeterCatcher in the job and change the value of count column with the global variable&amp;nbsp;
&lt;FONT size="3"&gt;&lt;FONT face="consolas," monaco=""&gt;((Integer)globalMap.get("tOracleBulkExec_1_NB_LINE_INSERTED")). eg:&lt;/FONT&gt;&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT face="consolas," monaco=""&gt;...tOracleBulkExec--oncomponentok--tFixedFlowInput--main--tFlowMeter--tJavaRow&lt;/FONT&gt;
&lt;BR /&gt;
&lt;FONT face="consolas," monaco=""&gt;tFlowMeterCatcher--main--tMap--main--tLogRow&lt;/FONT&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;FONT face="consolas," monaco=""&gt;on tMap: change the value of count column with the global variable.&lt;/FONT&gt;</description>
      <pubDate>Mon, 14 Dec 2015 04:14:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320540#M90673</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-14T04:14:23Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Sending message to tFlowMeterCatcher</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320541#M90674</link>
      <description>Hi Shong, 
&lt;BR /&gt;First, thanks a lot for your reply. 
&lt;BR /&gt;I just tried your workaround, and despite it works pretty well, it is not as generic as I could expect because I need to specify explicitly the variable in the tMap. After a test run (check at the trace below), I identify a few problems with this approach: 
&lt;BR /&gt;1) Things become quite complicated if you need to log multiple variables using this way in the job such as NB_LINE_INSERTED and NB_LINE_BAD for example. 
&lt;BR /&gt;2) You need to filter the input of the tMap to avoid null pointer exception if you use another tFlowMeter before the tOracleBulkExec which is the case in my example (in the previous subjob). 
&lt;BR /&gt; 
&lt;BR /&gt;3) I receive two logs for my variable, and I do not understand why. Maybe I made a mistake in the tMap configuration (I attached a screenshot of the mapping). 
&lt;BR /&gt; 
&lt;PRE&gt;[statistics] connected&lt;BR /&gt;2015-12-14 10:28:38|QuXGHA|QuXGHA|QuXGHA|6372|OPCO|Opco_03b_LoadIndex|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement||begin||&lt;BR /&gt;2015-12-14 10:28:38|QuXGHA|QuXGHA|QuXGHA|OPCO|Opco_03b_LoadIndex|Developpement|1|tWarn|tWarn_2|Started...|10&lt;BR /&gt;2015-12-14 10:28:46|QuXGHA|QuXGHA|QuXGHA|6372|OPCO|Opco_03b_LoadIndex|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tFlowMeter_3|INDEX_FILE_READ|1638||&lt;BR /&gt;2015-12-14 10:28:46|QuXGHA|QuXGHA|QuXGHA|6372|OPCO|Opco_03b_LoadIndex|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tOracleBulkExec_1|begin||&lt;BR /&gt;&lt;BR /&gt;SQL*Loader: Release 10.2.0.3.0 - Production on Lun. Dc. 14 10:28:46 2015&lt;BR /&gt;&lt;BR /&gt;Copyright (c) 1982, 2005, Oracle. &amp;nbsp;All rights reserved.&lt;BR /&gt;2015-12-14 10:29:30|QuXGHA|QuXGHA|QuXGHA|6372|OPCO|Opco_03b_LoadIndex|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tOracleBulkExec_1|end|success|43217&lt;BR /&gt;2015-12-14 10:29:30|QuXGHA|QuXGHA|QuXGHA|6372|OPCO|Opco_03b_LoadIndex|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tFlowMeter_5|INDEX_DATA_INSERTED|236784||&lt;BR /&gt;2015-12-14 10:29:30|QuXGHA|QuXGHA|QuXGHA|6372|OPCO|Opco_03b_LoadIndex|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tFlowMeter_5|INDEX_DATA_INSERTED|1||&lt;BR /&gt;2015-12-14 10:29:30|QuXGHA|QuXGHA|QuXGHA|6372|OPCO|Opco_03b_LoadIndex|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement||end|success|51955&lt;BR /&gt;[statistics] disconnected&lt;/PRE&gt; 
&lt;BR /&gt;By the way, even if this is not the purpose of this post (neither the right place), it could be more interesting if the tFlowMeter could accept both row and trigger input links, and in the case of the second one, its component view could thereby provide an additional parameter to let the job designer decide how to set the count value. 
&lt;BR /&gt; 
&lt;BR /&gt;Thanks again for your help. 
&lt;BR /&gt;Regards. 
&lt;BR /&gt;Bruno 
&lt;BR /&gt; 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGzQ.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/134104iBC9B9DD8B1A95C6A/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGzQ.jpg" alt="0683p000009MGzQ.jpg" /&gt;&lt;/span&gt;</description>
      <pubDate>Mon, 14 Dec 2015 10:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320541#M90674</guid>
      <dc:creator>blh</dc:creator>
      <dc:date>2015-12-14T10:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Sending message to tFlowMeterCatcher</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320542#M90675</link>
      <description>Hi again, 
&lt;BR /&gt; 
&lt;BR /&gt;Based on the solution you proposed earlier, I just found a way to send a log message for multiple variables and to have a more generic process around the tFlowMeterCatcher. 
&lt;BR /&gt; 
&lt;BR /&gt;Here is the approach I implemented. 
&lt;BR /&gt;The part which send the message: 
&lt;BR /&gt;[tOracleBulkExec] &amp;nbsp;-- OnComponentOk &amp;nbsp;--&amp;gt; [tSetGlobalVar] -- row1 --&amp;gt; [tFlowMeter_1] -- row2 --&amp;gt; [tFlowMeter_2] 
&lt;BR /&gt;The tSetGlobalVar stores the values of the two variables of the tOracleBulkExec (NB_LINE_INSERTED and NB_LINE_BAD), as follows: 
&lt;BR /&gt;"DATA_INSERTED" = ((Integer)globalMap.get("tOracleBulkExec_1_NB_LINE_INSERTED")) 
&lt;BR /&gt;Each tFlowMeter send the message to the catcher and uses the same string in its label parameter that the one used for the key of the globalMap to store the value. 
&lt;BR /&gt; 
&lt;BR /&gt;The part which receive the message: 
&lt;BR /&gt;[tFlowMeterCatcher] -- row --&amp;gt; [tUniqRow] -- row (Uniques) --&amp;gt; [tJavaRow] -- row --&amp;gt; [tLogRow] 
&lt;BR /&gt;The tUniqRow is an attempt to keep a unique message based on the "origin" field (see the explanation below). 
&lt;BR /&gt;The tJavaRow checks whether the label is contained in the globalMap before replacing the count field as the following code explains: 
&lt;BR /&gt; 
&lt;PRE&gt;output_row.count = ((Boolean) globalMap.containsKey(input_row.label)) ? ((Integer) globalMap.get(input_row.label)) : input_row.count;&lt;/PRE&gt; 
&lt;BR /&gt;However, it still remains a problem as the execution trace shows. Each log message are sent twice and I do not understand why. I also tried to insert a tUniqRow between the tFlowMeterCatcher and the tLogRow to keep only unique messages based on the "origin" field as a key. But this does not resolve the problem. 
&lt;BR /&gt;I suspect that the tFlowMeterCatcher sends FlowMeter messages despite everything, while there is an output sending the messages to a tLogRow. 
&lt;BR /&gt; 
&lt;PRE&gt;[statistics] connected&lt;BR /&gt;2015-12-14 13:21:41|DF5sFZ|DF5sFZ|DF5sFZ|6260|OPC|Opc_03b_LoadInd|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement||begin||&lt;BR /&gt;2015-12-14 13:21:41|DF5sFZ|DF5sFZ|DF5sFZ|OPC|Opc_03b_LoadInd|Developpement|1|tWarn|tWarn_2|Started...|10&lt;BR /&gt;2015-12-14 13:21:50|DF5sFZ|DF5sFZ|DF5sFZ|6260|OPC|Opc_03b_LoadInd|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tFlowMeter_3|FILE_READ|1638||&lt;BR /&gt;2015-12-14 13:21:50|DF5sFZ|DF5sFZ|DF5sFZ|6260|OPC|Opc_03b_LoadInd|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tFlowMeter_3|FILE_READ|1638||&lt;BR /&gt;2015-12-14 13:21:50|DF5sFZ|DF5sFZ|DF5sFZ|6260|OPC|Opc_03b_LoadInd|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tOracleBulkExec_1|begin||&lt;BR /&gt;&lt;BR /&gt;SQL*Loader: Release 10.2.0.3.0 - Production on Lun. Dc. 14 13:21:50 2015&lt;BR /&gt;&lt;BR /&gt;Copyright (c) 1982, 2005, Oracle.  All rights reserved.&lt;BR /&gt;2015-12-14 13:22:35|DF5sFZ|DF5sFZ|DF5sFZ|6260|OPC|Opc_03b_LoadInd|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tOracleBulkExec_1|end|success|44980&lt;BR /&gt;2015-12-14 13:22:35|DF5sFZ|DF5sFZ|DF5sFZ|6260|OPC|Opc_03b_LoadInd|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tFlowMeter_5|DATA_INSERTED|236784||&lt;BR /&gt;2015-12-14 13:22:35|DF5sFZ|DF5sFZ|DF5sFZ|6260|OPC|Opc_03b_LoadInd|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tFlowMeter_14|DATA_BAD|0||&lt;BR /&gt;2015-12-14 13:22:35|DF5sFZ|DF5sFZ|DF5sFZ|6260|OPC|Opc_03b_LoadInd|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tFlowMeter_5|DATA_INSERTED|1||&lt;BR /&gt;2015-12-14 13:22:35|DF5sFZ|DF5sFZ|DF5sFZ|6260|OPC|Opc_03b_LoadInd|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement|tFlowMeter_14|DATA_BAD|1||&lt;BR /&gt;2015-12-14 13:22:35|DF5sFZ|DF5sFZ|DF5sFZ|6260|OPC|Opc_03b_LoadInd|_OqJUQJ9dEeWv45XULJuvcg|1.0|Developpement||end|success|53935&lt;BR /&gt;[statistics] disconnected&lt;/PRE&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;Any help would be appreciated. 
&lt;BR /&gt;Regards. 
&lt;BR /&gt;Bruno</description>
      <pubDate>Mon, 14 Dec 2015 13:22:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320542#M90675</guid>
      <dc:creator>blh</dc:creator>
      <dc:date>2015-12-14T13:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Sending message to tFlowMeterCatcher</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320543#M90676</link>
      <description>End of the story...
&lt;BR /&gt;I have an explanation why the log messages appears twice in my console and my log file. The "Logs &amp;amp; stats" parameters of my project were still enabled.
&lt;BR /&gt;By the way, I am still interested to have your point of view about my workaround, even if I am still convinced that the best way to deal with this use case should be to extend the capabilities of the tFlowMeter component, especially to support iterate, row and trigger links as input, and provide a parameter in the component view to let the job designer setting the value according to its needs.
&lt;BR /&gt;Best regards.
&lt;BR /&gt;Bruno</description>
      <pubDate>Mon, 14 Dec 2015 17:10:27 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320543#M90676</guid>
      <dc:creator>blh</dc:creator>
      <dc:date>2015-12-14T17:10:27Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Sending message to tFlowMeterCatcher</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320544#M90677</link>
      <description>&lt;BLOCKQUOTE&gt;
 [size=2][font=Verdana, Helvetica, Arial, sans-serif]&amp;nbsp;[tSetGlobalVar] -- row1 --&amp;gt; [tFlowMeter_1] -- row2 --&amp;gt; [tFlowMeter_2][/font][/size]
&lt;/BLOCKQUOTE&gt;
&lt;BR /&gt;I don't understand why you use two tFlowMeter components here? If you have several tFlowMeter components in the job, you need to filter the messages based on the origin filed on tMap, and set the value of count field with the global variable.&amp;nbsp;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;A href="https://community.talend.com/legacyfs/online/674/1_20151215-0933.png" target="_blank"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MGzV.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/143065i249435064C3788F7/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MGzV.png" alt="0683p000009MGzV.png" /&gt;&lt;/span&gt; &lt;/A&gt;</description>
      <pubDate>Tue, 15 Dec 2015 08:33:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320544#M90677</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2015-12-15T08:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: [resolved] Sending message to tFlowMeterCatcher</title>
      <link>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320545#M90678</link>
      <description>Hi Shong, 
&lt;BR /&gt;Thanks for your reply. 
&lt;BR /&gt;As I mentioned in a previous post, I need to log to separate variables setted by the tOracleBulkExec component (NB_LINE_INSERTED and NB_LINE_BAD in my case). This is why I use two tFlowMeter components. 
&lt;BR /&gt;So, in that case, I also need to distinguish after the tFlowMeterCatcher what variable I need to retrieve to replace the count value depending on the origin of the message. 
&lt;BR /&gt;Maybe there is a more efficient (or Talend) way to do that, but this one works well, and with this generic mechanism I can now log with tFlowMeter as many variables as I wish wich are not based on row flow. 
&lt;BR /&gt;So thank you again to put me on a way to find a solution to solve this problem. 
&lt;BR /&gt;Regards. 
&lt;BR /&gt;Bruno</description>
      <pubDate>Tue, 15 Dec 2015 09:22:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/resolved-Sending-message-to-tFlowMeterCatcher/m-p/2320545#M90678</guid>
      <dc:creator>blh</dc:creator>
      <dc:date>2015-12-15T09:22:14Z</dc:date>
    </item>
  </channel>
</rss>

