TL:DR - Have added a new page element that exposes the generated file to be saved directly to the database. Can turn off the option for the user to download the file directly to their device.
All previous functionality still exists. New functionality below:
Send JSON to CSV Creator
This action is only available when using the page element CSV Creator and will return a file which you can then save to your database, email to the user, etc.
The file can be accessed on the CSV Creator page element state called âcreated Fileâ.
This action also exposes an event called âA CSV Creator has created your fileâ which will be triggered anytime a CSV is generated. Use this event to simplify performing additional actions with the generated file. Since this event is only triggered when the file is complete you wonât have to worry about making sure the new file is ready before running additional actions.
Can also uncheck the option to allow the user to download the file directly to their device.
At first because of the row number 8 and the unique id portion I thought it might have something to do with the custom headers, but that wasnât. I then checked my csv file and saw there was a blank row. After deleting it the csv file upload went smoothly and the custom headers were accurately added to the DB as well.
Before testing the plugin I uploaded the same CSV file through the database upload feature in the editor and there were no issues.
I believe there may be a way that the Bubble editor upload feature ignores blank rows.
Iâm curious if this has been an issue, as I could imagine at times a user may unwittingly have some blank rows, or even columns.
I find this plugin extremely useful. However, whenever one queries a large dataset you either have to do âfull listâ RG or risk the download timeout. Even with a âfull listâ RG there are severe limitations in that even this can and will timeout eventually. It would be nice if there is a way to keep sucking data until the full set is retrieved and then generate the csv.
Once I deleted the empty row from the CSV file in the format I have on my computer (which I think is just app text) the issue went away and everything upload perfectly including the custom headers.
I Believe I may have posted this on the wrong showcase
However, another issue I am experiencing I believe is about the CSV creator plugin.
Aha! I was wondering Havenât created the showcase for Uploader yet as itâs still quite new. Will take a look at this issue. Should be able to strip out any empty lines to avoid this. Thanks for pointing it out! Will get back to you as soon as itâs resolved.
On the CSV creator issue, you need to have a single search and then use the â:format as textâ operator and put your JSON in there. So that field should look like âSearch for Netflix:format as textâ
This plugin is amazing and has saved me so much time, thank you!
Iâve run into an issue which I think is related to file encoding and Excel. I have a list of cities with European characters in, eg: âGJĂVIKâ. When I open the exported file in Excel, it displays as GJĂËVIK. If I open the file in Notepad it shows the exported fileâs encoding as UTF-8. If I re-save the file with ANSI encoding, it displays fine in Excel.
Is there a way to control the file encoding in Bubble?
Sorry for the delayed response! Iâve not been on the forum this week but thanks for sharing both the issue you were having and the solution. Truly making this a community plugin Iâll add this as an optional selection to the main plugin.
Have you had experienced any issues at this point or does it seem to be working properly?
@lucien, this is a popular request recently. Processing the data is not an issue but creating and returning the actual file has proven a bit more difficult.
I could pull more data by creating a link to another table and referencing it instead of a search for in each field but I believe the limitation still exist.
No issues so far, it works perfectly well with the FEFF character in there, and hundreds of records. It could cause a problem if youâre parsing the CSV output with another tool that doesnât know how to handle UTF-8 with BOM, eg, but the same can happen if you just create a CSV file in Excel.
I have found a separate issue where JSON.parse throws an error if the data contains a horizontal tab character - ascii 09. You might want to filter that character out as well.