[SERVER-3794] Allow to access BinData binary value from MR Created: 09/Sep/11  Updated: 16/Oct/21  Resolved: 23/Jul/21

Status: Closed
Project: Core Server
Component/s: JavaScript, MapReduce
Affects Version/s: 1.8.3
Fix Version/s: None

Type: New Feature Priority: Minor - P4
Reporter: Stefan Podkowinski Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Done Votes: 3
Labels: bson, mapreduce,, move-sa, platforms-re-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-43411 add base64 and UUID conversion functi... In Code Review
is related to SERVER-43411 add base64 and UUID conversion functi... In Code Review
Participants:

 Description   

Synopsis: please add BinData.getBytes() to be able to deal with BinData value easily from MR

Currently the only way to access the value from a BinData object in your javascript map/reduce job seems to call base64() and decode the value using a custom js function. This is especially inconvenient in cases where you have certain fields packed in your _id (such as customerId, year, month, day in my case) and want to mask out parts of the _id to derive a new key for MR. This would be really easy to do if there was a BinData.getBytes() function returning an array of numbers.



 Comments   
Comment by Asya Kamsky [ 23/Jul/21 ]

Map Reduce is now implemented via aggregation. This request is probably related to SERVER-43411 request for agg.

Generated at Thu Feb 08 03:04:04 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.