<?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: Trouble with tJavaRow adding a column to the Dynamic in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-tJavaRow-adding-a-column-to-the-Dynamic/m-p/2284484#M58164</link>
    <description>&lt;P&gt;Anyone have experience with addColumn and a Dynamic column?&lt;/P&gt;</description>
    <pubDate>Thu, 29 Nov 2018 22:03:20 GMT</pubDate>
    <dc:creator>mdeeter</dc:creator>
    <dc:date>2018-11-29T22:03:20Z</dc:date>
    <item>
      <title>Trouble with tJavaRow adding a column to the Dynamic</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-tJavaRow-adding-a-column-to-the-Dynamic/m-p/2284483#M58163</link>
      <description>&lt;P&gt;Hi all, I have a Talend enterprise job that is fairly resusable.&amp;nbsp; One of the main functions of this job is to map column dynamically to a common output layout for PII data to be used in later steps.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I am struggling with the syntax to append&amp;nbsp;a net new column to the dynamic column that is coming into the tJavarow.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I have the mapping of varied input data figured out but I can't seem to initialize the column so I can map data to it.&amp;nbsp; Note, this works if I add the column in a prior step and just leaving the source blank (i.e. in tMap) and then use a tWriteDynamic prior to the tJavarow but I am hoping to keep this complexity all in the tJavarow component.&amp;nbsp; Is there something wrong with &lt;STRONG&gt;this&lt;/STRONG&gt; syntax?&amp;nbsp; I am not getting the column back in the output_row in the next component.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Any ideas:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Dynamic CDI_Schema = input_row.CdiData;&lt;/P&gt; 
&lt;P&gt;&lt;BR /&gt;for (int i = 0; i &amp;lt; CDI_Schema_1.getColumnCount(); i++)&lt;BR /&gt;{&lt;BR /&gt;DynamicMetadata columnMetadata = CDI_Schema.getColumnMetadata(i);&lt;BR /&gt;&lt;STRONG&gt;{CDI_Schema.addColumn("input_first_name" ,"String", true);}&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;if (columnMetadata.getName().equals("input_first_name"&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; )){CDI_Schema.setColumnValue(i,CDI_Schema.getColumnValue((String)globalMap.get("input_first_name_column")));}&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;}&lt;/P&gt; 
&lt;P&gt;output_row.CdiData&amp;nbsp; = CDI_Schema;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 28 Nov 2018 22:37:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-tJavaRow-adding-a-column-to-the-Dynamic/m-p/2284483#M58163</guid>
      <dc:creator>mdeeter</dc:creator>
      <dc:date>2018-11-28T22:37:34Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with tJavaRow adding a column to the Dynamic</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-tJavaRow-adding-a-column-to-the-Dynamic/m-p/2284484#M58164</link>
      <description>&lt;P&gt;Anyone have experience with addColumn and a Dynamic column?&lt;/P&gt;</description>
      <pubDate>Thu, 29 Nov 2018 22:03:20 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-tJavaRow-adding-a-column-to-the-Dynamic/m-p/2284484#M58164</guid>
      <dc:creator>mdeeter</dc:creator>
      <dc:date>2018-11-29T22:03:20Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with tJavaRow adding a column to the Dynamic</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-tJavaRow-adding-a-column-to-the-Dynamic/m-p/2284485#M58165</link>
      <description>&lt;P&gt;Hi, anyone have any suggestions on this?&lt;/P&gt;</description>
      <pubDate>Tue, 04 Dec 2018 16:31:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-tJavaRow-adding-a-column-to-the-Dynamic/m-p/2284485#M58165</guid>
      <dc:creator>mdeeter</dc:creator>
      <dc:date>2018-12-04T16:31:38Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with tJavaRow adding a column to the Dynamic</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Trouble-with-tJavaRow-adding-a-column-to-the-Dynamic/m-p/2284486#M58166</link>
      <description>&lt;P&gt;Hi mdeeter,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CDI_Schema.addColumn("input_first_name" ,"String", true) is not a void type but a dynamic type.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This one returns you CDI_Schema's value with added column.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So you have to write it like this : CDI_Schema = CDI_Schema.addColumn("input_first_name" ,"String", true);&lt;/P&gt;</description>
      <pubDate>Mon, 15 May 2023 09:24:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Trouble-with-tJavaRow-adding-a-column-to-the-Dynamic/m-p/2284486#M58166</guid>
      <dc:creator>User5923427525177642</dc:creator>
      <dc:date>2023-05-15T09:24:31Z</dc:date>
    </item>
  </channel>
</rss>

