Skip to main content
Announcements
Live today at 11 AM ET. Get your questions about Qlik Connect answered, or just listen in. SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
jleberre
Contributor II
Contributor II

Data masking

Hello

I would like to mask some data in sheets (instead of 123456789, display ******789).

The corresponding fields are used as dimension in graphs.

The data reduction hides completely the field, so it doesn't meet the needs.

And I'm currently testing the autonumberhash256() function which returns an unique value for each distinct input.

Does anyone have another idea?

Thanks!

8 Replies
devarasu07
Master II
Master II

Hi,

Currently we have in build data scrambling feature in qlikview but i'm not sure in qlik sense but you can try below alternative method to achieve it.

Scrambling Data

Scrambling Data

Hope this helps you

Regards,

Deva

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you just do something like:

'*********' & right(myfield,3) as MaskedField

in the script?

-Rob

http://masterssummit.com

http://qlikviewcookbook.com

jleberre
Contributor II
Contributor II
Author

It doesn't meet the needs in my opinion, because it could produce the same output for 2 different inputs. And scrambled fileds are used as dimension of graphs.

Thanks

jleberre
Contributor II
Contributor II
Author

Thank you.

What is the best solution:

- using Mapping?

- or a hash function?

I need to scramble phone number, so I'm testing autonumberhash256() function, instead of hash() function.

It should returns a unique integer value for each distinct hash value encountered during the script execution, according to Qlik documentation.

Can you confirm that given the same input, they will always produced a same unique output?

OmarBenSalem

would sthing like this work ?

load * , '**'&Replace(AutoNumber (left(field,6)),field,'*')&'***'&Right(field,3) as MaskedField;

load * Inline [

field

123456789

115356789

113566779

11348569

11348569548698

];

Capture.PNG

Or you can even do as follow :

Capture.PNG

=>

the field will contain new values :

Capture.PNG

jleberre
Contributor II
Contributor II
Author

I'm currently testing something like this:

'#####' & AutoNumberHash256(calling_phone_number)) as calling_phone_number

'#####' & AutoNumberHash256(called_phone_number)) as called_phone_number

It seems working, but to be confirmed.

I want to be sure that for a same input, it will always produced a same unique output:

- 123456789 -> #####1235

- 987654321 -> #####3256

- 123456789 -> #####1235

OmarBenSalem

But that won't keep the last 3 numbers; try out my solution, maybe you'll like it

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

There is no need to use the HashFunction. You can just use

AutoNumber()

and yes, you will be guaranteed a distinct value, within the same script run.

-Rob