<?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: File Target Endpoint : explicit control of column sequence in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1784363#M765</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately there is no way to control the order of columns for a File Target, unlike with let's say an Oracle or SQL Server target where in you can create the table manually in the target with the desired column order then set Replicate as Truncate before Loading.&lt;/P&gt;&lt;P&gt;I suggest submitting a feature request thru Ideation if this is a required use case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lyka&lt;/P&gt;</description>
    <pubDate>Fri, 19 Feb 2021 22:14:14 GMT</pubDate>
    <dc:creator>lyka</dc:creator>
    <dc:date>2021-02-19T22:14:14Z</dc:date>
    <item>
      <title>File Target Endpoint : explicit control of column sequence</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1783272#M759</link>
      <description>&lt;P&gt;I am using the file target endpoint to output CSV files from database table. These CSV files are use as input to another software system.&amp;nbsp; The interface specification demand that the columns are followed according to document.&lt;/P&gt;&lt;P&gt;For example: Table "User", has 3 columns "Name", "Age", "Gender"&lt;/P&gt;&lt;P&gt;The CSV file must be generated with columns in this sequence. i.e.&lt;BR /&gt;"Name","Age","Gender"&lt;BR /&gt;"John","13","Male"&lt;BR /&gt;"Dave","14","Male"&lt;BR /&gt;"Jane","12","Female"&lt;/P&gt;&lt;P&gt;In &lt;LI-PRODUCT title="Qlik Replicate" id="qlikReplicate"&gt;&lt;/LI-PRODUCT&gt;&amp;nbsp;, I am able to remove columns that are not required. But, I do not see how I can explicitly manage the column order. So, sometime after some schema update in the source database table, I might get:&lt;BR /&gt;"Name","Gender","Age"&lt;BR /&gt;"John","Male","13"&lt;BR /&gt;"Dave","Male","14"&lt;BR /&gt;"Jane","Female","12"&lt;/P&gt;&lt;P&gt;which is not what is agreed upon. Any advise on how I can control the column sequence order?&lt;/P&gt;</description>
      <pubDate>Wed, 17 Feb 2021 06:09:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1783272#M759</guid>
      <dc:creator>bengseng</dc:creator>
      <dc:date>2021-02-17T06:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: File Target Endpoint : explicit control of column sequence</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1784363#M765</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately there is no way to control the order of columns for a File Target, unlike with let's say an Oracle or SQL Server target where in you can create the table manually in the target with the desired column order then set Replicate as Truncate before Loading.&lt;/P&gt;&lt;P&gt;I suggest submitting a feature request thru Ideation if this is a required use case.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Lyka&lt;/P&gt;</description>
      <pubDate>Fri, 19 Feb 2021 22:14:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1784363#M765</guid>
      <dc:creator>lyka</dc:creator>
      <dc:date>2021-02-19T22:14:14Z</dc:date>
    </item>
    <item>
      <title>Re: File Target Endpoint : explicit control of column sequence</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786364#M770</link>
      <description>&lt;P&gt;Hey Lyka,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am also not able to find the headers in the target CSV file, which is super confusing, is there a way to add table header on the list? Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;--Mengyun&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Feb 2021 21:11:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786364#M770</guid>
      <dc:creator>qlik-lmy-se</dc:creator>
      <dc:date>2021-02-25T21:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: File Target Endpoint : explicit control of column sequence</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786393#M771</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;SPAN&gt;Mengyun,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What table header are you looking for?&amp;nbsp; If metadata header, you can enable that on the target endpoint definition&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Lyka&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 01:10:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786393#M771</guid>
      <dc:creator>lyka</dc:creator>
      <dc:date>2021-02-26T01:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: File Target Endpoint : explicit control of column sequence</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786396#M772</link>
      <description>&lt;P&gt;As mentioned by Lyka, you can do so at the Manage Endpoints Connections under the Add metadata header section.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49922iBBAEBCF81572E861/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 01:18:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786396#M772</guid>
      <dc:creator>bengseng</dc:creator>
      <dc:date>2021-02-26T01:18:19Z</dc:date>
    </item>
    <item>
      <title>Re: File Target Endpoint : explicit control of column sequence</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786409#M773</link>
      <description>&lt;P&gt;Hey Bengseng,&lt;/P&gt;&lt;P&gt;Thanks for your reply, the problem is that I could not find this option for me , either on the&amp;nbsp;&lt;SPAN&gt;&amp;nbsp;Manage Endpoints Connections or the task settings, my source point is from DB2 z/OS, even in Advanced tab:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik-lmy-se_0-1614305055818.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49924iE6E9202C30982DD8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="qlik-lmy-se_0-1614305055818.png" alt="qlik-lmy-se_0-1614305055818.png" /&gt;&lt;/span&gt;&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;</description>
      <pubDate>Fri, 26 Feb 2021 02:04:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786409#M773</guid>
      <dc:creator>qlik-lmy-se</dc:creator>
      <dc:date>2021-02-26T02:04:24Z</dc:date>
    </item>
    <item>
      <title>Re: File Target Endpoint : explicit control of column sequence</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786418#M774</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/135385"&gt;@bengseng&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/113691"&gt;@lyka&lt;/a&gt;&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/135165"&gt;@qlik-lmy-se&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;I found an easy way to control the columns sequence for generic File Target Endpoint. The basic idea is using table's transformation to adjust the order of the desired columns.&lt;/P&gt;&lt;P&gt;I'm using Oracle source (the solution is irrelevant to the Source Endpoing Type) and File Target to demo how to control the columns order.&lt;/P&gt;&lt;P&gt;In my demo the source table looks like:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;create table testcols (id integer, name char(20), address char(20), address2 char(20));&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the demo we are assuming the desired order of the columns in File Target become:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;ID, address, address2, name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please take note some columns order maybe cannot be adjusted if they are part of the PK (In my sample I'm assuming the column "ID" cannot be adjusted) because they cannot be removed from the transformation. So the PK columns will appear prior to other general columns.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The steps are:&lt;/P&gt;&lt;P&gt;1. Remove all the columns from Transform (keep column "ID" as is because it's PK)&lt;/P&gt;&lt;P&gt;2. Add a new column (you choose a name for it) and the expression is simple: you add the original column name as the expression (certainly you can compose your owner expression if needed)&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; You see I added three new columns. For example one of the new columns name is "2" and its expression is "$ADDRESS".&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_0-1614310388047.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49925i5BF608BF811FD759/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_0-1614310388047.png" alt="john_wang_0-1614310388047.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;3. You can see the results in both FL file and __ct table as below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_2-1614310515244.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49927i61BB6C04503B2E61/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_2-1614310515244.png" alt="john_wang_2-1614310515244.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BTW,&amp;nbsp; for your question where you can add the column header:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_3-1614310823179.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/49928i2D5F405311582096/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_3-1614310823179.png" alt="john_wang_3-1614310823179.png" /&gt;&lt;/span&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;Regards,&lt;/P&gt;&lt;P&gt;John WANG.&lt;/P&gt;</description>
      <pubDate>Fri, 26 Feb 2021 03:46:55 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786418#M774</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2021-02-26T03:46:55Z</dc:date>
    </item>
    <item>
      <title>Re: File Target Endpoint : explicit control of column sequence</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786426#M775</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I tested this with version 7 and tried to change the order of columns but it didnt work.&lt;BR /&gt;&lt;BR /&gt;I'll test this again tomorrow.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;lyka&lt;BR /&gt;</description>
      <pubDate>Fri, 26 Feb 2021 04:35:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/File-Target-Endpoint-explicit-control-of-column-sequence/m-p/1786426#M775</guid>
      <dc:creator>lyka</dc:creator>
      <dc:date>2021-02-26T04:35:39Z</dc:date>
    </item>
  </channel>
</rss>

