<?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: User defined function(routine) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262596#M43009</link>
    <description>Thank you. 
&lt;BR /&gt;Will try it later. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;very simple &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt;&lt;BR /&gt;use tLibraryLoad &lt;BR /&gt;regards&lt;BR /&gt;laurent&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt;</description>
    <pubDate>Fri, 26 Oct 2012 20:54:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2012-10-26T20:54:32Z</dc:date>
    <item>
      <title>User defined function(routine)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262588#M43001</link>
      <description>I am a newbie to Talend.&lt;BR /&gt;I know that I can create user defined routine(functions) using Java code.&lt;BR /&gt;What's the easiest way to do unit test for the function inside Talend Open Studio?&lt;BR /&gt;Thanks</description>
      <pubDate>Wed, 24 Oct 2012 23:03:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262588#M43001</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-24T23:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: User defined function(routine)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262589#M43002</link>
      <description>Hi, &lt;BR /&gt;We don't understand your requirement very well, what's the purpose of "unit test". Do you mean how to call your routine in Talend Open Studio?&lt;BR /&gt;Best regards&lt;BR /&gt;Sabrina</description>
      <pubDate>Thu, 25 Oct 2012 03:44:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262589#M43002</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-25T03:44:10Z</dc:date>
    </item>
    <item>
      <title>Re: User defined function(routine)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262590#M43003</link>
      <description>Thanks for your reply.
&lt;BR /&gt;My question is: for example, I need create my own function 
&lt;BR /&gt; myFunction()
&lt;BR /&gt;How to test that myFunction() is doing what I expected? Can I do code testing inside TOS?
&lt;BR /&gt;Or I have to test outside TOS? like Eclipse?
&lt;BR /&gt;Thanks again.</description>
      <pubDate>Thu, 25 Oct 2012 15:59:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262590#M43003</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-25T15:59:56Z</dc:date>
    </item>
    <item>
      <title>Re: User defined function(routine)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262591#M43004</link>
      <description>hi, 
&lt;BR /&gt;you can use Eclipse to driven test and construct your routine. 
&lt;BR /&gt;Export in jar format , add jar to Talend lib or load jar file with Talend component and Test with différent user cases. 
&lt;BR /&gt;Or in Talend, create the routine and use somme assertion for each user case. 
&lt;BR /&gt;First test failed, because nothing has been developped. 
&lt;BR /&gt; 
&lt;PRE&gt;    public static Integer addition(Integer nbre1,Integer nbre2) {&lt;BR /&gt;        Integer result = 0;&lt;BR /&gt;        &lt;BR /&gt;        return result;&lt;BR /&gt;    }&lt;/PRE&gt; 
&lt;BR /&gt;In my first user Case , I've fixed 2 values of integer to add at 10. 
&lt;BR /&gt;in tAssert i'm wating for ... 20 
&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; 
&lt;BR /&gt;Run first failed (see result with tAssertCatcher). 
&lt;BR /&gt;Than begin to code your routine. 
&lt;BR /&gt; 
&lt;PRE&gt;    public static Integer addition(Integer nbre1,Integer nbre2) {&lt;BR /&gt;        Integer result = 0;&lt;BR /&gt;        &lt;BR /&gt;        result = nbre1 + nbre2;&lt;BR /&gt;        &lt;BR /&gt;        return result;&lt;BR /&gt;    }&lt;/PRE&gt; 
&lt;BR /&gt;Run test again 
&lt;BR /&gt;Assert Catcher tell is Ok now. 
&lt;BR /&gt;Test with if a String is passed to your routines, or null values , or ..... etc 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;Hope it helps 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent</description>
      <pubDate>Fri, 26 Oct 2012 10:26:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262591#M43004</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-26T10:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: User defined function(routine)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262592#M43005</link>
      <description>Thanks for the helpful information. 
