[SERVER-43411] add base64 and UUID conversion functions or add BinData $convert Created: 23/Sep/19 Updated: 06/Feb/24 |
|
| Status: | In Code Review |
| Project: | Core Server |
| Component/s: | Aggregation Framework |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Asya Kamsky | Assignee: | Henri Nikku |
| Resolution: | Unresolved | Votes: | 2 |
| Labels: | query-offsite | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Assigned Teams: |
Query Optimization
|
||||||||||||||||||||||||
| Sprint: | QO 2024-02-05, QO 2024-02-19 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Case: | (copied to CRM) | ||||||||||||||||||||||||
| Description |
|
Since $convert doesn't work with BinData types, and there are no helper functions for binary data, nor for UUID in particular, it's very difficult to do something like converting UUID that's stored as a string to a proper BinData format. Example: I have string "867dee52-c331-484e-92d1-c56479b8e67e" and I want to have UUID("867dee52-c331-484e-92d1-c56479b8e67e") which is BinData(4, "hn3uUsMxSE6S0cVkebjmfg==") and there doesn't seem to be a way to do that server-side. |
| Comments |
| Comment by Michael Struening [ 14/Nov/23 ] |
|
I have a customer who wants to convert fields to BSON via the Kafka connector and could use this feature. |
| Comment by David Griffith [ 06/Nov/23 ] |
|
Hi folks, IHAC who needs this in order to convert Binary UUID fields to strings using App Services Event Bridge Triggers. As they are using a Infrastructure as Code solution they do not currently have access to deploy functions, and this ticket would allow them to do the concersion in the $project expression |
| Comment by Asya Kamsky [ 31/Aug/21 ] |
|
same for going to string from BinData type.
|