cancel
Showing results for 
Search instead for 
Did you mean: 

How to Mask or Encrypt a particular column of a table In SAP HANA

former_member462348
Participant
0 Kudos
782

Hi All,

I have a requirement to Mask a particular columns of a table. I have a table MASK_DATA and i need to mask/encrypt the column "Password" so that no other users can see this column information.

I could not able to achieve this with the below command. any suggestions on how to mask single or multiple columns of a table in HANA ??

ALTER TABLE "TMP_SCHEMA"."MASK_DATA" ADD MASK ("PASSWORD" USING '****');

Thanks
Rufus Samuel

Accepted Solutions (0)

Answers (1)

Answers (1)

pfefferf
Active Contributor
0 Kudos

Data masking for tables is available since HANA 2.0 SPS03 (so on your system with SPS02 it is not available). Since 2.0 SPS01 it is available for calc. views, if that is an option for you to provide read access via a calc. view.

former_member462348
Participant
0 Kudos

Hi Florian,

Thanks for your quick support 🙂 .

I tried creating the View based on the table "MASK_DATA" as you suggested and tried Masking the same column. but still i its not Masked.

CREATE VIEW MASK_V AS SELECT * FROM "TMP_SCHEMA"."MASK_DATA" WITH MASK ("PASSWORD" USING '****');

Am i missing anything here.

Thanks
Rufus Samuel

pfefferf
Active Contributor
0 Kudos

Did you do the query with the same user who created the view? If yes, then you will have the unmasked privilege for the view already.