Export to CSV not returning each row of a query on a new line in CSV file

Wappler Version : 3.0.1 NodeJS project
Operating System : Windows 10 v2004,

Expected behavior

When you export a server connect database query to a CSV file, it should return each row of data on a new line in the CSV file.

Actual behaviour

The entire database query is returned on one single row/line in the CSV file regardless of how many rows of data there are in the. This makes the export function mostly useless.

How to reproduce

Create a database connection and simple records query (SQL in my case)
create an export to CSV step
Export the data and open the CSV file.

Here is some further info on what i’ve created in Wappler.

image

image

Here is the export code from the JSON file:

{ "name": "csvExport1", "module": "export", "action": "csv", "options": { "path": "assets/exports/agent_exports.csv", "data": "{{queryAgents}}", "overwrite": true }, "outputType": "text", "output": true }

And here is a snippet of the actual result in CSV. This should only have 3 columns of data.

I was able to recreate this problem, seems to happen on NodeJS server model only.
We will fix it in the next update.

1 Like

Thanks Teodor

Here an update, place it in lib/modules.

export.zip (1.1 KB)

This is fixed in Wappler 3.0.2

This topic was automatically closed after 2 days. New replies are no longer allowed.