I would like to upload a small dataset, and then use a Mockaroo API to return this dataset based on where clauses through the URL.
Consider this example, here is the URL:
/project/user_code/:username.json
Where :username is a username found in a static dataset inserted into Mockaroo. The API is based off a schema, that is strictly routed, 1:1 to this dataset.
So you come to this URL, pass the username, which goes to the API, which goes to the schema, which goes to the dataset, and returns a row, or rows where the column = the parameter :username.
This would pull the value of some_column from the dataset called “My Data” where the username column in the dataset matches the value of the username parameter in the query string of the API request.
From the docs:
from_dataset("dataset", "column", join_criteria) => Fetches a value from a dataset.
For example, from_dataset(“People”, “name”, id: person_id) returns the value of the “name” column from the “People” dataset where the id column matches the person_id column in the current schema.
I have a similar scenario. I have done what you suggested, use from_dataset() in a Formula column. Is there any way to limit the result to just the number of rows it matches?
Currently it goes by the # of Rows mentioned in the schema and repeats the data when there is less.
In other words, if my dataset has only 2 rows matching the request parameter, but the schema is configured to return 10 rows, it gives me 10 rows with duplicates.