<?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: Adding an identity Column in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033881#M4864</link>
    <description>&lt;P&gt;It is snowflake. Yes to all the tables.&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 13:06:33 GMT</pubDate>
    <dc:creator>nabeelaslam1994</dc:creator>
    <dc:date>2023-02-03T13:06:33Z</dc:date>
    <item>
      <title>Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2032912#M4856</link>
      <description>&lt;P&gt;Hello Team,&lt;/P&gt;
&lt;P&gt;Is there a way to add an identity column in qlik replicate? A target table will have new column and have 1,2,3,4 Row number generated by Qlik?&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 15:40:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2032912#M4856</guid>
      <dc:creator>nabeelaslam1994</dc:creator>
      <dc:date>2023-02-01T15:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2032917#M4857</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the source table contains an identity column,&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="mc-variable Replicate.Productshort variable"&gt;Replicate&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;does not create the identity column on the target table. In this case, the table will need to be created manually on the target endpoint.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/replicate/November2022/Content/Replicate/Main/Introduction/Limitations.htm#Limitations%20and%20considerations" target="_blank"&gt;https://help.qlik.com/en-US/replicate/November2022/Content/Replicate/Main/Introduction/Limitations.htm#Limitations%20and%20considerations&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Gerald&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2023 15:42:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2032917#M4857</guid>
      <dc:creator>Gerald_U</dc:creator>
      <dc:date>2023-02-01T15:42:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033848#M4859</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/212845"&gt;@nabeelaslam1994&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Yes, it's easy to do in Replicate - we can utilize the target side database itself auto-increase column properties. A sample :&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;1-&lt;/STRONG&gt; &lt;/EM&gt;In target side table, add an additional auto-increase column (in my sample it's "autoinc" in MySQL) and it's type is&amp;nbsp;AUTO_INCREMENT&lt;/P&gt;
