<?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>idea Add option to run a SQL script when a Replicate task is restarted in Suggest an Idea</title>
    <link>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idi-p/2025067</link>
    <description>&lt;P&gt;When a replicate task restarts the target tables will get dropped and recreated or truncated -- depending on the settings.&lt;/P&gt;
&lt;P&gt;I suggest there be an option to run a SQL script before and after this point.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the tables are recreated by Replicate, new columns are brought over (which is great) but we lost post-creation settings such as compression.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Truncating tables is an answer to that issue of course, but does not allow us to bring over new columns.&lt;/P&gt;
&lt;P&gt;Having the ability to run a custom SQL script would give us the option to include post-create changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jan 2023 16:02:35 GMT</pubDate>
    <dc:creator>billmcevoy</dc:creator>
    <dc:date>2023-01-12T16:02:35Z</dc:date>
    <item>
      <title>Add option to run a SQL script when a Replicate task is restarted</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idi-p/2025067</link>
      <description>&lt;P&gt;When a replicate task restarts the target tables will get dropped and recreated or truncated -- depending on the settings.&lt;/P&gt;
&lt;P&gt;I suggest there be an option to run a SQL script before and after this point.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When the tables are recreated by Replicate, new columns are brought over (which is great) but we lost post-creation settings such as compression.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Truncating tables is an answer to that issue of course, but does not allow us to bring over new columns.&lt;/P&gt;
&lt;P&gt;Having the ability to run a custom SQL script would give us the option to include post-create changes.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jan 2023 16:02:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idi-p/2025067</guid>
      <dc:creator>billmcevoy</dc:creator>
      <dc:date>2023-01-12T16:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: Add option to run a SQL script when a Replicate task is restarted</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2025361#M11642</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/153202"&gt;@billmcevoy&lt;/a&gt;&amp;nbsp;and all,&lt;/P&gt;
&lt;P&gt;For easy trace I'm adding the original article:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://community.qlik.com/t5/Qlik-Replicate/Compressing-Tables-on-SQL-Server/m-p/2023986#M4666" target="_blank"&gt;https://community.qlik.com/t5/Qlik-Replicate/Compressing-Tables-on-SQL-Server/m-p/2023986#M4666&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;thanks,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 09:21:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2025361#M11642</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-01-13T09:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: Add option to run a SQL script when a Replicate task is restarted</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2025499#M11644</link>
      <description>&lt;P&gt;Thank you John.&amp;nbsp; Much appreciated!&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jan 2023 13:08:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2025499#M11644</guid>
      <dc:creator>billmcevoy</dc:creator>
      <dc:date>2023-01-13T13:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: Add option to run a SQL script when a Replicate task is restarted</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2030917#M11764</link>
      <description>&lt;P&gt;Hi Bill;&lt;/P&gt;
&lt;P&gt;The way we achieve compression on our MS-SQL targets, is by utilizing the target endpoint's internal param "&lt;SPAN&gt;$info.query_syntax.create_primary_key".&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;ALTER TABLE ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC} ADD CONSTRAINT ${QO}${CONSTRAINT_NAME}${QC} PRIMARY KEY ( ${COLUMN_LIST} );ALTER INDEX ${QO}${CONSTRAINT_NAME}${QC} on ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC} REBUILD with (ONLINE = ON, DATA_COMPRESSION = PAGE)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;It's not perfect, but it works for what we need it for!&lt;/P&gt;</description>
      <pubDate>Fri, 27 Jan 2023 15:12:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2030917#M11764</guid>
      <dc:creator>joseph_jbh</dc:creator>
      <dc:date>2023-01-27T15:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add option to run a SQL script when a Replicate task is restarted</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2031101#M11767</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/118862"&gt;@joseph_jbh&lt;/a&gt;&amp;nbsp;, copy&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/153202"&gt;@billmcevoy&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thank you so much for your valuable idea! it helps a lot!!&lt;/P&gt;
&lt;P&gt;The compression is enabled just after table creation and before the data load. Great idea!!&lt;/P&gt;
&lt;P&gt;Besides enable compression on an INDEX it can also be enabled on TABLE&amp;nbsp;&lt;A title="Enable Compression on a Table or Index" href="https://learn.microsoft.com/en-us/sql/relational-databases/data-compression/enable-compression-on-a-table-or-index?view=sql-server-ver16" target="_blank" rel="noopener"&gt;Enable Compression on a Table or Index&lt;/A&gt;&amp;nbsp;. below sample works for TABLE level as well:&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;ALTER TABLE ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC} ADD CONSTRAINT ${QO}${CONSTRAINT_NAME}${QC} PRIMARY KEY ( ${COLUMN_LIST} );&lt;STRONG&gt;ALTER TABLE ${QO}${TABLE_OWNER}${QC}.${QO}${TABLE_NAME}${QC} REBUILD WITH (DATA_COMPRESSION = PAGE)&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;The only concern is that the table must have Primary Key (or Unique Index if no PK) otherwise the above SQL cannot be triggered. anyway, looks like it's the best workaround till now.&lt;/P&gt;
&lt;P&gt;Best Regards,&lt;/P&gt;
&lt;P&gt;John.&lt;/P&gt;</description>
      <pubDate>Sat, 28 Jan 2023 07:33:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2031101#M11767</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-01-28T07:33:29Z</dc:date>
    </item>
    <item>
      <title>From now on, please track this idea from the Ideation por...</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2099778#M13057</link>
      <description>&lt;P&gt;From now on, please track this idea from the Ideation portal.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;A title="Link to new idea" href="https://ideation.qlik.com/app/#/case/281203" target="_blank" rel="noopener"&gt;Link to new idea&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Meghann&lt;/P&gt;&lt;P data-unlink="true"&gt;&lt;EM&gt;NOTE: Upon clicking this link 2 tabs may open - please feel free to close the one with a login page. If you &lt;STRONG&gt;only&lt;/STRONG&gt; see 1 tab with the login page, please try clicking this link first: &lt;STRONG&gt;&lt;A title="Authenticate me!" href="#" target="_blank" rel="noopener"&gt;Authenticate me!&lt;/A&gt;&lt;/STRONG&gt;&amp;nbsp;t&lt;/EM&gt;&lt;EM&gt;hen try the link above again. Ensure pop-up blocker is off.&lt;/EM&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2023 14:58:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2099778#M13057</guid>
      <dc:creator>Meghann_MacDonald</dc:creator>
      <dc:date>2023-08-02T14:58:05Z</dc:date>
    </item>
    <item>
      <title>Re: Add option to run a SQL script when a Replicate task is restarted - Status changed to: Closed - Archived</title>
      <link>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2099779#M13058</link>
      <description />
      <pubDate>Wed, 02 Aug 2023 14:58:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Suggest-an-Idea/Add-option-to-run-a-SQL-script-when-a-Replicate-task-is/idc-p/2099779#M13058</guid>
      <dc:creator>Ideation</dc:creator>
      <dc:date>2023-08-02T14:58:07Z</dc:date>
    </item>
  </channel>
</rss>

