Managing Bulk data through Scripting
In NetSuite we have SuiteScript 2.0 which gives us flexibility and new feature with the help of which we can process large amount of data within NetSuite. As a NetSuite solution provider, we are here to tell you more in depth about the Map/Reduce which is a Super Set of pre-existing Scheduled Script. We as a NetSuite training and NetSuite implementation provider discuss you about the different stages of MapReduce and how do they work and there several advantages.
There are several advantages of using Map/reduce
- Distributed Processing
- Automatic Governance limit management
- Error Handing
- Better Yielding
- Processing data in stages in parallel.
You can control the script’s behaviour in four of the five stages. That is, each of these four stages corresponds to an entry point. Your corresponding function defines the script’s behaviour during that stage. For example:
- For the getInputData stage, write a function that returns an object that can be transformed into a list of key/value pairs. For example, if your function returns a search of NetSuite records, the system would run the search. The key/value pairs would be the results of the search: Each key would be the internal ID of a record. Each value would be a JSON representation of the record’s field IDs and values.
- For the map stage, we can optionally write a function that the system invokes one time for each key/value pair. If appropriate, your map function can write output data, in the form of new key/value pairs. If the script also uses a reduce function, this output data is sent as input to the shuffle and then the reduce stage. Otherwise, the new key/value pairs are sent directly to the summarize stage.
- For the reduce stage, we write a function that is invoked one time for each key/value pair that was provided by the shuffle stage. Optionally, this function can write data as key/value pairs that are sent to the summarize stage.
- In the summarize stage, function can retrieve and log statistics about the script’s work. It can also take actions with data sent by the reduce stage.
Reference : netsuite.com, netsuite help and netsuite guide.
contact us at:
Email : firstname.lastname@example.org