Hi guys,
I am currently have a workflow containing a Javascript activity which is querying several data schemas such as nms:broadLogRcp and nms:trackingLogRcp to select
recipients and then query the result using xtk.queryDef.create function. After being able to query the results, I am writing to the nms:recipient schema, populating a field attribute on that table FOR EACH RECIPIENT in the schema using xtk.session.write function.
However as there is a large set of data involved and large number of recipients, this process is taking a very long time as I will have to loop through each recipient, then do the update which will populate the field in the data schema for each recipient. So i wanted to know if it is possible doing a batch/mass update using the xtk.session api. I am unable to do this in SQL due to not having the rights to perform SQL queries in the adobe campaign environment I am working in hence why I am using xtk.queryDef.
To make it simple, All i am doing is:
- selecting recipients from both nms:broadLogRcp & nms:trackingLogRcp tables (using xtk.queryDef.create)
- querying the results(using the ExecuteQuery function)
- A For each loop to iterate through all recipients
- Then using conditional statements to assign recipients a flag - This is when I am writing to the nms:recipient schema to populate field with the flag assigned for each recipient that has been iterated.
I would like to know how I can perform or it will be possible do a batch update on this which will reduce time in setting flags for all recipients. I know there is an Update Data activity available in the workflow but need to do this through javascript which is needed for doing aggregate counts for each recipient.
Thanks