<?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: Adding a new derived column based on database function in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217163#M12876</link>
    <description>&lt;P&gt;Thanks for the detailed instructions. I am afraid but does not work fully.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tMSSqlOutput component has been modified.&lt;/P&gt; 
&lt;P&gt;Advanced Settings -&amp;gt; Additional Columns -&amp;gt; + --&amp;gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;SQL Expression if I use "Soundex(first_name)"&lt;/P&gt; 
&lt;P&gt;first_name is my column&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Invalid column name 'first_name'.&lt;BR /&gt;[ERROR]:&lt;/P&gt; 
&lt;P&gt;tMSSqlOutput_1 - Invalid column name 'first_name'.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if I add instead a standard SQL Server function "DATEADD(day, DATEDIFF(day, 0, GETDATE()), -1)"&lt;/P&gt; 
&lt;P&gt;this works fine&lt;/P&gt; 
&lt;P&gt;I have tried all options&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;"Soundex([first_name])"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;"Soundex(schema.table_name.first_name)"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;"Soundex(table_name.first_name)"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Unfortunately none work...how can I reference the column in the function?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 24 May 2017 09:44:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-05-24T09:44:30Z</dc:date>
    <item>
      <title>Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217158#M12871</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I searched quite a lot bit unable to get any information. I have a requirement where within Talend Job I need to add a new column with an built database function&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Input is for e.g.&lt;/P&gt;
&lt;P&gt;FirstName&lt;/P&gt;
&lt;P&gt;LastName&lt;/P&gt;
&lt;P&gt;Address&lt;/P&gt;
&lt;P&gt;output&lt;/P&gt;
&lt;P&gt;FirstName&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;FirstName_Soundex ....this is a function Soundex(FirstName)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;LastName&lt;/P&gt;
&lt;P&gt;LastName_Soundex&lt;SPAN&gt; ....this is a function Soundex(LastName)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Address&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I am unable to find a component which enables me to do this. TMAP allows adding new column but the syntax is based on Java...it cannot compute db functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many Thanks&lt;/P&gt;
&lt;P&gt;Ashish&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 16:53:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217158#M12871</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-23T16:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217159#M12872</link>
      <description>&lt;P&gt;Take a look at step 8 of this tutorial (&lt;A href="https://www.rilhia.com/tutorials/using-auto-generated-primary-key-update-row-just-inserted-mysql-database" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.rilhia.com/tutorials/using-auto-generated-primary-key-update-row-just-inserted-mysql-database&lt;/A&gt;). I think it *may* be what you need.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 17:06:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217159#M12872</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-23T17:06:54Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217160#M12873</link>
      <description>&lt;P&gt;I'm afraid what you want to do is impossible.&lt;/P&gt;&lt;P&gt;If you want to add a column associated to a database function, you have to call this function using the "t&amp;lt;db&amp;gt;SP" component and put the result into the desired field.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 17:14:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217160#M12873</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-05-23T17:14:15Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217161#M12874</link>
      <description>&lt;P&gt;Arrrgh! &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt;, e&lt;SPAN&gt;xperts do not agree with each other&lt;/SPAN&gt;&amp;nbsp; &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;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 17:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217161#M12874</guid>
      <dc:creator>TRF</dc:creator>
      <dc:date>2017-05-23T17:38:50Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217162#M12875</link>
      <description>&lt;BLOCKQUOTE&gt; 
 &lt;HR /&gt; 
 &lt;A href="https://community.qlik.com/s/profile/005390000069RuGAAU"&gt;@rhall&lt;/A&gt; wrote: 
 &lt;BR /&gt; 
 &lt;P&gt;Take a look at step 8 of this tutorial (&lt;A href="https://www.rilhia.com/tutorials/using-auto-generated-primary-key-update-row-just-inserted-mysql-database" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.rilhia.com/tutorials/using-auto-generated-primary-key-update-row-just-inserted-mysql-database&lt;/A&gt;). I think it *may* be what you need.&lt;/P&gt; 
 &lt;HR /&gt; 
