I have a functioning code through which I update the query text through SSJS. This is working as expected. I am trying to expand on this and want to update the target Data extension as well. Is this possible? I have a template query and using that would like to use it for multiple languages and then create separate data extensions with that data through execution of that query.
I was trying to achieve this through the below code.
var update_status = qd.Update({
Name: queryName,
QueryText: query,
TargetUpdateType: "Overwrite"
TargetType: "DE",
Target: {
Name: languageDEName,
CustomerKey: languageDEKey
},
});
var perform_status = qd.Perform();
Would really appreciate any pointers or guidance.