How do I join data from different Firestore collections into a single table?

  • Goal: Show data from multiple Firestore collections in a single Retool table.

  • Steps: I have merchant, activity, pricing, users, and booking collections. each Booking collection has IDs from merchant, activity, pricing, and user collections. I would like to show the merchant name, activity name, pricing description and price in the booking table.

  • I looked at the older issue where event handlers were used to create a join in retool. However, the UI has since changed, and I tried copying it, and it did not work.

This is the step I followed

Step 1: Created getMerchant, getBooking, getActivity collections (This worked)
Step 2: Added on success trigger for getBooking query to execute getMerchant
Step 3: Tried to add join but could not find a way to add join in event handler
Step 4: Created a new resource (Query JSON on SQL) and created this SQL query.

select * from {{ getBooking.data }}
join {{ getMerchants.data }} as bm
where _id = bm.merchantId

Attachments