Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!

masking column with JAVA script, need help for write statement.

Avatar

Level 2

Hi Team,

I am trying to write below code to make the column XML column as blank but it is not happening , could anyone suggest where I am going wrong.

---------------------------Java code -------------------------

var query = xtk.queryDef.create(

<queryDef schema= {vars.targetSchema} operation="select" lineCount={vars.recCount}>

<select>

<node expr="[target/ctx]" alias="data" />

<node expr="@id" />

</select>

</queryDef>

)

var res = query.ExecuteQuery();

for each (var tmp in res)

{

logInfo("DATA Id : " + tmp.@id);

logInfo("DATA : " + tmp.target.data);

logInfo("-----------------");

var Data = "";

xtk.session.Write(<eventHisto xtkschema="nms:eventHisto" _operation="update" id={tmp.@id} tmp.target.ctx={Data}/>);

}

-------------------------------

Thanks

Arif

10 Replies

Avatar

Level 5

Hi Arif,

Can you specify the desired output and which XML Column are you trying to make it blank?

with regards,

Richa Chaubey

Avatar

Level 2

Hi Richa,

The column is EVENT XML of schema eventHisto, I need to mask the column with blank value as GDPR ready process.

Thanks

Arif

Avatar

Level 10

Hi Arif,

I guess you duplicated your own post below, in order to the post to be put on top list?
I recommend to give up this post and go on the other one...

How can I mask CTX column in a schema (EVENT XML)

Regards

J-Serge

Avatar

Level 2

Hi Jean,

Yes you are right, but I would like to keep this one opened and I will close the other one. Hope that is fine with you.

Thanks

Arif

Avatar

Level 10

Hi Arif,

Of course, you can do as you want. But I remind you that the right approach for GDPR considerations is using the accessibleIf attribute in schema (extended schema) rather Javascript code. Moreover it is more secure, easy to maintain.

Regards

J-Serge

Avatar

Level 2

Hi Serge,

I agree and your solution looks quite easy to implement too, but since Business want's it that way so don't have much flexibility.

Thanks

Arif

Avatar

Level 10

Hi Mohammad,

You should explain to your managers/business managers why it must be done differently

Otherwise, people without admin rights can get the data that you need to mask, a Javascript workaround isn't sufficient.

Regards
J-Serge

Avatar

Level 4

Best practices to implement any data masking/hashing or encryption on the database level and not the application level while data is being pulled out the DB (possible cell-level encryption).

Avatar

Level 10

Yes, I agree with you, best practice being on the DB level AND the nderlying framework level (such as recent SQL Server Enterprise edition or Oracle Enterprise edition allowed, but not supported by standard editions; or doing some hash function such as SHA256 or encryption).

However many Adobe Campaign customers have only access to the application level (console, or API), so using the schema AccessibleIf could be enough in many cases, while On Premise, or customers having access to direct DB storage engine (with ETL tool) have to manage GDPR concerns...

Avatar

Level 4

We do use both the cell-level encryption and the SHA256 when data is sent to the vendors (EM, MPUSH, DM, etc.).The requirement was for the system users not to have the ability to view PII columns however some of the PII data is needed for the vendors.