<?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: Store before and after image not working for Postgres data source in Qlik Replicate</title>
    <link>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2132615#M7885</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/247911"&gt;@gkaur&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your patience.&lt;/P&gt;
&lt;P&gt;There are special limitations in PostgreSQL source endpoints than other relational databases including:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A title="Replication of the Before Image is not supported" href="https://help.qlik.com/en-US/replicate/May2023/Content/Global_Common/Content/SharedReplicateHDD/PostgreSQL-Source/limitations_postgresql_source.htm#ar_postgresds_802412600_1652565:~:text=Replication%20of%20the%20Before%20Image%20is%20not%20supported" target="_blank" rel="noopener"&gt;&lt;SPAN class="mc-variable Replicate.Replication_cap variable"&gt;Replication&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;of the Before Image is not supported&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A title="The default configuration of Replica identity is supported only" href="https://help.qlik.com/en-US/replicate/May2023/Content/Global_Common/Content/SharedReplicateHDD/PostgreSQL-Source/limitations_postgresql_source.htm#ar_postgresds_802412600_1652565:~:text=The%20default%20configuration%20of%20Replica%20identity%20is%20supported%20only" target="_self"&gt;&lt;SPAN&gt;The default configuration of Replica identity is supported only&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;In PostgreSQL the &lt;FONT face="courier new,courier"&gt;REPLICA IDENTITY&lt;/FONT&gt; can be &lt;FONT face="courier new,courier"&gt;{DEFAULT | USING INDEX index_name | FULL | NOTHING }&lt;/FONT&gt;, While set it to&amp;nbsp;&lt;FONT face="courier new,courier"&gt;DEFAULT &lt;/FONT&gt; then &lt;A title="DEFAULT  Records the old values of the columns of the primary key, if any. " href="https://www.postgresql.org/docs/current/sql-altertable.html#SQL-CREATETABLE-REPLICA-IDENTITY:~:text=is%20in%20use.-,DEFAULT,old%20values%20of%20the%20columns%20of%20the%20primary%20key%2C%20if%20any.,-This%20is%20the" target="_blank" rel="noopener"&gt;PostgreSQL records the old values of the columns of the primary key&lt;/A&gt; into&amp;nbsp;the write-ahead log, the other columns values are not recorded. This is why the columns values are set to NULL in Qlik Replicate. Set it to &lt;FONT face="courier new,courier"&gt;FULL&lt;/FONT&gt; may get all columns old values unfortunately it's not officially supported in current Qlik Replicate versions. Please &lt;A title="open Feature Request " href="https://community.qlik.com/t5/ideation/ct-p/qlik-product-insight" target="_blank" rel="noopener"&gt;open Feature Request&lt;/A&gt; if necessary.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRIKE&gt;BTW, how about if you change the applying mode from "&lt;STRONG&gt;Batch optimized apply&lt;/STRONG&gt;" to "&lt;STRONG&gt;Transactional Apply&lt;/STRONG&gt;"? Certainly in transactional apply mode the performance is not good.&amp;nbsp;&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Correction&lt;/STRONG&gt;: please do not try transactional apply mode as it's &lt;A title="not supported in Snowflake target endpoint" href="https://help.qlik.com/en-US/replicate/May2023/Content/Replicate/Main/Snowflake%20Target/SNOWFLAKE_limitations.htm#:~:text=The%20Transactional%20apply%20Change%20Processing%20mode%20is%20not%20supported." target="_blank" rel="noopener"&gt;not supported in Snowflake target endpoint&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps.&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>Sat, 28 Oct 2023 03:45:53 GMT</pubDate>
    <dc:creator>john_wang</dc:creator>
    <dc:date>2023-10-28T03:45:53Z</dc:date>
    <item>
      <title>Store before and after image not working for Postgres data source</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2130516#M7805</link>
      <description>&lt;P&gt;Does "Store before and after image" feature works for Postgres data source?&lt;/P&gt;
