Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

confidential data

all,

I have created a dashboard based on a datasource of which a part is confidential.  Is there a way to code this data in a script , so I'm still able to use it as normal data, but when I create a table (or something like that) I won't be able to interpret the confidential data?

6 Replies
mvanlutterveld
Contributor II

Re: confidential data

Hi,

You can multiply numeric data with a random number between 0 and 1 like: rand() * your_numeric_field. Also in het document properties tab Scrambling you can select the fields you want to treat as confidential.

Re: confidential data

Essentially you want to mask the data? there is bunch of different ways to do masking of data. There is this good blog you can use for the purpose:

Scrambling Data

Scrambling Data

I hope this helps

Best,

Sunny

Re: confidential data

Hi,

Try to encrypt it your own way or generate hash key for the same

Not applicable

Re: confidential data

Hi All,

the data I would like to scramble or mask is only alphanumeric data like names. Masking is a nice way, but the number of 'names'  can vary widely, so I would be a lot of work to continuously update the mask-tables. I also tried the crypt-feature (document-properties), but when I reload the data I have to redo this feature. I can live with the outcome of this default feature, but is there a way to apply it continuously?

Re: confidential data

Is randomly assigning a number to each name would suffice?

What I have done lately is something like this:

Table:

LOAD Name,

          'Name ' & AutoNumber(Name) as [Masked Name]

FROM xyz;

This allows you to assign a random number to each name within your database so for example

xyz will become Name1

def will become Name 2

and so on...

You don't have to manually prepare a masking table. This is dynamic in the sense that it will assign a new number to every distinct Name in your datasource. So if today you have 500 names you will have Name 1 to Name 500. And then in the future if the names increases to 5000, the script will itself create Name 1 to Name 5000.

HTH

Best,

Sunny

sohailansari201
Contributor

Re: confidential data

Here is the one I am using. Pretty simple replace function. Just copy paste and replace the FIELDNAME with you fieldname.

replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace( replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace(replace([FIELDNAME],'a','*'),'e','r'),'i','x'),'o','m'),'u','q'),'y','3'),'1','d'),'2','c'),'3','h'),'4','i'),'5','v'),'6','z'),'7','k'),'8','p'),'9','-'),'0','#') ,'A','$') ,'B','@') ,'C','=') ,'D','m') ,'E','G') ,'F','Q') ,'G','o') ,'H','x') ,'I','3') ,'J','6') ,'K','8') ,'L','9') ,'M','d') ,'N','m') ,'O','w') ,'P','z') ,'Q','o') ,'R','l') ,'S','h') ,'T','e') ,'U','%') ,'V','*') ,'W','*') ,'X','c') ,'Y','k') ,'Z','?') AS FIELDNAME

Community Browser