I’m fairly new to mockaroo, but I am being stumped by this one.
I have a generated dataset that contains a mongo id, that I’m using as a primary key and a second mongo id that I want to perform a lookup against.
Here is the formula:
from_dataset(“license”, “_id”, driverID: userID)
Getting this error:
“Error evaluating from_dataset(“license”, “driverID”, “{“driverID”:{”$oid”:“66435f59e10537ef2d0d1b6e”}}"): Empty: no JSON found"
If I change the formula to : from_dataset(“license”, “_id”, driverID => userID)
I get this error: “error: Field ‘driverID’ not found”
I can pull random records from the license dataset, using the column type "dataset column’, but in this use case I need to find a match.
license dataset sample:
{"_id":{"$oid":“664f9430e10537f0a3679abd”},“driverID”:{"$oid":“66435f59e10537f0a3679974”},“status”:“active”,“issueState”:“FL”,“number”:“ER92102271B247”}
driver dataset sample:
{"_id":{"$oid":“66435f59e10537f0a3679974”},“userID”:{"$oid":“66435f59e10537f0a3679974”},“status”:“active”,“startDate”:{"$date":“2024-07-04T14:55:56.000Z”},“yearsDriving”:12,“rates”:[{"$oid":“664b6e60e10537f11e8f5056”}],“marketingDesc”:“Morbi non lectus. Aliquam sit amet diam in magna bibendum imperdiet. Nullam orci pede, venenatis non, sodales sed, tincidunt eu, felis.”,“license”:“Error evaluating from_dataset(“license”, “_id”, “{”{\”$oid\"=\u003e\“driverID\”}":{"$oid":{"$oid":“66435f59e10537f0a3679974”}}}"): Empty: no JSON found"}
Any direction would be greatly appreciated