&lt;/BLOCKQUOTE&gt; 
&lt;P&gt;Thank you, this was a very helpful example.&lt;/P&gt;</description>
      <pubDate>Tue, 23 May 2017 19:59:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217162#M12875</guid>
      <dc:creator>cterenzi</dc:creator>
      <dc:date>2017-05-23T19:59:11Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217163#M12876</link>
      <description>&lt;P&gt;Thanks for the detailed instructions. I am afraid but does not work fully.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;tMSSqlOutput component has been modified.&lt;/P&gt; 
&lt;P&gt;Advanced Settings -&amp;gt; Additional Columns -&amp;gt; + --&amp;gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;SQL Expression if I use "Soundex(first_name)"&lt;/P&gt; 
&lt;P&gt;first_name is my column&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Invalid column name 'first_name'.&lt;BR /&gt;[ERROR]:&lt;/P&gt; 
&lt;P&gt;tMSSqlOutput_1 - Invalid column name 'first_name'.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if I add instead a standard SQL Server function "DATEADD(day, DATEDIFF(day, 0, GETDATE()), -1)"&lt;/P&gt; 
&lt;P&gt;this works fine&lt;/P&gt; 
&lt;P&gt;I have tried all options&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;"Soundex([first_name])"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;"Soundex(schema.table_name.first_name)"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;"Soundex(table_name.first_name)"&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Unfortunately none work...how can I reference the column in the function?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 09:44:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217163#M12876</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T09:44:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217164#M12877</link>
      <description>&lt;P&gt;Can you try something like &lt;STRONG&gt;"Soundex("+input_row.first_name+")"&amp;nbsp;&lt;/STRONG&gt;?&lt;/P&gt;
&lt;P&gt;And also remember to mention it in the reference column.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 11:37:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217164#M12877</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T11:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217165#M12878</link>
      <description>&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I had tried that but does not work. Reference column is used for position i.e. before/after or replace.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"Soundex("+ row1.first_name +")"&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;returns NULL for all columns as its not able to interpret it as column name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So sorry not able to achieve the end result.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 13:07:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217165#M12878</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T13:07:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217166#M12879</link>
      <description>&lt;P&gt;A subtle difference, but have you tried....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;"Soundex('"+ row1.first_name +"')"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm adding a ' before the double quote and after the double quote. This is done so that the value of row1.first_name (lets assume it is Richard) is added as a literal value at runtime. So the actual method passed to SQL would be...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Soundex('Richard')&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;That *might* work&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 13:48:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217166#M12879</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T13:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217167#M12880</link>
      <description>Thanks&lt;BR /&gt;&lt;BR /&gt;Had tried that, but it interprets "Soundex('"+ row1.first_name +"')"&lt;BR /&gt;&lt;BR /&gt;As "Soundex('row1.first_name')"&lt;BR /&gt;row1.first_name is a string and it returns N400 for all rows.&lt;BR /&gt;</description>
      <pubDate>Wed, 24 May 2017 13:53:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217167#M12880</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T13:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217168#M12881</link>
      <description>&lt;P&gt;It seems odd that it would interpret it as you say because it seems to be ignoring the quotes and the + (if it assumes the whole value as a string) and doesn't represent what Java would generate if it indeed treats it as Java String manipulation. However, it is clear this is not working for you. Have you tried using a t{DB}Row component to use an bespoke insert statement? It would arguably be slower, but would work.&lt;/P&gt;</description>
      <pubDate>Wed, 24 May 2017 14:02:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217168#M12881</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-24T14:02:51Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217169#M12882</link>
      <description>&lt;P&gt;OK, so this one intrigued me. I never like to be beaten so I have tried this out and now have a method that works. First of all I *think* what you have seen *could* be classed as a Talend bug. Everything you said regarding trying this and it failing holds true. However I don't believe that it should. The way I managed to get around this was to do the following.....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1) I added a tMap between my source and target. I used this tMap to create the function/parameter String making use of a literal value. So for example....&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;PRE&gt;"Test.MyFunction('"+row1.myValue+"')"&lt;/PRE&gt;