&lt;BR /&gt;Originally, I would like to test the function only before calling it inside the ETL job. 
&lt;BR /&gt;According to the first way you mentioned, maybe I can try to do coding in Eclipse, then import them into TOS... 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;hi,&lt;BR /&gt;you can use Eclipse to driven test and construct your routine.&lt;BR /&gt;Export in jar format , add jar to Talend lib or load jar file with Talend component and Test with différent user cases.&lt;BR /&gt;Or in Talend, create the routine and use somme assertion for each user case.&lt;BR /&gt;First test failed, because nothing has been developped.&lt;BR /&gt;&lt;PRE&gt;    public static Integer addition(Integer nbre1,Integer nbre2) {&lt;BR /&gt;        Integer result = 0;&lt;BR /&gt;        &lt;BR /&gt;        return result;&lt;BR /&gt;    }&lt;/PRE&gt;&lt;BR /&gt;In my first user Case , I've fixed 2 values of integer to add at 10.&lt;BR /&gt;in tAssert i'm wating for ... 20 &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;&lt;BR /&gt;Run first failed (see result with tAssertCatcher).&lt;BR /&gt;Than begin to code your routine.&lt;BR /&gt;&lt;PRE&gt;    public static Integer addition(Integer nbre1,Integer nbre2) {&lt;BR /&gt;        Integer result = 0;&lt;BR /&gt;        &lt;BR /&gt;        result = nbre1 + nbre2;&lt;BR /&gt;        &lt;BR /&gt;        return result;&lt;BR /&gt;    }&lt;/PRE&gt;&lt;BR /&gt;Run test again &lt;BR /&gt;Assert Catcher tell is Ok now.&lt;BR /&gt;Test with if a String is passed to your routines, or null values , or ..... etc &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Hope it helps&lt;BR /&gt;regards&lt;BR /&gt;laurent&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 26 Oct 2012 16:32:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262592#M43005</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-26T16:32:13Z</dc:date>
    </item>
    <item>
      <title>Re: User defined function(routine)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262593#M43006</link>
      <description>in my example (in TOS), you're coding your routines directly in Talend, but separatly from the use of that routine
&lt;BR /&gt;in your ETL process (in a tMap for ex).
&lt;BR /&gt;By this way, you're testing each new user case and result is directly safe in the routine you're using in your process.
&lt;BR /&gt;regards
&lt;BR /&gt;laurent</description>
      <pubDate>Fri, 26 Oct 2012 16:55:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262593#M43006</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-26T16:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: User defined function(routine)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262594#M43007</link>
      <description>Yes, I understand, basically you created a very simple job to run the test. It's a good idea.
&lt;BR /&gt;BTW, as you said of another way, do you have any example about how to import jar file into TOS? It seems I couldn't find it.
&lt;BR /&gt;Thanks
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BLOCKQUOTE&gt;
 &lt;TABLE border="1"&gt;
  &lt;TBODY&gt;
   &lt;TR&gt;
    &lt;TD&gt;in my example (in TOS), you're coding your routines directly in Talend, but separatly from the use of that routine&lt;BR /&gt;in your ETL process (in a tMap for ex).&lt;BR /&gt;By this way, you're testing each new user case and result is directly safe in the routine you're using in your process.&lt;BR /&gt;regards&lt;BR /&gt;laurent&lt;/TD&gt;
   &lt;/TR&gt;
  &lt;/TBODY&gt;
 &lt;/TABLE&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 26 Oct 2012 17:42:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262594#M43007</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-26T17:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: User defined function(routine)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262595#M43008</link>
      <description>very simple 
&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt; 
&lt;BR /&gt;use tLibraryLoad 
&lt;BR /&gt;regards 
&lt;BR /&gt;laurent</description>
      <pubDate>Fri, 26 Oct 2012 19:54:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262595#M43008</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-26T19:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: User defined function(routine)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262596#M43009</link>
      <description>Thank you. 
&lt;BR /&gt;Will try it later. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; 
&lt;BR /&gt; 
&lt;BLOCKQUOTE&gt; 
 &lt;TABLE border="1"&gt; 
  &lt;TBODY&gt; 
   &lt;TR&gt; 
    &lt;TD&gt;very simple &lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009MA9p.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/138034i5F552429DA646D6F/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009MA9p.png" alt="0683p000009MA9p.png" /&gt;&lt;/span&gt;&lt;BR /&gt;use tLibraryLoad &lt;BR /&gt;regards&lt;BR /&gt;laurent&lt;/TD&gt; 
   &lt;/TR&gt; 
  &lt;/TBODY&gt; 
 &lt;/TABLE&gt; 
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Fri, 26 Oct 2012 20:54:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/User-defined-function-routine/m-p/2262596#M43009</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2012-10-26T20:54:32Z</dc:date>
    </item>
  </channel>
</rss>

