HDL – Delete Person Email addresses
Use below SQL query to extract email addresses data in HDL format to DELETE the data:
SELECT DATA_ROW
FROM (
SELECT 'METADATA|PersonEmail|EmailAddressId|PersonId|DateFrom|DateTo|EmailType|EmailAddress|SourceSystemId|SourceSystemOwner' AS DATA_ROW
FROM DUAL
UNION all
select 'DELETE'||'|'||
'PersonEmail' ||'|'||
pea.email_address_id||'|'||
pea.person_id ||'|'||
to_char(pea.date_from,'RRRR/MM/DD')||'|'||
to_char(pea.date_to,'RRRR/MM/DD') ||'|'||
pea.email_type ||'|'||
pea.email_address ||'|'||
(select email_hrc.source_system_id
from hrc_integration_key_map email_hrc
WHERE pea.email_Address_id = email_hrc.surrogate_id) ||'|'||
(select email_hrc.source_system_owner
from hrc_integration_key_map email_hrc
WHERE pea.email_Address_id = email_hrc.surrogate_id) AS DATA_ROW
from per_email_addresses pea
)
If you only want to update the email addresses not delete them, then use refer below post:
HDL – Email Data Obfuscation in Test environment – Welcome to Fusion HCM Consulting