<?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>article tFileOutputParquet - java.lang.NullPointerException: name should not be null in Official Support Articles</title>
    <link>https://community.qlik.com/t5/Official-Support-Articles/tFileOutputParquet-java-lang-NullPointerException-name-should/ta-p/2151720</link>
    <description>&lt;DIV class="talend-tkb-migrated-content"&gt;[Background]&lt;BR /&gt;-Talend Studio 7.3.1 or Talend Studio 8.0.1&lt;BR /&gt;&lt;BR /&gt;[Problem]&lt;BR /&gt;-We have a workflow to convert Excel files to parquet,tFileInputExcel with dynamic&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0EM5b00000E5fxq.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/121794i10650759D3DE6CED/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000E5fxq.png" alt="0EM5b00000E5fxq.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;-Run the job, and it gives us: name should not be null&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0EM5b00000E5fy5.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/124371iE8770CA10AA13AA5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000E5fy5.png" alt="0EM5b00000E5fy5.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;[Reason]&lt;BR /&gt;-There are some empty columns in the source Excel file:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0EM5b00000E5b6s.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/123889iE55E7CE051EF1362/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000E5b6s.png" alt="0EM5b00000E5b6s.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;[Workaround]
&lt;P&gt;-For the tFileInputExcel dynamic, It needs the first line to guess the schema.&lt;/P&gt;

&lt;P&gt;-The example job source Excel didn't set a real header. Please Add tJavaFlex to transform Dynamic metadata with:&lt;/P&gt;

&lt;P&gt;To the start code:&lt;/P&gt;

&lt;PRE&gt;
boolean isFirst = true; &lt;/PRE&gt;

&lt;P&gt;To the main code:&lt;/P&gt;

&lt;PRE&gt;
if(isFirst) {
&amp;nbsp; isFirst = false;
&amp;nbsp; Dynamic newDyn = row1.newColumn.clone(false);
&amp;nbsp; for(DynamicMetadata meta : newDyn.metadatas) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // reset column name,
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String newColumnName = "field"+meta.getColumnPosition();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; meta.setName(newColumnName);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; meta.setDbName(newColumnName);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
            System.out.println("New &amp;nbsp;dynamic field name: '"+ meta.getDbName()+"' ");
&amp;nbsp; }
&amp;nbsp; row2.newColumn = newDyn;
} &lt;/PRE&gt;
After that, the job works.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0EM5b00000E5fyj.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/124041i699E5B0E30F3D9CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000E5fyj.png" alt="0EM5b00000E5fyj.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A id="add-sf-comment-action" target="_blank" title="Add comment to Salesforce"&gt;&lt;/A&gt;&lt;/DIV&gt;</description>
    <pubDate>Fri, 09 Feb 2024 19:06:24 GMT</pubDate>
    <dc:creator>TalendSolutionExpert</dc:creator>
    <dc:date>2024-02-09T19:06:24Z</dc:date>
    <item>
      <title>tFileOutputParquet - java.lang.NullPointerException: name should not be null</title>
      <link>https://community.qlik.com/t5/Official-Support-Articles/tFileOutputParquet-java-lang-NullPointerException-name-should/ta-p/2151720</link>
      <description>&lt;DIV class="talend-tkb-migrated-content"&gt;[Background]&lt;BR /&gt;-Talend Studio 7.3.1 or Talend Studio 8.0.1&lt;BR /&gt;&lt;BR /&gt;[Problem]&lt;BR /&gt;-We have a workflow to convert Excel files to parquet,tFileInputExcel with dynamic&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0EM5b00000E5fxq.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/121794i10650759D3DE6CED/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000E5fxq.png" alt="0EM5b00000E5fxq.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;-Run the job, and it gives us: name should not be null&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0EM5b00000E5fy5.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/124371iE8770CA10AA13AA5/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000E5fy5.png" alt="0EM5b00000E5fy5.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;[Reason]&lt;BR /&gt;-There are some empty columns in the source Excel file:&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0EM5b00000E5b6s.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/123889iE55E7CE051EF1362/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000E5b6s.png" alt="0EM5b00000E5b6s.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;[Workaround]
&lt;P&gt;-For the tFileInputExcel dynamic, It needs the first line to guess the schema.&lt;/P&gt;

&lt;P&gt;-The example job source Excel didn't set a real header. Please Add tJavaFlex to transform Dynamic metadata with:&lt;/P&gt;

&lt;P&gt;To the start code:&lt;/P&gt;

&lt;PRE&gt;
boolean isFirst = true; &lt;/PRE&gt;

&lt;P&gt;To the main code:&lt;/P&gt;

&lt;PRE&gt;
if(isFirst) {
&amp;nbsp; isFirst = false;
&amp;nbsp; Dynamic newDyn = row1.newColumn.clone(false);
&amp;nbsp; for(DynamicMetadata meta : newDyn.metadatas) {
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; // reset column name,
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; String newColumnName = "field"+meta.getColumnPosition();
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; meta.setName(newColumnName);
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; meta.setDbName(newColumnName);&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
            System.out.println("New &amp;nbsp;dynamic field name: '"+ meta.getDbName()+"' ");
&amp;nbsp; }
&amp;nbsp; row2.newColumn = newDyn;
} &lt;/PRE&gt;
After that, the job works.&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0EM5b00000E5fyj.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/124041i699E5B0E30F3D9CA/image-size/large?v=v2&amp;amp;px=999" role="button" title="0EM5b00000E5fyj.png" alt="0EM5b00000E5fyj.png" /&gt;&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A id="add-sf-comment-action" target="_blank" title="Add comment to Salesforce"&gt;&lt;/A&gt;&lt;/DIV&gt;</description>
      <pubDate>Fri, 09 Feb 2024 19:06:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Official-Support-Articles/tFileOutputParquet-java-lang-NullPointerException-name-should/ta-p/2151720</guid>
      <dc:creator>TalendSolutionExpert</dc:creator>
      <dc:date>2024-02-09T19:06:24Z</dc:date>
    </item>
  </channel>
</rss>

