Hello @Himanshu Garg ,
Thanks for the ask and also using the Microsoft Q&A.
ADF does not have any function for masking the data , but since you mentioned that you have the source as SQL and Postgres ,
you can make some updates with the query and hopefully it should work out with , please have the look in the query below , you can use something similar on the Source side and it should do the trick .
CREATE TABLE MaskingTest
(
CC bigint
,SSN varchar(100)
)
INSERT INTO MaskingTest values (1234567812345678,'123-23-1122')
SELECT *
,SUBSTRING(CONVERT(VARCHAR,CC),1,1) + REPLICATE('X',LEN(CC)-1) AS [MASKED-CCC]
,SUBSTRING(CONVERT(VARCHAR,SSN),1,1) + REPLICATE('X',LEN(SSN)-1) AS [MASKED-SSN]
FROM MASKINGTEST
CC SSN Masked-CCC Masked-SSN
1234567812345678 123-23-1122 1XXXXXXXXXXXXXXX 1XXXXXXXXXX
Let me know how it goes .
Thanks Himanshu
Please do consider to click on "Accept Answer" and "Up-vote" on the post that helps you, as it can be beneficial to other community members