How do I connect two tables? (Node / NextJS)

Hi this might be a fairly beginner question, and more programming specific than Airtable but if anyone could help, I’d appreciate it.

When I make a request to my base and main table, I’m able to get a response but within it are only ID’s of linked records on other tables. I can’t figure out how to get the actual data within the arrays.

For example, instead of IDs in the authors array, I’d like to get the actual data within the Authors table there. I figure I’d make a request to the Authors table, and then have to group them together with map & find somehow. Same for Genre.

{1 id: "recYt9GrRjvpVcX0p" fields: { subtitle: "How We Misthink Money and How to Spend Smarter" Thoughts: "Best book ever yay" Start Date: "2021-01-11" Status: "Completed" End Date: "2021-01-14" Authors: ["recquUajrIfbpR6vU"] Genre: ["rechPpsFS3LQyaZkg"] title: "Dollars and Sense" Days to Complete: 3}

I’d appreciate the help.

Been using Airtable as the database to work with our Node API for about a year and we’ve just created our own populate() function which takes these linked IDs and does another fetch to Airtable to grab those linked records and merge it back into the object.

As you can imagine this can result in some really slow response times based on your data and how many linked records you are trying to return and “populate”

This is how we’re doing it but would love to know if there is an easier/more performant way to do this

We hit the same snag! SQL makes this kind of query super easy so we built a service:

Check it out - would love to hear what you think.

Thank you! To my understanding, I hook up Airtable to Sync, write the SQL queries, and then use Sync as my main endpoint?

I can’t say it’s the most ideal, as I assume it affects delivery time but I’m happy to try it out. Thank you

Thanks for checking it out @legendairy!

So far, it’s looking like we are as fast or faster than the API on reads :rabbit: especially for the kinds of nested calls (i.e. lookups) that you’re looking for.

Appreciate it!

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.