&lt;P&gt;This creates a String which if you pasted into a SQL developer tool, would return the value you want.&lt;BR /&gt;2) I put a tFlowToIterate component and a tFixedFlowInput component after the tMap. This is used to create a globalMap variable for all values in the flow and to convert them back to a flow that is iterated through. It is not quite as quick as it could be, but still pretty speedy. You may not be able to put up with the loss in performance though. The tFixedFlowInput is used to return the values stored globalMap variables. The tFlowToIterate component creates globalMap variables with the name {row}.{column_name}. So for a row called "row1" and a String column called "myValue" feeding into the tFlowToIterate, you would get a globalMap which could be accessed via....&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;((String)globalMap.get("row1.myValue"))&lt;/PRE&gt;
&lt;P&gt;3) The function/procedure you want to use is added in the way I suggested earlier, but the globalMap is used instead of a String that you build. So in the location where the String was previously &amp;nbsp;added, you would add (assuming your column used to create the SQL function call is called "myFunction").....&lt;/P&gt;
&lt;PRE&gt;((String)globalMap.get("row1.myFunction"))&lt;/PRE&gt;
&lt;P&gt;When I ran this, I saw the function return a value (and add it to the insert) which represented what had been supplied to the function as a literal value.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2017 00:29:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217169#M12882</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-25T00:29:44Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217170#M12883</link>
      <description>Thanks a lot, struggling a bit on global map variable...is it possible to export the job and share please ?&lt;BR /&gt;&lt;BR /&gt;Many Thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 25 May 2017 12:03:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217170#M12883</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-25T12:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217171#M12884</link>
      <description>&lt;P&gt;I'm afraid I do not have my machine with me at the moment. What is it you are stuck with? GlobalMap variables are not too difficult to help out with. Maybe you can post a screenshot and we can help&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2017 13:31:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217171#M12884</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-25T13:31:53Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217172#M12885</link>
      <description>Thanks, 
