Hello:
What I am trying to do is to add additional data to a query result(any data source including file import as well) using javascript, but I can't seem to find the solution for it.
For example:
Step1. Query a table "source", then I got some data back
Step2. using javascript to add another column to the result, say "newColumn" with value "aValue"
I could achieve this by create additional data through enrichment, then set the value to be empty, and then in javascript, i simply do a sql update with the id. This works perfectly fine, however, in our case, this value should be populated dynamically, and we don't want to create this "dummy" column manually in enrichment everytime.
I have tried using alter the temp table by using "alter tempTable add newColumn NUMBER(10)" in javascript, the execution does not throw any error, however, the "newColumn" is not available in the output(by clicking the "display the target"). I think I need to probably modify the schema in order for it to be available through "targetData"
Any ideas?
Thanks