Help

Left Join / Lookup

Topic Labels: API
1704 2
cancel
Showing results for 
Search instead for 
Did you mean: 
George_Nelson
4 - Data Explorer
4 - Data Explorer

Hello,

I’m trying to understand the AT API when it comes to getting the values of a linked table.

For example, in Table one I have the following fields:
ID
Entity Name
List of Part IDs

In Table 2 I have the following fields:
ID
Part Number
Part Name

So when I create the URL to pull the values in Table 1, how do I “lookup” and show the Part Number and Part Name from Table 2 for each Part ID in Table 1?

I’m new to Airtable, and have spent hours and hours trying to figure this out, but so far have been unsuccessful. All help will be greatly appreciated.

Thanks,
George

2 Replies 2

Hi George, and welcome to the community!

The API doesn’t expose data in its linked form; it provides only the raw data. As such, you must perform all of the relational logic in the script environment; ergo - you must request both tables - the primary and related linked table and then mash them together.

Yeah, that sucks, right?

The only way I have been able to overcome this is to enhance the API with a logical GraphQL layer and that’s a lot of work. One client of mine was building so many API integrations with many developers that a GraphQL layer actually made practical financial sense. But if it’s just you and two related tables, strap in and enjoy the wild ride building a process that iterates across the primary table and uses the record IDs exposed in the linked fields to match up with the secondary table.

Thanks @Bill.French. Not the answer I was hoping for. LOL. At least I know I wasn’t crazy. GraphQL is beyond my current experience, so based on your explanation think I’ll go a different route. :frowning:

Thanks again!