Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Qlik Community
Is it possible to Hash or 'scramble' a field after it is loaded?
Let's say I've loaded my datamodel in the following qvs file: data_model.qvs.
Can I then hash a field like salery_key with a hash funciton after the model is loaded or do I have to do it when I load the field in the table the first time?
I hope it makes sense.
Casper
At the end of your script, use the AutoNumber statement on the field(s) you want to obfuscate:
Autonumber Myfield1;
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
As far as I know, there's no scrambling option for QS on the front end (QV has a Scrambling option). You'd need to do this in your script - it doesn't have to be in the original Load statement the field appears in, you can e.g.
Temp:
Load Field1, Field2 From YourTable;
Final:
NoConcatenate Load Field1, autonumberhash256(Field2) as Field2
Resident Temp;
Drop Table Temp;
But it does have to be in the script since that's when field values are populated.
On the front end, you could scramble the value in a master dimension, but the underlying value would still be available in the app so if this is meant as security it's not a good solution.
I did mean to hash it in the script and not the front end. My query was if I could hash a single field after I loaded the table.
You'd need another load pass, I believe. I'm not familiar with any other mechanism to achieve that. As far as I know, there's no concept along the lines of Scramble Field Fieldname; like there is with Drop or Rename.
Agreed, there is no Scrambling functionality in Qlik Sense such as the one in QlikView:
You would have to reload the app and then apply any of the Hash functions:
NOCONCATENATE LOAD
Hash128(FieldName) AS FieldName,
...
RESIDENT
Table;
If you cannot reload the app, you could still load it BINARY and then perform the scrambling actions.
At the end of your script, use the AutoNumber statement on the field(s) you want to obfuscate:
Autonumber Myfield1;
-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com
Thank you Rob.
That was the exact functionality I was looking for.