@kbaswaraj no, there is no way to access anything outside the scope of the function other than what gets passed in. There are a few technical reasons for that, like we need to make sure this code is compiled down in the V8 engine and we don’t have external drivers for different systems baked in. Also, you don’t know on which machine your map/reduce functions get executed, since every data node will perform its subset.
If you want to do something more involved, I recommend you to take a look at for example the Spark module where you can generate an RDD out of a view result and then you enrich the data with info from mysql, hdfs, nfs, and store it back into couchbase or do something else with it.