Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
priyarane
Specialist
Specialist

AutoNumberHash256

Hi Community,

I am using below composite key but it is taking lot of time.

AutoNumberHash256(field1,field2,field3,field4,field5,field6,field7,field8,field9) as key

Please suggest is there any way to create key instead of above.

-Priya

4 Replies
ahaahaaha
Partner - Master
Partner - Master

Hi Priya,

May be as variant

field1&'|'&field2&'|'&field3&'|'&field4&'|'&field5&'|'&field6&'|'&field7&'|'&field8&'|'&field9 as key



Regards,

Andrey

prma7799
Master III
Master III

U can try

AutoNumber (field1&'|'&field2&'|'&field3&'|'&field4&'|'&field5&'|'&field6&'|'&field7&'|'&field8&'|'&field9) as KEY



prma7799
Master III
Master III

From the QV Help file, which should be your first option:

autonumberhash128( expression {, expression} )

Calculates a 128-bit hash of the combined input expression values and the returns a unique integer value for each distinct hash value encountered during the script execution. This function can be used e.g. for creating a compact memory representation of a complex key.

Example:

autonumberhash128 ( Region, Year, Month )

Autonumberhash256( expression {, expression} )

Calculates a 256-bit hash of the combined input expression values and returns a unique integer value for each distinct hash value encountered during the script execution. This function can be used e.g. for creating a compact memory representation of a complex key. This function is only available as a script function.

Example:

Autonumberhash256 ( Region, Year, Month )

fkeuroglian
Partner - Master
Partner - Master

Pria how are you?

You can create:

field1&'|'&field2&'|'&field3&'|'&field4&'|'&field5&'|'&field6&'|'&field7&'|'&field8&'|'&field9 as key

AutoNumberHash256(field1,field2,field3,field4,field5,field6,field7,field8,field9) as key

AutoNumber (field1&'|'&field2&'|'&field3&'|'&field4&'|'&field5&'|'&field6&'|'&field7&'|'&field8&'|'&field9) as KEY


Any of this will be create a key, but is more efficient us AUTONUMBER


Using this way, you will save a bit of memory.

AutonumberHash creates unique hashed numbers, however they are not sequential integers, therefore the memory savings will be substantially lower.

Hope Help