I have a map reduce that has 2 data sources. Both ...
# suitescript
s
I have a map reduce that has 2 data sources. Both are too large to cache (which I found on the full data run after testing) Currently in the map phase, I am using what is used in the context, with what I was caching and creating a new key value that is used in the reduce phase. Is there a way to return both items to the map, or a way that I can not worry about limit but still access it in the map phase? I still want to run both searches in the get input phase so that I do not run it more than once each
b
be more clever about making your search or query
if you arent going to hit governance limits, then you can run both searches in getInputData
otherwise getInputData only allows you to return one search object
s
If there is a relationship between the two data sources (assuming neither of them is from a File or web service call), then you may be able to combine them together into a SuiteQL query in the getInputData phase. How many results/elements are in each data source?