<?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: Max (Attribute Value) in a CDC Process in Qlik Compose</title>
    <link>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1966036#M723</link>
    <description>&lt;P&gt;SP is for an attribute other than the example&amp;nbsp; Request Date described originally, but would work in either case.&lt;/P&gt;</description>
    <pubDate>Mon, 08 Aug 2022 15:36:46 GMT</pubDate>
    <dc:creator>jkardos</dc:creator>
    <dc:date>2022-08-08T15:36:46Z</dc:date>
    <item>
      <title>Max (Attribute Value) in a CDC Process</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1961089#M708</link>
      <description>&lt;P&gt;In a CDC load environment, how do you maintain an attribute value that represents the maximum or minimum value over a set of records?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example, if I have an order with three items, I want to create an attribute called MaxItemRequestDate where this value is the max Request date among the three items.&lt;/P&gt;
&lt;P&gt;I have tried using a windowing function on both the entity and in the mapping. But, looking at the task list scripts SQL, it looks as if in the CDC process the function will only be performed over the delta rows in the TSTG "staging" table, and not the entire row set like it would be in a full load.&lt;/P&gt;
&lt;P&gt;Can I have the best of both worlds ?&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 14 Mar 2025 20:49:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1961089#M708</guid>
      <dc:creator>jkardos</dc:creator>
      <dc:date>2025-03-14T20:49:07Z</dc:date>
    </item>
    <item>
      <title>Re: Max (Attribute Value) in a CDC Process</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1961244#M709</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/189811"&gt;@jkardos&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;During CDC the scope is just the current set of changed records and it doesn't extend to all records in the table. What we can do is to create Post Loading ETL and have the necessary query/logic there.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please try and let me know.&lt;/P&gt;
&lt;P&gt;Thank you,&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 15:21:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1961244#M709</guid>
      <dc:creator>shashi_holla</dc:creator>
      <dc:date>2022-07-27T15:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Max (Attribute Value) in a CDC Process</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1965608#M720</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/189811"&gt;@jkardos&lt;/a&gt;&amp;nbsp; Were you able to try what was suggested by Shashi? If you need help with this, please open&lt;/P&gt;
&lt;P&gt;&amp;nbsp;a support case and we can have a meeting and walk you through the steps.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Nanda&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 20:18:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1965608#M720</guid>
      <dc:creator>Nanda_Ravindra</dc:creator>
      <dc:date>2022-08-08T20:18:11Z</dc:date>
    </item>
    <item>
      <title>Re: Max (Attribute Value) in a CDC Process</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1966031#M722</link>
      <description>&lt;P&gt;Yes, Please find the Stored Procedure below.&amp;nbsp; It's used in Post ETL as suggested and passes in the &amp;amp;&amp;amp;1 run number parameter to make sure the Data Marts update by CDC process. Setting "&lt;SPAN&gt;Do not truncate staging tables" enabled, since using TSTG table to minimize records processed.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;CEATE PROC [lz].[usp_FactSalesOrderHeaderIsOrderRejected_PostLoadETL] @runno [INT] AS&lt;BR /&gt;BEGIN&lt;BR /&gt;UPDATE o&lt;BR /&gt;SET o.IsOrderRejected = oi_agg.newval,&lt;BR /&gt;o.RUNNO_UPDATE = @runno&lt;BR /&gt;FROM DV.FactSalesOrderHeader_HUB o&lt;BR /&gt;JOIN&lt;BR /&gt;(&lt;BR /&gt;SELECT DISTINCT oi.FactSalesOrderHeader,&lt;BR /&gt;CASE&lt;BR /&gt;WHEN MAX(oi.ReasonForRejection) OVER (PARTITION BY oi.SalesDocument_CNK) = '' THEN&lt;BR /&gt;'F'&lt;BR /&gt;ELSE&lt;BR /&gt;'T'&lt;BR /&gt;END AS newval&lt;BR /&gt;FROM DV.FactSalesOrderItem_HUB oi&lt;BR /&gt;WHERE EXISTS&lt;BR /&gt;(&lt;BR /&gt;SELECT 1&lt;BR /&gt;FROM DV.TSTG_FactSalesOrderItem toi&lt;BR /&gt;WHERE toi.SalesDocument_CNK = oi.SalesDocument_CNK&lt;BR /&gt;)&lt;BR /&gt;) oi_agg&lt;BR /&gt;ON o.ID = oi_agg.FactSalesOrderHeader&lt;BR /&gt;WHERE ISNULL(o.IsOrderRejected, '') &amp;lt;&amp;gt; ISNULL(oi_agg.newval, '');&lt;BR /&gt;END;&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 15:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1966031#M722</guid>
      <dc:creator>jkardos</dc:creator>
      <dc:date>2022-08-08T15:28:19Z</dc:date>
    </item>
    <item>
      <title>Re: Max (Attribute Value) in a CDC Process</title>
      <link>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1966036#M723</link>
      <description>&lt;P&gt;SP is for an attribute other than the example&amp;nbsp; Request Date described originally, but would work in either case.&lt;/P&gt;</description>
      <pubDate>Mon, 08 Aug 2022 15:36:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Qlik-Compose/Max-Attribute-Value-in-a-CDC-Process/m-p/1966036#M723</guid>
      <dc:creator>jkardos</dc:creator>
      <dc:date>2022-08-08T15:36:46Z</dc:date>
    </item>
  </channel>
</rss>

