Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
shekhar_analyti
Specialist
Specialist

how to create a transformation subroutine only for one column of table for security purpose ?

Hi All ,

I have requirement in two parts :

a) How to create a  transformation subroutine only for one column of table for security purpose for first 5 numbers/letters ?
b) Transformation logic changes day wise .

  

first_namelast_nameCREDIT CARDNbrDate_of_Use
KerrillStenningswitch490349039171156022-01-2017

So credit card number should be twiked to something like this

First number from 4903490391711560 is

Logic based on Day 7th since 22/02/2017


4 + 7 (because 22 jan 2017 was 7th day of that week) = 11

9 + 1 (1st month of year) = 10
0 + (11+10) = 21
3  * 16 (Total length of Nbr) = 48

4 * 5 ( even 5 number is even then multiply by next upper odd number , if odd then add 6) = 20


Hence

4903490391711560 changes to ---------> 111021482090391711560


Logic based on Day 6th


4 + (6*2)  (because 21 jan 2017 was 6th day of that week) = 16

9 + 1 (1st month of year) = 10
0 + (11+10) = 21
3  * 16 (Total length of Nbr) = 48

4 * 5 ( even 5 number is even then multiply by next upper odd number , if odd then add 6) = 20


4903490391711560 changes to ---------> 161021482090391711560


Similarly there are different logic for all seven days of the week @


Thanks & Regards

Shekar

20 Replies
Peter_Cammaert
Partner - Champion III
Partner - Champion III

Examples:

Using Macro functions in Script

Re: how to create a user defined function?

The latter post is followed by one by Massimo who explains how you can get the same behavior using $-substitution techniques (UDF)