&lt;TABLE style="border-style: none; width: 100%; background-color: lightgrey;" border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;&lt;FONT face="courier new,courier"&gt;CREATE TABLE `scott`.`kitautoinc` (&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;`id` int(11) NOT NULL,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;`name` varchar(20) DEFAULT NULL,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;`&lt;EM&gt;autoinc&lt;/EM&gt;` int(11) NOT NULL &lt;STRONG&gt;AUTO_INCREMENT&lt;/STRONG&gt;,&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;PRIMARY KEY (`autoinc`)&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp; &amp;nbsp;&lt;/P&gt;
&lt;P&gt;certainly the column type can be "&lt;STRONG&gt;identity(1,1)&lt;/STRONG&gt;" in SQL Server, "&lt;STRONG&gt;generated by default as identity (start with 1 increment by 1)&lt;/STRONG&gt;" in Oracle, "&lt;STRONG&gt;SERIAL&lt;/STRONG&gt;" in PostgreSQL . Depends on the database type, you may refer to the corresponding database docs for exact syntax.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;2-&lt;/STRONG&gt;&lt;/EM&gt; In Replicate task setting, set "&lt;SPAN&gt;If target table already exists&lt;/SPAN&gt;" to "&lt;SPAN&gt;TRUNCATE before loading&lt;/SPAN&gt;" (the default setting is "&lt;SPAN&gt;DROP and CREATE table&lt;/SPAN&gt;")&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_2-1675426902761.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/99662iCA8E0CED7C86E8C9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_2-1675426902761.png" alt="john_wang_2-1675426902761.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;3-&lt;/STRONG&gt; &lt;/EM&gt;In Replicate task table design, do not include the column, so far the target database will fill in the auto-increase column's values automatically, during both Full Load and CDC stage&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_0-1675426062812.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/99659iF9847105D7FED887/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_0-1675426062812.png" alt="john_wang_0-1675426062812.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;4-&lt;/STRONG&gt;&lt;/EM&gt; In target side table the "autoinc" column values are the identify values&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="john_wang_1-1675426220162.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/99660iD01CBB4234774934/image-size/medium?v=v2&amp;amp;px=400" role="button" title="john_wang_1-1675426220162.png" alt="john_wang_1-1675426220162.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;However please take note that the identity values maybe not continuous after some operations eg rows deletion&amp;nbsp; etc, that's the database specific behavior.&lt;/P&gt;
&lt;P&gt;Hope this helps.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 12:24:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033848#M4859</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-02-03T12:24:07Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033855#M4860</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;
&lt;P&gt;can we perform this auto-increment from Qlik replicate rather than creating a column in target database?&lt;/P&gt;
&lt;P&gt;Nabeel&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 12:25:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033855#M4860</guid>
      <dc:creator>nabeelaslam1994</dc:creator>
      <dc:date>2023-02-03T12:25:23Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033862#M4861</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/212845"&gt;@nabeelaslam1994&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'm afraid I did not get your question very well. if there are 2 columns in your source app (eg "id" and "name") then we need an additional column (eg "autoinc" in above sample) to store the&amp;nbsp;&lt;SPAN&gt;identity column values.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;If you are meaning the 'hidden' column eg 'rownum' in Oracle, then it's irrelevant to Replicate task at all. You may use it straightly in your query while consuming the target database data.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;John.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 12:33:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033862#M4861</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-02-03T12:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033865#M4862</link>
      <description>&lt;P&gt;Basically I am trying to see if there a setting in Qlik replicate that i can use to add auto increment feature rather than adding it on the target database(create script).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 12:38:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033865#M4862</guid>
      <dc:creator>nabeelaslam1994</dc:creator>
      <dc:date>2023-02-03T12:38:16Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033869#M4863</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/212845"&gt;@nabeelaslam1994&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Well, maybe it's much easier for us if you can let me know your target database type, and if you wan to add such a column in all tables?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 12:44:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033869#M4863</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-02-03T12:44:33Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033881#M4864</link>
      <description>&lt;P&gt;It is snowflake. Yes to all the tables.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 13:06:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2033881#M4864</guid>
      <dc:creator>nabeelaslam1994</dc:creator>
      <dc:date>2023-02-03T13:06:33Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2034396#M4904</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/212845"&gt;@nabeelaslam1994&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please add an internal parameter in Snowflake target endpoint, the parameter name is&amp;nbsp;&lt;/P&gt;
&lt;TABLE style="border-style: none; width: 100%; background-color: lightgrey;" border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;&lt;FONT face="courier new,courier"&gt;$info.query_syntax.create_table&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;and set its value to&lt;/P&gt;
&lt;TABLE style="border-style: none; width: 100%; background-color: lightgrey;" border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="100%"&gt;&lt;FONT face="courier new,courier"&gt;CREATE ${TABLE_TYPE} TABLE ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC} ( ${COLUMN_LIST} , autoinc integer NOT NULL AUTOINCREMENT (1,1) primary key)&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;where the additional column is "&lt;FONT face="courier new,courier"&gt;autoinc&lt;/FONT&gt;" in my above sample. please tune the SQL by following&amp;nbsp;&lt;A title="Snowflake create table" href="https://docs.snowflake.com/en/sql-reference/sql/create-table.html" target="_blank" rel="noopener"&gt;Snowflake create table&lt;/A&gt;&amp;nbsp;syntax if you want to get more detailed control.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 11:28:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2034396#M4904</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-02-06T11:28:39Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2073437#M6069</link>
      <description>&lt;P&gt;Thanks for posting it here. Works perfectly.&lt;/P&gt;</description>
      <pubDate>Fri, 19 May 2023 19:25:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2073437#M6069</guid>
      <dc:creator>lacdsil</dc:creator>
      <dc:date>2023-05-19T19:25:17Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2425645#M9910</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/115309"&gt;@john_wang&lt;/a&gt; , Do we have similar internal parameter in target endpoint &lt;SPAN&gt;Microsoft SQL Server&lt;/SPAN&gt; top create table with auto increment column ?&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 05:55:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2425645#M9910</guid>
      <dc:creator>Sreekanth_333</dc:creator>
      <dc:date>2024-03-01T05:55:56Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2425709#M9919</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/252931"&gt;@Sreekanth_333&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;IN general we can control the target side table creation behavior by internal parameter however there are some exceptions, unfortunately SQL Server is one of the exception.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Anyway, please allow us some time, we'd like to confirm for you if any chance. Will get back to you later.&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 07:51:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2425709#M9919</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2024-03-01T07:51:22Z</dc:date>
    </item>
    <item>
      <title>Re: Adding an identity Column</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2425813#M9930</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/212845"&gt;@nabeelaslam1994&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/252931"&gt;@Sreekanth_333&lt;/a&gt;&amp;nbsp;,&lt;BR /&gt;&lt;BR /&gt;John and I have tested. Changing syntax does not work on the SQL Server.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Desmond&lt;/P&gt;</description>
      <pubDate>Fri, 01 Mar 2024 10:41:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Adding-an-identity-Column/m-p/2425813#M9930</guid>
      <dc:creator>DesmondWOO</dc:creator>
      <dc:date>2024-03-01T10:41:51Z</dc:date>
    </item>
  </channel>
</rss>