&lt;BR /&gt; 
&lt;BR /&gt;Screen print below: 
&lt;BR /&gt; 
&lt;BR /&gt;[cid:image001.png@01D2D56F.4CB8EEC0] 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;[cid:image002.png@01D2D56F.4CB8EEC0] 
&lt;BR /&gt; 
&lt;BR /&gt;Above new column in tmap 
&lt;BR /&gt; 
&lt;BR /&gt;Option for tFlowToIterate 
&lt;BR /&gt; 
&lt;BR /&gt;[cid:image003.png@01D2D56F.4CB8EEC0] 
&lt;BR /&gt; 
&lt;BR /&gt;Schema updated for tFixedFlowInput and added displaysoundex with ((String)globalMap.get("out1.firstnamesoundex")) 
&lt;BR /&gt; 
&lt;BR /&gt;[cid:image004.png@01D2D56F.713DB000] 
&lt;BR /&gt;When I run the tlogrow shows 
&lt;BR /&gt; 
&lt;BR /&gt;------------------. 
&lt;BR /&gt;| tLogRow_1 | 
&lt;BR /&gt;|=----------------=| 
&lt;BR /&gt;|displaysoundex | 
&lt;BR /&gt;|=----------------=| 
&lt;BR /&gt;|Soundex('Laquita')| 
&lt;BR /&gt;'------------------' 
&lt;BR /&gt; 
&lt;BR /&gt;.---------------. 
&lt;BR /&gt;| tLogRow_1 | 
&lt;BR /&gt;|=-------------=| 
&lt;BR /&gt;|displaysoundex | 
&lt;BR /&gt;|=-------------=| 
&lt;BR /&gt;|Soundex('Lura')| 
&lt;BR /&gt;'---------------' 
&lt;BR /&gt; 
&lt;BR /&gt;.-----------------. 
&lt;BR /&gt;| tLogRow_1 | 
&lt;BR /&gt;|=---------------=| 
&lt;BR /&gt;|displaysoundex | 
&lt;BR /&gt;|=---------------=| 
&lt;BR /&gt;|Soundex('Yuette')| 
&lt;BR /&gt;'-----------------' 
&lt;BR /&gt;.--------------. 
&lt;BR /&gt;| tLogRow_1 | 
&lt;BR /&gt;|=------------=| 
&lt;BR /&gt;|displaysoundex| 
&lt;BR /&gt;|=------------=| 
&lt;BR /&gt;|Soundex('') | 
&lt;BR /&gt;'--------------' 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;i.e. all rows...however the output delimited file at the end captures only the last record 
&lt;BR /&gt;displaysoundex 
&lt;BR /&gt; 
&lt;BR /&gt;Soundex('') 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt; 
&lt;BR /&gt;</description>
      <pubDate>Thu, 25 May 2017 16:02:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217172#M12885</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-25T16:02:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217173#M12886</link>
      <description>&lt;P&gt;Sorry images did not come through previous message. Please see the attached document.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;BR /&gt;&lt;A href="https://community.qlik.com/legacyfs/online/tlnd_dw_files/0683p000009LrAA"&gt;Talend_Soundex_Issue.docx&lt;/A&gt;</description>
      <pubDate>Thu, 25 May 2017 16:12:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217173#M12886</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-25T16:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217174#M12887</link>
      <description>&lt;P&gt;OK, I see I have been answering the wrong the question. If you want to use your function in a DB input component, you simply use it as you would use it in a normal SQL query. Then assign the function a column name with the "AS" keyword and ensure your schema has a column for it in the right place. The screenshot below shows my example which works....&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="query.jpg" style="width: 938px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009Lv95.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/151668i2124A50F1F172EBC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009Lv95.jpg" alt="0683p000009Lv95.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;My function is called "TestFunction" and I provide it with the account.code column. It returns the data as the "name" column. The schema has 4 columns; id, code, name and value.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Just so that you know, the question I was answering previously was to do with writing to the database and not reading from it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 May 2017 23:03:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217174#M12887</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-25T23:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217175#M12888</link>
      <description>&lt;P&gt;Many Thanks and you are a star. I agree with you...you never give up and are very helpful indeed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 26 May 2017 10:25:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217175#M12888</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-05-26T10:25:28Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217176#M12889</link>
      <description>&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20181116-001.JPG" style="width: 875px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1UK.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157074iAB431D830C8FA5F1/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1UK.jpg" alt="0683p000009M1UK.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;FONT size="2"&gt;&amp;nbsp;(current job, all the fields are from one SELECT statement)&lt;/FONT&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I was asked to do an enhancement on an existing Talend job. This job is to list all the sales records per item &amp;amp; per UPC.&amp;nbsp; Currently, all the columns are from a SQL select statement (tDBInput), including a "size" field which calls a database function to get the value. It is ok when we only want to retrieve records for the past week, but it seems no working if I want to get data for the past 2 years.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;How should I re-design the job to make it perform better?&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Thanks!&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="20181116-001.JPG" style="width: 0px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M1UP.jpg"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/142997i57D8371BDBF46F48/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M1UP.jpg" alt="0683p000009M1UP.jpg" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Nov 2018 21:07:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217176#M12889</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2018-11-16T21:07:00Z</dc:date>
    </item>
    <item>
      <title>Re: Adding a new derived column based on database function</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217177#M12890</link>
      <description>&lt;P&gt;Just faced this issue, where trying to use a SQL function in a tdboutput (like tmssqloutput) component via the additional column.&lt;/P&gt;&lt;P&gt;if you do a "&lt;B&gt;Soundex(?)&lt;/B&gt;", it should work. The whole line in Additional column shoud look like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"first_name"   Varchar(50)   "Soundex(?)"   Replace   first_name&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The reason is the generated code is a preparedStatement, and a prepared Statement uses question marks as parameters. I just tried with LEFT(?,2) and it worked beautifully. LEFT being a sql function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Obviously as an input, it is much easier as you can write any SQL query you like.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 16:28:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Adding-a-new-derived-column-based-on-database-function/m-p/2217177#M12890</guid>
      <dc:creator>jp10</dc:creator>
      <dc:date>2021-04-29T16:28:01Z</dc:date>
    </item>
  </channel>
</rss>

