<?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 Error using internal variables in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Error-using-internal-variables/m-p/2197210#M1041</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm created a simple enough mapping that sets a fiew context variables dynamically using a tContextLoad, then uses a query to read some records from an Oracle table, goes through a tMap and to a tDBOutput.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything works great, no errors, I see the data in the target table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I want to log the results, whether the tDBOutput inserted without errors or returned an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My plan was to use a tFixedFlowInput triggered by OnComponentOK from the tDBOutput and set the column values for my log table. Some variables are coming from the context variables and that works fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hit issues when I try to use the internal variables from my SQL queries and output. I use the auto-complete to make sure I get the proper syntax:&lt;/P&gt;
&lt;P&gt;internal((Integer)globalMap.get("tDBInput_1_NB_LINE"))&amp;nbsp;&lt;/P&gt;
&lt;P&gt;internal((Integer)globalMap.get("tDBOutput_1_NB_LINE_INSERTED"))&lt;/P&gt;
&lt;P&gt;internal((String)globalMap.get("tDBOutput_1_ERROR_MESSAGE"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get errors run time :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error in the component's properties:The method internal(Integer) is undefined for the type MyJobName&lt;BR /&gt;The method internal(Integer) is undefined for the type MyJobName&lt;BR /&gt;The method internal(String) is undefined for the type MyJobName&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried a number of things but can't figure out where I can use those internal variables and somehow output that somewhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JFS.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:57:15 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T04:57:15Z</dc:date>
    <item>
      <title>Error using internal variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-using-internal-variables/m-p/2197210#M1041</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm created a simple enough mapping that sets a fiew context variables dynamically using a tContextLoad, then uses a query to read some records from an Oracle table, goes through a tMap and to a tDBOutput.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Everything works great, no errors, I see the data in the target table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Now I want to log the results, whether the tDBOutput inserted without errors or returned an error.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My plan was to use a tFixedFlowInput triggered by OnComponentOK from the tDBOutput and set the column values for my log table. Some variables are coming from the context variables and that works fine.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hit issues when I try to use the internal variables from my SQL queries and output. I use the auto-complete to make sure I get the proper syntax:&lt;/P&gt;
&lt;P&gt;internal((Integer)globalMap.get("tDBInput_1_NB_LINE"))&amp;nbsp;&lt;/P&gt;
&lt;P&gt;internal((Integer)globalMap.get("tDBOutput_1_NB_LINE_INSERTED"))&lt;/P&gt;
&lt;P&gt;internal((String)globalMap.get("tDBOutput_1_ERROR_MESSAGE"))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I get errors run time :&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Error in the component's properties:The method internal(Integer) is undefined for the type MyJobName&lt;BR /&gt;The method internal(Integer) is undefined for the type MyJobName&lt;BR /&gt;The method internal(String) is undefined for the type MyJobName&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried a number of things but can't figure out where I can use those internal variables and somehow output that somewhere.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any idea?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;JFS.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-using-internal-variables/m-p/2197210#M1041</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T04:57:15Z</dc:date>
    </item>
    <item>
      <title>Re: Error using internal variables</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Error-using-internal-variables/m-p/2197211#M1042</link>
      <description>&lt;P&gt;I found the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My plan worked. The issue was in the syntax itself of those internal variables.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Where I got :&amp;nbsp;&lt;SPAN&gt;internal((Integer)globalMap.get("tDBInput_1_NB_LINE"))&amp;nbsp; I needed only&amp;nbsp;(Integer)globalMap.get("tDBInput_1_NB_LINE") and voilà.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I used "internal" because I had seen this in another post while searching how to ouput this kind of data.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;JFS.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 20:09:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Error-using-internal-variables/m-p/2197211#M1042</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-15T20:09:14Z</dc:date>
    </item>
  </channel>
</rss>

