<?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: Modifying Dynamic column metadata to remove illegal column characters in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282945#M56989</link>
    <description>&lt;P&gt;Hi Trond,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, it can be done by creating a java routine to change the column names for the dynamic schema. This routine can be called on tMap to make the necessary change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a sample routine to take care of removing special characters like % , $ etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;public static Dynamic modifyDynamicColumns(Dynamic columnSet){&lt;BR /&gt;int n=columnSet.getColumnCount();&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for (int i=0;i&amp;lt;n;i++){&lt;BR /&gt;String name=columnSet.getColumnMetadata(i).getName().replace("%", "").replace("$", "");&lt;BR /&gt;columnSet.getColumnMetadata(i).setName(name);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;return columnSet;&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tej Singh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 12 Aug 2019 04:07:32 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2019-08-12T04:07:32Z</dc:date>
    <item>
      <title>Modifying Dynamic column metadata to remove illegal column characters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282944#M56988</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I want to read dynamic structures from a CSV file into Azure Table Storage to allow for a schemaless design. I am using Talend Cloud Big Data Platform, developing a Standard Batch job.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I get the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Exception in component tAzureStorageOutputTable_1 (job_Test_ADLS)&lt;BR /&gt;org.apache.avro.SchemaParseException: Illegal character in: Prosjektnavn%&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There are several column names in the CSV containing characters not allowed by the Azure Tables schema definition, such as %, (, ) etc. I want to create a code to alter the column names in the Dynamic column so they comply with the standard.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there any way to change the column names in the Dynamic column with Java? I would like to avoid changing the column header of the raw input files.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;Trond&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 05:00:44 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282944#M56988</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T05:00:44Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Dynamic column metadata to remove illegal column characters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282945#M56989</link>
      <description>&lt;P&gt;Hi Trond,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Yes, it can be done by creating a java routine to change the column names for the dynamic schema. This routine can be called on tMap to make the necessary change.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here is a sample routine to take care of removing special characters like % , $ etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;public static Dynamic modifyDynamicColumns(Dynamic columnSet){&lt;BR /&gt;int n=columnSet.getColumnCount();&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;for (int i=0;i&amp;lt;n;i++){&lt;BR /&gt;String name=columnSet.getColumnMetadata(i).getName().replace("%", "").replace("$", "");&lt;BR /&gt;columnSet.getColumnMetadata(i).setName(name);&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;return columnSet;&lt;BR /&gt;&lt;BR /&gt;}&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hope this helps!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Tej Singh&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 04:07:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282945#M56989</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-12T04:07:32Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Dynamic column metadata to remove illegal column characters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282946#M56990</link>
      <description>&lt;P&gt;Hi Tej!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much for a quick and precise reply - I added your code to a tJavaRow component and it works like a charm!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Would you happen to know where I can find more java documentation on available methods on the Dynamic data type, such as setName(name) and getColumnMetadata(int)? I could not find any documentation, and I am a java noob...&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Trond&lt;/P&gt;</description>
      <pubDate>Mon, 12 Aug 2019 09:16:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282946#M56990</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-12T09:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Dynamic column metadata to remove illegal column characters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282947#M56991</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There is no specific documentation on the functions I think. In the java code when we use the object and press "Ctrl + Space" with a "dot", it gives the list of functions available for the object. That is what I generally use to get the list of available functions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Tue, 13 Aug 2019 14:41:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282947#M56991</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2019-08-13T14:41:09Z</dc:date>
    </item>
    <item>
      <title>Re: Modifying Dynamic column metadata to remove illegal column characters</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282948#M56992</link>
      <description>&lt;P&gt;Hi @TejPratap Singh​&amp;nbsp;,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have similar requirement, when i use the above code in routine I am getting error as the methods getColumnCount(), getColumnMetadata() are not available hence create methods. How to fix this. Please help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 11:19:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Modifying-Dynamic-column-metadata-to-remove-illegal-column/m-p/2282948#M56992</guid>
      <dc:creator>vikramk</dc:creator>
      <dc:date>2020-12-07T11:19:02Z</dc:date>
    </item>
  </channel>
</rss>

