<?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: autonumberhash... - function combined with LOAD ... RESIDENT in Data Quality</title>
    <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515722#M4166</link>
    <description>&lt;P&gt;Hello, you should check whether your keys are really the same on both sides by using field concatenation.&lt;BR /&gt;I would also advise you not to use the autonumberhash function but rather either autonumber (if your application is a final app) or hash() if your application is a qvd generator.&lt;BR /&gt;Have a look at the answer on this subject.&lt;BR /&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;!--   end #ae_app   --&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 25 Apr 2025 06:43:31 GMT</pubDate>
    <dc:creator>VBD</dc:creator>
    <dc:date>2025-04-25T06:43:31Z</dc:date>
    <item>
      <title>autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515713#M4165</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I have stumbled across the following phenomenon.&lt;BR /&gt;I read data from a file and use the autonumberhash function, because I have to form a key over several fields as in this example:&lt;/P&gt;&lt;P&gt;Tab1:&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;autonumberhash256( Field1, Field2, Field3 ) AS KeyField,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Field1,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Field2,&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Field3&lt;BR /&gt;FROM MyFile;&lt;/P&gt;&lt;P&gt;In the second step, I read the fields again with a LOAD ... RESIDENT again to read the fields and generate the key:&lt;/P&gt;&lt;P&gt;Tab2:&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;autonumberhash256( Field1, Field2, Field3 ) AS KeyField&lt;BR /&gt;RESIDENT Tab1;&lt;/P&gt;&lt;P&gt;My problem is that I now get two different hash values for the same data.&lt;/P&gt;&lt;P&gt;But if I embed the fields in a trim( ... ) function, I get the same key.&lt;/P&gt;&lt;P&gt;Tab2:&lt;BR /&gt;LOAD&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;autonumberhash256( trim( Field1 ), trim( Field2 ), trim( Field3 ) ) AS KeyField&lt;BR /&gt;RESIDENT Tab1;&lt;/P&gt;&lt;P&gt;I cannot see any difference between the original fields and the imported fields. Reading in should not change the data either.&lt;/P&gt;&lt;P&gt;any idea why this behavior occurs?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;!--   end #ae_app   --&gt;</description>
      <pubDate>Fri, 25 Apr 2025 06:15:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515713#M4165</guid>
      <dc:creator>Ch_Nwk</dc:creator>
      <dc:date>2025-04-25T06:15:34Z</dc:date>
    </item>
    <item>
      <title>Re: autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515722#M4166</link>
      <description>&lt;P&gt;Hello, you should check whether your keys are really the same on both sides by using field concatenation.&lt;BR /&gt;I would also advise you not to use the autonumberhash function but rather either autonumber (if your application is a final app) or hash() if your application is a qvd generator.&lt;BR /&gt;Have a look at the answer on this subject.&lt;BR /&gt;Best regards,&lt;/P&gt;&lt;P&gt;&lt;!--   end #ae_app   --&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 06:43:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515722#M4166</guid>
      <dc:creator>VBD</dc:creator>
      <dc:date>2025-04-25T06:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515724#M4167</link>
      <description>&lt;P&gt;That's strange. What Qlik Sense version are you using? Cloud or what version?&lt;/P&gt;&lt;P&gt;Is there a difference if you create keys using hash256() instead of autonumberhash?&lt;/P&gt;</description>
      <pubDate>Fri, 25 Apr 2025 06:55:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515724#M4167</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-04-25T06:55:25Z</dc:date>
    </item>
    <item>
      <title>Re: autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515744#M4168</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;many thanks for the quick answers.&lt;BR /&gt;I will try to clarify a few things:&lt;/P&gt;&lt;P&gt;- I use qlik sense in the cloud, so I'm probably using the latest version.&lt;/P&gt;&lt;P&gt;- I checked and checked various things before writing here. In fact, I noticed it because a LEFT JOIN via this key did not work.&lt;/P&gt;&lt;P&gt;- Actually, I think that one function should work. I don't like to hear: There is this function, but you should use another one.&lt;/P&gt;&lt;P&gt;-&amp;nbsp;I know the autonumber function, but I need a key made up of several fields. From my point of view, it is more professional to pass the fields as parameters separated by commas than to pass them with '... &amp;amp; '|' &amp;amp; ...' to link them.&lt;/P&gt;&lt;P&gt;- only the hash..(..) function returns the same result, without the trim function, I get different values&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;DIV&gt;&lt;!--  
        Versioning Control Panel if versioning = true !
      --&gt;&lt;!--  
        Launcher
      --&gt;&lt;!--   Toolbar   --&gt;&lt;!--  
        Site Menu
      --&gt;&lt;!--  
        Generic Aria Live message container
      --&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;!--   Symbol definitions   --&gt;&lt;/DIV&gt;&lt;!--   end #ae_app   --&gt;</description>
      <pubDate>Fri, 25 Apr 2025 08:46:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515744#M4168</guid>
      <dc:creator>Ch_Nwk</dc:creator>
      <dc:date>2025-04-25T08:46:18Z</dc:date>
    </item>
    <item>
      <title>Re: autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515745#M4169</link>
      <description>&lt;P&gt;&lt;SPAN&gt;"-&amp;nbsp;I know the autonumber function, but I need a key made up of several fields. From my point of view, it is more professional to pass the fields as parameters separated by commas than to pass them with '... &amp;amp; '|' &amp;amp; ...' to link them."&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;More ram consumption, more spaces strorage so less optimized but as you want ...&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Did you try to juste create the key without function ? Just to see if it works.&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;!--   end #ae_app   --&gt;&lt;/P&gt;&lt;!--   end #ae_app   --&gt;</description>
      <pubDate>Fri, 25 Apr 2025 09:07:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515745#M4169</guid>
      <dc:creator>VBD</dc:creator>
      <dc:date>2025-04-25T09:07:31Z</dc:date>
    </item>
    <item>
      <title>Re: autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515746#M4170</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/301958"&gt;@VBD&lt;/a&gt;&amp;nbsp;I'm not sure I agree with you. There could possibly be more ram usage, and even cpu usage, during reload - but in the finished data model the result is the same. Autonumberhash results in a serialnumber, as well as autonumber() does. One advantage with autonumber though, is that it's possible to add a reference (AutoID) so that you can have multiple autonumbered columns independently of one another. And the advantage with the hash functions is that you can use separated field with commas (field1, field2), you don't need to concatenate them manually (like field1&amp;amp;'|&amp;amp;field2).&lt;/P&gt;&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/321206"&gt;@Ch_Nwk&lt;/a&gt;&amp;nbsp;I do agree with VBD that you should try creating the key without hashing/autonumbering to actually see what's going on. So instead of&amp;nbsp;&lt;SPAN&gt;autonumberhash256( Field1, Field2, Field3 ) AS KeyField you do this: Field1&amp;amp;'_'&amp;amp;Field2&amp;amp;'_'&amp;amp;Field2 as KeyField so that you can look at the result without it being "hidden".&lt;/SPAN&gt;&lt;/P&gt;&lt;!--   end #ae_app   --&gt;</description>
      <pubDate>Fri, 25 Apr 2025 09:28:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515746#M4170</guid>
      <dc:creator>henrikalmen</dc:creator>
      <dc:date>2025-04-25T09:28:45Z</dc:date>
    </item>
    <item>
      <title>Re: autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515751#M4171</link>
      <description>&lt;P&gt;Both autonumberhash256() loads aren't completely the same. The first one takes the field-values directly from the external source and the second one from internal stored values. Depending on the source-type + the load-order + various settings (interpretation/system-variables) may the data-interpretaion be different which may result in (slightly) different field-values.&lt;/P&gt;&lt;P&gt;Beside the already made suggestion of creating another key manually like: F1 &amp;amp; '|' &amp;amp; F2 ... I would apply a separat recno() and rowno() to each load and also adding something like: len(F1) as L1, ...&lt;/P&gt;&lt;P&gt;With it you could directly compare on a record-level what's going on and having a starting point for further investigations if anything isn't like expected.&lt;/P&gt;&lt;DIV&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;!--   Symbol definitions   --&gt;&lt;/DIV&gt;&lt;!--   end #ae_app   --&gt;</description>
      <pubDate>Fri, 25 Apr 2025 10:22:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515751#M4171</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-04-25T10:22:51Z</dc:date>
    </item>
    <item>
      <title>Re: autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515775#M4172</link>
      <description>&lt;P&gt;As&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/28038"&gt;@marcus_sommer&lt;/a&gt;&amp;nbsp;pointed out, the fields are not exactly the same. As you've posted pseudo code, i can't say exactly why they may be different in this case. However, I suggest that AutoNumberHash*() is an old school method that I would not use any more. Instead of using an AutoNumber() function to create keys, use the&amp;nbsp; AutoNumber Statement&amp;nbsp; instead.&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;Tab1:&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;LOAD&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Hash128( Field1, Field2, Field3 ) AS KeyField,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Field1,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Field2,&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Field3&lt;/SPAN&gt;&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="courier new,courier"&gt;&lt;SPAN&gt;FROM MyFile;&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;Autonumber KeyField;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;I use Hash128() instead of Hash256() as the likelihood of a hash collision is already incredibly low with 128.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you're wondering if this technique is performant, yes, it's actually the best in my testing.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="rwunderlich_0-1745594309662.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/179931iC3057E40FEB77802/image-size/medium?v=v2&amp;amp;px=400" role="button" title="rwunderlich_0-1745594309662.png" alt="rwunderlich_0-1745594309662.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;-Rob&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;!--      end #ae_app      --&gt;</description>
      <pubDate>Fri, 25 Apr 2025 15:20:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515775#M4172</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2025-04-25T15:20:38Z</dc:date>
    </item>
    <item>
      <title>Re: autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515952#M4174</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and many&amp;nbsp;thanks for the detailed response.&lt;/P&gt;&lt;P&gt;"...&amp;nbsp;&lt;SPAN&gt;the fields are not exactly the same...",&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I think so too, but that's exactly my problem.&lt;BR /&gt;After a LOAD ... RESIDENT the content of the fields doesn't seem to be the same anymore. That would mean LOAD RESIDENT changes the fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case I can work around it but I also use the autonumberhash*( ) function in another place and therefore this behavior makes me uneasy.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/61603"&gt;@rob&lt;/a&gt;&lt;BR /&gt;I need to compare tables and apply only the changed records. Since some of the tables have over 200 columns and it doesn't matter which one has changed, I thought I'd make a hash of all the columns and compare the hash values.&lt;/P&gt;&lt;P&gt;Here I could also use the hash128(...) function, but then I would have to do a string comparison.&lt;BR /&gt;the autonumberhash*(...) function seems to be slower, but then I have an integer comparison, which should be faster than the string comparison.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;What do you think about this?&lt;/P&gt;&lt;P&gt;Best regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Christian&lt;/P&gt;&lt;!--   end #ae_app   --&gt;</description>
      <pubDate>Mon, 28 Apr 2025 08:16:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2515952#M4174</guid>
      <dc:creator>Ch_Nwk</dc:creator>
      <dc:date>2025-04-28T08:16:51Z</dc:date>
    </item>
    <item>
      <title>Re: autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2516160#M4175</link>
      <description>&lt;P&gt;I would be surprised if you would notice the difference between a string and integer comparison in a script run. But you do notice the difference when using AutoNumberHash().&amp;nbsp;&lt;/P&gt;&lt;P&gt;"&lt;SPAN&gt;That would mean LOAD RESIDENT changes the fields." I don't think that's what Marcus was saying. What I understood was that one was using the input data from myfile and the other was using the output values from Tab1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hard to say why there may be a difference without seeing your entire script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;-Rob&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Apr 2025 18:02:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2516160#M4175</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2025-04-29T18:02:34Z</dc:date>
    </item>
    <item>
      <title>Re: autonumberhash... - function combined with LOAD ... RESIDENT</title>
      <link>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2516219#M4176</link>
      <description>&lt;P&gt;I never did this kind of comparing tables and therefore I'm not sure that this approach is the most suitable one. Here a few thoughts ...&lt;/P&gt;&lt;P&gt;At first the optimizing attempt with an autonumber() which means that both table-runs (old + new) have to be within the same script. This prevents nearly all possibilities to implement an incremental logic and loading the elder version prepared and optimized from a qvd.&lt;/P&gt;&lt;P&gt;The next goes to the join-logic to detect any changes within a record because joins are rather heavy measurements and the occurring matches / no matches needs to be evaluated within n following steps (adding the changed/new ones and removing/flagging the outdated ones).&lt;/P&gt;&lt;P&gt;Alternatives to the joins may be the use of mappings or probably much better to check the hashed values against each other per exists().&lt;/P&gt;&lt;P&gt;Another consideration (surely not suitable for all scenarios but certain ones may benefit) might be to transform the tables before the checks into a stream-data structure with a crosstable-statement, for example:&lt;/P&gt;&lt;P&gt;crosstable(Field, Value, 3)&lt;BR /&gt;load recno() as RecNo, rowno() as RowNo, * from Source;&lt;/P&gt;&lt;P&gt;Crosstable-statements are also quite heavy transformations and it removes by default NULL's as values which impacts the performances and the number of the returning rows per record as well as the possible methods to detect changes.&lt;/P&gt;&lt;P&gt;This means that depending of the table-sizes/structures and further requirements the implementation of n different check-logic might be result in the best performance (and then of course coming with disadvantages in regard to the complexity and developing/maintaining efforts).&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2025 05:22:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Data-Quality/autonumberhash-function-combined-with-LOAD-RESIDENT/m-p/2516219#M4176</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2025-04-30T05:22:01Z</dc:date>
    </item>
  </channel>
</rss>

