Bulk upload csv to multiple things - related tables

I have two (things) tables -

  1. “Business listing” - which has list of fields like name, address and images- which is another data type in bubble called “Business images” which has url of images of the business. When i do a bulk upload how do i upload the 2 csv into 2 of these separate related data types while maintaining the relation. How do i link these 2 separate fields?

I also need help with this. :frowning: Did you find an answer? Even if I name the fields in my CSV exactly, the uploader isn’t smart enough to create two types of linked data at once.

Hey @abby_hc, here’s a possible solution. I’ll do my best to have it make sense by way of example.

Let’s say you have two database tables about Users and about Companies. You have a relationship between the two that shows which Company a given User works at by having the field of Company on the User’s record.

Now let’s say you want to bulk upload the User table so you can fill in which Company each User works at. Well, first setup two things in your Bubble’s backend by navigating to Data > App data.

Thing 1 to update - in the view of the User records, make sure that Company is a column and that Unique ID is a column being displayed. Then on the bottom right, if it gives you the option, click “Load 50 more items” until there are no more to load.

Thing 2 to update - there is a button that says Primary Fields in the App data area. Do a ctrl + f searching “Primary” if you don’t see it right away. Click that and make sure that end Company field (or whatever field is being linked from database table 2 to database table 1), is set to “unique id”. With these two things updated, then export the view.

Now you have a CSV you can edit and you’ll want to fill in the value of Unique ID for the Company in the Company column (again, swap Company with whatever it is in your situation). Note the Unique ID of the Company column is not to be confused with the actual Column of Unique ID that is there for the User’s Unique ID since you’ve exported a User table.

Also note, an easy way to get the Company Unique ID’s is to export the Company table with just two columns of the Company Name and Unique ID. Once you’ve filled in the User table with the associated Company’s Unique ID’s, import that by choosing Modify.

It’s important to note that when mapping the fields, Unique ID here is speaking to the Unique ID of the Users since you’re importing a User table. Bubble needs this Column on your import file to know which records it is editing or else it will create duplicate User records, which is no bueno.

You can also check out this tutorial though it may be less suited to your exact situation https://www.youtube.com/watch?v=OfWMa_dP7wM.

Cheers.

1 Like

I will try this – but it doesn’t look like there would be an option for a user to upload this without getting into unique IDs with them, is that right? I found this plugin – 1T - CSV Uploader Plugin | Bubble but haven’t been able to make it connect to two types. But it’s early yet.