I have a sutielet script that takes csv file and i...
# suitescript
d
I have a sutielet script that takes csv file and its content with JSON.stringify and put it in a map reduce parameter and then in MR script i take the parameter value (long array of objects and parse it) each object will do some process in MR script) for now I do it with long text field parameter in MR script, but the limit there is 1,000,000 chars. any suggest how can I take over the limit? maybe other field type ?
b
You could just save the file in the file cabinet if it's not already there and pass the id of the file to the map reduce script rather than the file contents, the map reduce script then can load the file
1
Of course you then would need to be aware of the individual file size limit
1
b
you may not actually need to be aware of the file size limit, you can save file larger than the limit if you dont create it yourself
and the getInputData function can return a reference to a csv file that it automatically parses
d
So what i did is in suitlet i upload the file to file cabinet and pass the file id to the map reduce script, then in the map reduce i get the data from the csv file and start the process. 10MB for file.create is more then enough for me.