&lt;P&gt;Unfortunately for me it is not , we have made sure the wal_level is&amp;nbsp; set to logical and the replicate user is also a superuser. Not sure what else is missing ?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 20:50:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2130516#M7805</guid>
      <dc:creator>gkaur</dc:creator>
      <dc:date>2023-10-20T20:50:06Z</dc:date>
    </item>
    <item>
      <title>Re: Store before and after image not working for Postgres data source</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2130517#M7806</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;When using using PostgreSQL as a source,&amp;nbsp;&lt;SPAN class="mc-variable Replicate.Replication_cap variable"&gt;Replication&lt;/SPAN&gt;&amp;nbsp;of the Before Image is not supported.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://help.qlik.com/en-US/replicate/May2023/Content/Global_Common/Content/SharedReplicateHDD/PostgreSQL-Source/limitations_postgresql_source.htm" target="_blank"&gt;https://help.qlik.com/en-US/replicate/May2023/Content/Global_Common/Content/SharedReplicateHDD/PostgreSQL-Source/limitations_postgresql_source.htm&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;
&lt;P&gt;Lyka&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 20:55:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2130517#M7806</guid>
      <dc:creator>lyka</dc:creator>
      <dc:date>2023-10-20T20:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: Store before and after image not working for Postgres data source</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2130524#M7807</link>
      <description>&lt;P&gt;Oh! No, Does this mean what we cannot convert Physical deleted on Postgres to logical deletes on target side ?&lt;/P&gt;</description>
      <pubDate>Fri, 20 Oct 2023 21:32:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2130524#M7807</guid>
      <dc:creator>gkaur</dc:creator>
      <dc:date>2023-10-20T21:32:25Z</dc:date>
    </item>
    <item>
      <title>Re: Store before and after image not working for Postgres data source</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2130552#M7816</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/247911"&gt;@gkaur&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;If you mean the function&amp;nbsp;operation_indicator then it works fine (even with PK is changed). for example the expression :&amp;nbsp;&lt;FONT face="courier new,courier"&gt;operation_indicator('DELETE', 'UPDATE', 'INSERT')&lt;/FONT&gt;.&amp;nbsp;&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;</description>
      <pubDate>Sat, 21 Oct 2023 09:39:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2130552#M7816</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-10-21T09:39:06Z</dc:date>
    </item>
    <item>
      <title>Re: Store before and after image not working for Postgres data source</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2130553#M7817</link>
      <description>&lt;P&gt;No John, I tried this option as well but it still deletes the row from the target table in snowflake because soft delete first triggers a physical delete on the record and then using using&amp;nbsp;attrep_changes table triggers an insert statement, since in postgres before image is not captured, all except primary keys becomes NULL and insert fails as it cannot push NULL to not null columns.&lt;/P&gt;
&lt;P&gt;Is there any way to avoid DELETE option all together on the Apply/final table and have it capture in only __ct table ?&lt;/P&gt;
&lt;P&gt;I feel I am stuck &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 21 Oct 2023 10:33:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2130553#M7817</guid>
      <dc:creator>gkaur</dc:creator>
      <dc:date>2023-10-21T10:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: Store before and after image not working for Postgres data source</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2132615#M7885</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/247911"&gt;@gkaur&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Thanks for your patience.&lt;/P&gt;
