Search
K

Create resource queries

1. Navigate back to the home page:
Retool page
2. Edit the Sample Users Page:
Retool home page
3. Delete all the resource queries shown by clicking on the 3 side buttons next to the query name, users, and clicking on the Delete button:
Retool sample users page
4. Add a new resource query by clicking on the New drop-down and choosing the Resource query option:
Retool sample users page
5. Once you add the new query, pick the resource we created earlier, rockset-base-API:
Retool sample users page
6. Choose the POST under Action type:
Retool sample users page
PAGE SWITCH: We'll be grabbing the API endpoint on Rockset
7. Rockset side: After the base URL, copy the endpoint of the second half of the URL that we didn’t use when we created the resource rockset-base-API: /GetAllUsers/tags/latest
Query Lambda API details
PAGE SWITCH: We'll be putting the API endpoint on Retool
8. Retool side: Paste the API endpoint we just grabbed and put it in the second box of the resource:
Retool sample users page
9. Rename the resource query GetAllUsers (naming has to be camel case) and Run it:
Retool sample users page
10. If you get any errors, check to make sure the resource query was created correctly, you have the right API key, and so on.
11. REPEAT steps 4-10: Do this for all the query lambdas we created on Rockset. The query names should be the same name as the Query Lambdas. When you’re done, your resource queries should be successful (when you run and test it) and look like this:
Parameters:
You'll notice some Rockset queries require parameters. The queries that require parameters should run successfully without adding them on Retool because there is a default value associated with each query.
We'll add parameters in the query resource in Retool in the next section- don't worry about it now.
Retool sample users page
NOTE: You can find us on the Rockset Community if you have questions or comments about the workshop.