Forum Discussion
akidave
8 years agoEmployee
A document should not be modified once it has been written to the output view. Making a copy of the document avoids issues. Change the loop to create a new wrapper Map
for item in sourceTables:
wrapper = java.util.HashMap(in_doc)
wrapper['query'] = "update iods_staging.{} set record_inserted = true;".format(item)
self.output.write(wrapper)
aditya_sharma
8 years agoNew Contributor III
Hi Akidave,
Thanks you so much for your solution. However, I would really appreciate if you could explain me more why we should not modify the document once it has been written to the output view.
Thanks again.
Aditya
Related Content
- 6 months ago
- 3 years ago
- 4 years ago
- 3 years ago