<?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: How to apply a hash function to all fields in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/How-to-apply-a-hash-function-to-all-fields/m-p/1258018#M849875</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer that's exactly what i was looking for.&lt;/P&gt;&lt;P&gt;And no, i cannot use a known primary key to streamline this process for the simple reason that i have a variable number of QVD files in input. Also, the primary key column is not always in the first order. That's why am looking to make a hash column. But if you have a better idea to apply in my case than using hash function it would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ManyThanks,&lt;/P&gt;&lt;P&gt;Amine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 13 Mar 2017 08:37:43 GMT</pubDate>
    <dc:creator />
    <dc:date>2017-03-13T08:37:43Z</dc:date>
    <item>
      <title>How to apply a hash function to all fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-a-hash-function-to-all-fields/m-p/1258015#M849872</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I'm new in QV community. I'm trying to load all fields from a QVD and i want to apply the hash function.&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;Let's assume that we have a high number of fields.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;QlikView doesn't accept this syntax : hash128(*).&lt;/P&gt;&lt;P&gt;Can anyone tell me how to bypass this ?&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-a-hash-function-to-all-fields/m-p/1258015#M849872</guid>
      <dc:creator />
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply a hash function to all fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-a-hash-function-to-all-fields/m-p/1258016#M849873</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Amine,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See comment &lt;A href="https://community.qlik.com/people/swuehl"&gt;swuehl&lt;/A&gt;‌&lt;STRONG style="font-size: 11.7px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; &lt;SPAN style="font-size: 13.3333px;"&gt; &lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;in this topic &lt;/SPAN&gt;&lt;A href="https://community.qlik.com/message/1227721"&gt;hash128() without knowing the number of fields&lt;/A&gt;‌. Probably this is what will help you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Andrey&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 14:45:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-a-hash-function-to-all-fields/m-p/1258016#M849873</guid>
      <dc:creator>ahaahaaha</dc:creator>
      <dc:date>2017-03-10T14:45:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply a hash function to all fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-a-hash-function-to-all-fields/m-p/1258017#M849874</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is no real "bypass" for this. Hash128() will accept a variable number of expressions, but * is not an expression. It's just a wildcard character that you can only use in very specific places (and not as a parameter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The best thing to do is - as suggested in many other discussions - to enumerate your column names and glue them together in a comma-separated string, then use $-sign expansion to put that list of column names as parameter list in a call to Hash128().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Fortunately you're trying to read from a QVD. QlikView offers very useful functions to lift the metadata from a QVD file (without reading the entire QVD row set). See &lt;A href="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/FileFunctions/file-functions-script.htm" title="http://help.qlik.com/en-US/qlikview/12.1/Subsystems/Client/Content/Scripting/FileFunctions/file-functions-script.htm"&gt;File functions ‒ QlikView&lt;/A&gt; (everything that starts with Qvd is of interest to you).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Imagine that you have a QVD file file called HugeDataFile.qvd in the current directory. The following code can be used to create any parameter list from an unknown number of columns:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;SET vQVDPath = .\HugeDataFile.qvd;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 13.3333px;"&gt;// First one here to avoid comma mess&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LET vFieldNames = '[' &amp;amp; QvdFieldName(vQVDPath,1) &amp;amp; ']';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier; font-size: 13.3333px;"&gt;// Add all others separated by commas&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FOR i = 2 TO QvdNoOfFields(vQVDPath)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;&amp;nbsp; LET vFieldNames = '$(vFieldNames), [' &amp;amp; QvdFieldName(vQVDPath, i) &amp;amp; ']';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;NEXT&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;// Now use the content of vFieldNames in a function call or a LOAD statement&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;BigTable:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;LOAD *, Hash128($(vFieldNames)) AS TableHash&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'courier new', courier;"&gt;FROM [$(vQVDPath)] (qvd);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note that calculating hashes on a large number of column values is not the most efficient way to use cpu cycles and/or RAM. Are you sure you cannot use a known primary key to streamline this process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 16:07:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-a-hash-function-to-all-fields/m-p/1258017#M849874</guid>
      <dc:creator>Peter_Cammaert</dc:creator>
      <dc:date>2017-03-10T16:07:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to apply a hash function to all fields</title>
      <link>https://community.qlik.com/t5/QlikView/How-to-apply-a-hash-function-to-all-fields/m-p/1258018#M849875</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your answer that's exactly what i was looking for.&lt;/P&gt;&lt;P&gt;And no, i cannot use a known primary key to streamline this process for the simple reason that i have a variable number of QVD files in input. Also, the primary key column is not always in the first order. That's why am looking to make a hash column. But if you have a better idea to apply in my case than using hash function it would be great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ManyThanks,&lt;/P&gt;&lt;P&gt;Amine&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Mar 2017 08:37:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/How-to-apply-a-hash-function-to-all-fields/m-p/1258018#M849875</guid>
      <dc:creator />
      <dc:date>2017-03-13T08:37:43Z</dc:date>
    </item>
  </channel>
</rss>

