Relational API data

Sorry if this is redundant to another post but couldn’t find anything so far, looking for help on how to think through this problem.

I’m creating a job board and I have jobs and related companies that are stored in a SQL database. I know how to get the data from the two tables independently through the API connection but how do pull it in relationally? In other words maintain the relationship of the company to the job. I have used basic API connections to pull in individual tables but I haven’t tried bringing in relational data through a Bubble API before.

Another route I’m thinking of going is bringing the data into the Bubble DB job and company tables through the API using a backend WF, but then how do I create the relationships for the newly loaded data? Can I use a unique field to link them when I load them? The other issue is that many of the companies will stay the same so I don’t want to create duplicates, I want to link to the existing company if it already exists in the DB.

Thanks!

@paul.dalpozzo did you figure anything out? I’m also trying to pull relational data in via API rather than the networked record’s ID.

We found something that works. Not sure how it scales but… Basically we open an API connection as if you were sharing the data out of the bubble DB externally then we created a script to Post the data out of the SQL DB into the bubble. You still have to generate a unique ID (key) for the data in SQL, but the bubble data structure works. For instance you can do the search for jobs that are related to a company native. The next thing we are working on is doing a differential DB load so you only update records that change so you don’t have to do a complete DB replace. Hope this helps!