&lt;P&gt;There are special limitations in PostgreSQL source endpoints than other relational databases including:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;A title="Replication of the Before Image is not supported" href="https://help.qlik.com/en-US/replicate/May2023/Content/Global_Common/Content/SharedReplicateHDD/PostgreSQL-Source/limitations_postgresql_source.htm#ar_postgresds_802412600_1652565:~:text=Replication%20of%20the%20Before%20Image%20is%20not%20supported" target="_blank" rel="noopener"&gt;&lt;SPAN class="mc-variable Replicate.Replication_cap variable"&gt;Replication&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;of the Before Image is not supported&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;&lt;A title="The default configuration of Replica identity is supported only" href="https://help.qlik.com/en-US/replicate/May2023/Content/Global_Common/Content/SharedReplicateHDD/PostgreSQL-Source/limitations_postgresql_source.htm#ar_postgresds_802412600_1652565:~:text=The%20default%20configuration%20of%20Replica%20identity%20is%20supported%20only" target="_self"&gt;&lt;SPAN&gt;The default configuration of Replica identity is supported only&lt;/SPAN&gt;&lt;/A&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;SPAN&gt;In PostgreSQL the &lt;FONT face="courier new,courier"&gt;REPLICA IDENTITY&lt;/FONT&gt; can be &lt;FONT face="courier new,courier"&gt;{DEFAULT | USING INDEX index_name | FULL | NOTHING }&lt;/FONT&gt;, While set it to&amp;nbsp;&lt;FONT face="courier new,courier"&gt;DEFAULT &lt;/FONT&gt; then &lt;A title="DEFAULT  Records the old values of the columns of the primary key, if any. " href="https://www.postgresql.org/docs/current/sql-altertable.html#SQL-CREATETABLE-REPLICA-IDENTITY:~:text=is%20in%20use.-,DEFAULT,old%20values%20of%20the%20columns%20of%20the%20primary%20key%2C%20if%20any.,-This%20is%20the" target="_blank" rel="noopener"&gt;PostgreSQL records the old values of the columns of the primary key&lt;/A&gt; into&amp;nbsp;the write-ahead log, the other columns values are not recorded. This is why the columns values are set to NULL in Qlik Replicate. Set it to &lt;FONT face="courier new,courier"&gt;FULL&lt;/FONT&gt; may get all columns old values unfortunately it's not officially supported in current Qlik Replicate versions. Please &lt;A title="open Feature Request " href="https://community.qlik.com/t5/ideation/ct-p/qlik-product-insight" target="_blank" rel="noopener"&gt;open Feature Request&lt;/A&gt; if necessary.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRIKE&gt;BTW, how about if you change the applying mode from "&lt;STRONG&gt;Batch optimized apply&lt;/STRONG&gt;" to "&lt;STRONG&gt;Transactional Apply&lt;/STRONG&gt;"? Certainly in transactional apply mode the performance is not good.&amp;nbsp;&lt;/STRIKE&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Correction&lt;/STRONG&gt;: please do not try transactional apply mode as it's &lt;A title="not supported in Snowflake target endpoint" href="https://help.qlik.com/en-US/replicate/May2023/Content/Replicate/Main/Snowflake%20Target/SNOWFLAKE_limitations.htm#:~:text=The%20Transactional%20apply%20Change%20Processing%20mode%20is%20not%20supported." target="_blank" rel="noopener"&gt;not supported in Snowflake target endpoint&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Hope this helps.&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>Sat, 28 Oct 2023 03:45:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2132615#M7885</guid>
      <dc:creator>john_wang</dc:creator>
      <dc:date>2023-10-28T03:45:53Z</dc:date>
    </item>
    <item>
      <title>Re: Store before and after image not working for Postgres data source</title>
      <link>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2132693#M7889</link>
      <description>&lt;P&gt;gkuar&amp;gt;&amp;gt;&amp;nbsp;&lt;SPAN&gt;s there any way to avoid DELETE option all together on the Apply/final table and have it capture in only __ct table ?&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/247911"&gt;@gkaur&lt;/a&gt;&amp;nbsp;- avoiding deletes is relatively easily done with a FILTER expression:&amp;nbsp;&amp;nbsp;$AR_H_OPERATION != 'DELETE'&lt;/P&gt;
&lt;P&gt;However this will skip the row entirely, both APPLY and STORE. With Logging for transformation set to trace you'll get the&amp;nbsp; the relatively meaningless/contextless log line:&amp;nbsp;&lt;STRONG&gt;[TRANSFORMATION ]T: Filter expression is false, skip the row&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I suspect your only choice is the above file and an additional Store changes only task for those tables needing a soft delete and a filter passing only delete. Now create an independent VIEW for the main table(s) to not return rows which are in the CT table with operation = D or have a separate process running on the Snowflake target DB&amp;nbsp; to pick up the D rows and update the target rows to indicate the (soft) delete. The fixup could be daily/hourlly or and just have&amp;nbsp; __CT table(s) server as external soft delete flags through that view.&lt;/P&gt;
&lt;P&gt;fwiw,&lt;/P&gt;
&lt;P&gt;Hein&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 29 Oct 2023 16:58:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Replicate/Store-before-and-after-image-not-working-for-Postgres-data/m-p/2132693#M7889</guid>
      <dc:creator>Heinvandenheuvel</dc:creator>
      <dc:date>2023-10-29T16:58:38Z</dc:date>
    </item>
  </channel>
</rss>

