CSV import (again)

Hi

I have tried to find the solution for this but it seems like an impossible task to perform in bubble.
I want to be able to

  • allow users to upload csv file with any amount of data
  • import new or update existing values in the db.
  • does not have to be done immediately, but possible to schedule

I found ways to upload new values to db. It kind of works.
But how do I update like a 1000 existing values in db?
How do I use unique id?
I have tried to use “_id” as it was in downloaded csv file, “unique id” and others but all fail.
I just get an error:
The column Unique id does not match with a field on the chosen type.
image
In import file:


I have tried with , and ; as separators. Does not help.

It is kind of a big showstopper for me.
Users should be able to mass update values in db. It is often much easier to work with excel and import data. Updating of prices or descriptions in bulk is the very common thing.

I am considering using Xano or some other API backend, but prefer not to.

Any good ideas? Videos?

Thanks

1 Like

Wanna chat about a custom solution?

I’m on a project where the plugin 1T - CSV Uploader is used. It works well. Check the video walkthrough to get an impression of what it can and cannot do.

Of course it might not cover all of your requirements like a custom solution can.

2 Likes

Hi @gerbertdelangen
I have already tried that plugin, but did not get it working with unique id. I mean updating the values. Upload of new rows worked fine. I might have done something wrong. I will check it out again.

1 Like

@vitali,

Here is an example of how you can set up 1T - CSV Uploader:

  1. Example, there is a table with a list of countries which sometimes needs to be updated. For that I’ve created datatype CSV_country_upload to temporarily save the uploaded data to, which then is used to change the records in the country table.

image

  1. A CSV-file with the updated countries

image

  1. I’ve created a page with the normal Bubble file-uploader and the “1T - CSV Uploader”.

  1. The field “FIELD NAMES” of the “1T - CSV Uploader” contains the exact field names of the data type the uploaded data will be created in:

  1. When a file is uploaded through Bubbles file-uploader, the “1T - CSV Uploader” generates one or more files (Bubble has some limitations on the number of records in a CSV-file, so the “1T - CSV Uploader” splits the file up in multiple files of needed). The backend workflow process_country_uploads_router is triggered to process those files.

  1. For every file a backend workflow create_csv_countries_upload is scheduled. This workflow contains the step to a create record for every line in the CSV-files.

  1. The second step in the workflow create_csv_countries_upload is to apply the changes in table csv_countries_upload to the countries in the country table, this is done by a third workflow:

Good luck and let me know how it goes!

2 Likes

Thank you for the extensive explanation :slight_smile:
I have already solved it and in a very similar way as you explain.
Good to have a confirmation. It works very well.

1 Like

bumping an old thread but I just installed this plugin and it asks for ‘sheet license key’
what the hell is that, where can I buy this thing?
Thanks!

@tomajx This plugin doesn’t require any key and I responded to your 1 star review about this a couple weeks ago with no answer from you.

Lots of people use this plugin without issue so your bad review over an issue that doesn’t exist is less than reasonable.

6 Likes