<?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: Questions About Where Clause and Formatting in Connectivity &amp; Data Prep</title>
    <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532615#M15232</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/205436"&gt;@pedrohenriqueperna&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Short answer is &lt;EM&gt;yes. F&lt;/EM&gt;ormatting inside the Where is fine. What matters is that both sides of the comparison produce &lt;STRONG&gt;the exact same text&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Great post and explanation.&lt;/P&gt;</description>
    <pubDate>Mon, 06 Oct 2025 13:44:07 GMT</pubDate>
    <dc:creator>hugo_andrade</dc:creator>
    <dc:date>2025-10-06T13:44:07Z</dc:date>
    <item>
      <title>Questions About Where Clause and Formatting</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532549#M15225</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I'm optimizing an API extraction script for an ERP and I've stumbled into something I'm not sure of the impact in the use of the Where clause.&lt;/P&gt;&lt;P&gt;Basically, I have an "Historic Base" qvd which I increment with new data that I get daily by calling this API. To filter the Base with new or updated data, I build a composed key after getting the response data, e.g:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;customer_id|timestamp&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;The thing is, I've notice that sometimes fields appear to come in a "bad formatting". For instance, the customer_id comes as a data/timestamp value (ex. 1951-08-08T00:00:00). I understand data values are actually numbers, but I wonder if Qlik will interpret that when building composed keys, as they'd be converted to strings, right?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Lets say:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NewData:
LOAD * 
    ,customer_id&amp;amp;'|'&amp;amp;timestamp as temp_key_response
From XYZ;&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;In this scenario, would the key automatically be 1951-08-08T00:00:00|123456 or would it be an 18619|123456?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In a second step, I load the the Base filtering the temp_key:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;HistBase:
NoConcatenate LOAD * From ABC
Where Not Exists(temp_key_response, customer_id&amp;amp;'|'&amp;amp;timestamp);

Concatenate(HistBase)
LOAD * Resident NewData;
Drop Field temp_key_sample;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If Qlik pastes the value as it's formated (so as the timestamp) I'd have duplicates. Obviously, I did try formatting the value when building the key:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Floor(customer_id)&amp;amp;'|'&amp;amp;Floor(timestamp)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Then in the Where clause, I just applied the formatting directly to the fields, like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Where Not Exists(temp_key_response, Floor(customer_id)&amp;amp;'|'&amp;amp;Floor(timestamp));&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;FONT color="#FF6600"&gt;&lt;STRONG&gt;The question is: Is this approach OK? Formatting the values inside the Where clause? I'm just trying to avoid a second reload as some HistBases can be quite large.&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm asking this because I suspect I've had some issues with duplicates, but it could be due to other reasons, as different endpoints would use different fields, and I'm dynamically assigning values to variables throughout the script. I just need to be sure I can compare values by formatting them directly in the Where clause without pointing out to a previous built key (as for the second argument).&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 05 Oct 2025 16:54:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532549#M15225</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2025-10-05T16:54:01Z</dc:date>
    </item>
    <item>
      <title>Re: Questions About Where Clause and Formatting</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532615#M15232</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/205436"&gt;@pedrohenriqueperna&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Short answer is &lt;EM&gt;yes. F&lt;/EM&gt;ormatting inside the Where is fine. What matters is that both sides of the comparison produce &lt;STRONG&gt;the exact same text&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;Great post and explanation.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 13:44:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532615#M15232</guid>
      <dc:creator>hugo_andrade</dc:creator>
      <dc:date>2025-10-06T13:44:07Z</dc:date>
    </item>
    <item>
      <title>Re: Questions About Where Clause and Formatting</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532630#M15233</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/205436"&gt;@pedrohenriqueperna&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28877"&gt;@hugo_andrade&lt;/a&gt;&amp;nbsp;mentioned. Yes, in short its fine.&lt;/P&gt;&lt;P&gt;However, it can increase compute load (bascially run slower). Instead you can try a preceding load like below. This is a nice way to run through your needs while it has the data in active memory (processing). I use this method is a lot to help normalise data in steps and faster.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;NewData:
LOAD * 
Where Not Exists(temp_key_response, temp_key_response);

LOAD * 
    ,customer_id&amp;amp;'|'&amp;amp;timestamp as temp_key_response
From XYZ;&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Regards&lt;/P&gt;&lt;P&gt;Sean&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 15:12:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532630#M15233</guid>
      <dc:creator>seanbruton</dc:creator>
      <dc:date>2025-10-06T15:12:33Z</dc:date>
    </item>
    <item>
      <title>Re: Questions About Where Clause and Formatting</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532631#M15234</link>
      <description>&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 15:13:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532631#M15234</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2025-10-06T15:13:23Z</dc:date>
    </item>
    <item>
      <title>Re: Questions About Where Clause and Formatting</title>
      <link>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532632#M15235</link>
      <description>&lt;P&gt;Interesting!! Will sure try that. Thanks for the tip&lt;/P&gt;</description>
      <pubDate>Mon, 06 Oct 2025 15:14:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Connectivity-Data-Prep/Questions-About-Where-Clause-and-Formatting/m-p/2532632#M15235</guid>
      <dc:creator>pedrohenriqueperna</dc:creator>
      <dc:date>2025-10-06T15:14:42Z</dc:date>
    </item>
  </channel>
</rss>

