Jump to content
Changes to the Jaspersoft community edition download ×

Parameters in mapreduce


730.saurabh

Recommended Posts

I am new to mongodb.

I am trying to pass parameter to mapreduce but it gives error as following,

Setting up the file resolver... com.mongodb.util.JSONParseException:  {  'collectionName' : 'range',   mapReduce : { map : 'function () { if(this.user == {'select':null}){  emit (this._id,{userid:this.user.valueOf()}); } 
 
For some reason the parameter is returned as null. My map function is as follows,
map : 'function () {
                         if(this.user == $P{select})
                        {
                         emit (this._id,{userid:this.user.valueOf()});
                        }
                        }',
Can anyone please point out my mistake?
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...