Hi all, I am new to suitescript and have a doubt r...
# suitescript
p
Hi all, I am new to suitescript and have a doubt regarding how map reduce script works. If I am using 5 queues for my script and they are 5 records to be processed, now in the map stage how the grouping by key and value happens internally. As per my understanding they will be a global map and when a record is processed on a queue, the key and value of the record are extracted and update happens to the global map. But if all the 5records are processed parallelly in each separate queue how the global map is updated consistently without loosing any information. If the updates then happen sequentially how are we benefiting from map/reduce script in a such case. Correct me if my understanding is wrong.
b
the keys/values for the from the getInputData are not updated
the map entry point processes each key/value once
and if you use the write method, then another grouping of keys and values is created
the original keys/values from the getInputData step are not modified
on a more practical level, the values from the getInputData are likely to be lost if you dont write new key/values in the map stage
the values are only available between consecutive stages. For example you wont be able to retrieve the values returned from getInputData in the summarize stage
p
Thanks for the explanation 👍