<?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: Writing dynamic columns from a source file to a database in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326710#M96166</link>
    <description>&lt;P&gt;Hi Shong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;I was able to read the dynamic columns using the tJavarow.&lt;/P&gt;&lt;P&gt;In my example I was referring to file1:name;account;val1;val2 as headers only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
    <pubDate>Wed, 12 Oct 2022 05:12:45 GMT</pubDate>
    <dc:creator>AManohar</dc:creator>
    <dc:date>2022-10-12T05:12:45Z</dc:date>
    <item>
      <title>Writing dynamic columns from a source file to a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326708#M96164</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;How can we handle variable csv file in talend.&lt;/P&gt;&lt;P&gt;My input csv file will have 7 fixed columns and upto 5 variable columns.&lt;/P&gt;&lt;P&gt;eg:&amp;nbsp;&lt;/P&gt;&lt;P&gt;file1:name;account;val1;val2&lt;/P&gt;&lt;P&gt;file2: name,account,val1,val3,val5&lt;/P&gt;&lt;P&gt;file3: name,account,val2,val5,val1&lt;/P&gt;&lt;P&gt;I need to update the database with these values and default values for the missing columns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But my requirement is to update an existing table.&lt;/P&gt;&lt;P&gt;The variable fields may or may not be present in the input file, I need to look up on the header and load the data in the data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I refered to following page with similar question &lt;A href="https://community.talend.com/s/question/0D53p00007vClLzCAK/handling-dynamic-column-in-talend?language=en_US" target="_blank"&gt;https://community.talend.com/s/question/0D53p00007vClLzCAK/handling-dynamic-column-in-talend?language=en_US&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But, couldnt find a working reponse in the post.&lt;/P&gt;&lt;P&gt;Could you please help.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 22:28:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326708#M96164</guid>
      <dc:creator>AManohar</dc:creator>
      <dc:date>2024-11-15T22:28:43Z</dc:date>
    </item>
    <item>
      <title>Re: Writing dynamic columns from a source file to a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326709#M96165</link>
      <description>&lt;P&gt;@Anitha Manohar​&amp;nbsp;To read a source file using dynamic schema, there must exist header line in the file. The example file provided in your post does not contain header and the file has different field separators.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You can find an example about how to map dynamic columns from an input file in this &lt;A href="https://community.talend.com/s/feed/0D55b00007oaynMCAQ" alt="https://community.talend.com/s/feed/0D55b00007oaynMCAQ" target="_blank"&gt;topic&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;</description>
      <pubDate>Tue, 11 Oct 2022 07:09:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326709#M96165</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-11T07:09:58Z</dc:date>
    </item>
    <item>
      <title>Re: Writing dynamic columns from a source file to a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326710#M96166</link>
      <description>&lt;P&gt;Hi Shong,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;I was able to read the dynamic columns using the tJavarow.&lt;/P&gt;&lt;P&gt;In my example I was referring to file1:name;account;val1;val2 as headers only.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 05:12:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326710#M96166</guid>
      <dc:creator>AManohar</dc:creator>
      <dc:date>2022-10-12T05:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Writing dynamic columns from a source file to a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326711#M96167</link>
      <description>&lt;P&gt;@Anitha Manohar​&amp;nbsp;,  you are able to get the column properties including column name, column value, type etc at runtime, for example, here is the Java code on tJavaRow used to get the column properties. &lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;&lt;I&gt;Dynamic columns = input_row.data;&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;for (int i = 0; i &amp;lt; columns.getColumnCount(); i++)&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;{&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;DynamicMetadata columnMetadata = columns.getColumnMetadata(i);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;String col_name=columnMetadata.getName();&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;String col_value=(String)row1.data.getColumnValue(col_name);&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;String col_type=columnMetadata.getType();&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;if(col_name.equals("name")){&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;columnMetadata.setName("new_name");&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;}&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;if(col_name.equals("age")){&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;columnMetadata.setType("id_Integer");&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;}&lt;/I&gt;&lt;/P&gt;&lt;P&gt;&lt;I&gt;}&lt;/I&gt;&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;In your case, get the column value and check if it is null or other values, change the codes based on your specific needs.&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Shong&lt;/P&gt;&lt;P&gt;​&lt;/P&gt;</description>
      <pubDate>Wed, 12 Oct 2022 07:30:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326711#M96167</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-12T07:30:03Z</dc:date>
    </item>
    <item>
      <title>Re: Writing dynamic columns from a source file to a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326712#M96168</link>
      <description>&lt;P&gt;Thanks Shong.&lt;/P&gt;&lt;P&gt;This worked &lt;span class="lia-unicode-emoji" title=":grinning_face:"&gt;😀&lt;/span&gt; .&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 00:05:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326712#M96168</guid>
      <dc:creator>AManohar</dc:creator>
      <dc:date>2022-10-13T00:05:11Z</dc:date>
    </item>
    <item>
      <title>Re: Writing dynamic columns from a source file to a database</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326713#M96169</link>
      <description>&lt;P&gt;Great, thanks for your feedback!&lt;/P&gt;</description>
      <pubDate>Thu, 13 Oct 2022 02:34:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Writing-dynamic-columns-from-a-source-file-to-a-database/m-p/2326713#M96169</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2022-10-13T02:34:02Z</dc:date>
    </item>
  </channel>
</rss>

