<?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: Mapping based on field value in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Mapping-based-on-field-value/m-p/2278515#M53972</link>
    <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLSaAAO"&gt;@Mstislav&lt;/A&gt;&amp;nbsp;, you need to write expression manually in tmap.&lt;/P&gt;</description>
    <pubDate>Wed, 27 May 2020 15:40:10 GMT</pubDate>
    <dc:creator>manodwhb</dc:creator>
    <dc:date>2020-05-27T15:40:10Z</dc:date>
    <item>
      <title>Mapping based on field value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Mapping-based-on-field-value/m-p/2278514#M53971</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I need to do some mapping based on column value.&lt;/P&gt; 
&lt;P&gt;For example,&lt;/P&gt; 
&lt;P&gt;if column A equals "1", then select value of column B,&lt;/P&gt; 
&lt;P&gt;if column A equals "2", then select value of column C, etc.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I used tMap component and expression like:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;PRE&gt;(
((String)globalMap.get("typeCodeId")).equals("8") ? row21.primaryActivityCode : ((String)globalMap.get("typeCodeId")).equals("2") ? row2.kpp :&amp;nbsp;
((String)globalMap.get("typeCodeId")).equals("6") ? row2.okato :
((String)globalMap.get("typeCodeId")).equals("1026") ? row2.okpo :
((String)globalMap.get("typeCodeId")).equals("1019") ? row2.oktmo :
((String)globalMap.get("typeCodeId")).equals("4") ? row2.okopf :&amp;nbsp;
((String)globalMap.get("typeCodeId")).equals("5") ? row2.okfs :&amp;nbsp;
((String)globalMap.get("typeCodeId")).equals("7") ? row2.okogu : ""
)&amp;nbsp;&lt;/PRE&gt; 
&lt;P&gt;Are there any hacks to do such mapping in more convenient manner?&lt;/P&gt; 
&lt;P&gt;e.g. using BRMS or decision tables.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any advice would be appreciated &lt;IMG id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://community.qlik.com/" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 02:18:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Mapping-based-on-field-value/m-p/2278514#M53971</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T02:18:50Z</dc:date>
    </item>
    <item>
      <title>Re: Mapping based on field value</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Mapping-based-on-field-value/m-p/2278515#M53972</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/s/profile/0053p000007LLSaAAO"&gt;@Mstislav&lt;/A&gt;&amp;nbsp;, you need to write expression manually in tmap.&lt;/P&gt;</description>
      <pubDate>Wed, 27 May 2020 15:40:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Mapping-based-on-field-value/m-p/2278515#M53972</guid>
      <dc:creator>manodwhb</dc:creator>
      <dc:date>2020-05-27T15:40:10Z</dc:date>
    </item>
  </channel>
</rss>

