Skip to Main Content

hash Identity number in replicat

User_HCCQDDec 17 2021

hello
we have in origin a table like
em_id | name | DNI
and want to ofuscate or mask the DNI column in a legible format in destination
em_id | name | DNI_hash
I have used mapping DNI=@ogg_sha1 (dni) but the result is ilegible, and we have to work with this column

ID_PEDID DNI APELLIDOS ID_PRODU DNI_HASH
-------- -------- ---------------------------------------- -------- ------------------------------
12365 1520895 myno3 1 ]W'??`?;?d?A
12368 1521264 myno3 1 W8\-N?q)=???
12364 1520772 myno3 1 @??>k?6_??Dy2??Q
12369 1521387 myno3 1 ???jw?U??pA???0?
12363 1520649 myno3 1 ????<???q????`?

I have tried to use now ora_hash function that seems to be more friendly
SQL> select ora_hash (sysdate) from dual;

ORA_HASH(SYSDATE)
-----------------
349229865

SQL> r
1* select ora_hash (sysdate) from dual

ORA_HASH(SYSDATE)
-----------------
1528683582

but I dont know how to build the mapping. Any one helps me? thanks in advance
MAP soe.pedidos, TARGET soe.pedidos_ama, SQLEXEC ( QUERY 'select ora_hash (DNI) from soe.pedidos'); <<<<<< NOT WORKING

Comments
Post Details
Added on Dec 17 2021
1 comment
10 views