I tried to upload a CSV file with 5852 records and then iterate over each one by inserting in DB.
The file was inserted in DB with 5852 records… but on the flow mentioned only 1168 records iterated, and the flow ended successfully.
Why did this happen?
Thanks
n8n
2
It looks like your topic is missing some important information. Could you provide the following if applicable.
- n8n version:
- Database (default: SQLite):
- n8n EXECUTIONS_PROCESS setting (default: own, main):
- Running n8n via (Docker, npm, n8n cloud, desktop app):
- Operating system:
solomon
3
What was the batch size?
Could you have set it to 5 ?
If you process many items at a time instead of one at a tima, the number of items processed by the loop node could be different.
If my reply answers your question, please remember to mark it as a solution.
Sure, but the batch size is 1
- n8n version: 1.80.4
- Database (default: SQLite):yes
- Running n8n via (Docker compose)
- **Operating system:win10
solomon
5
Can you share your workflow JSON here and the CSV file?
I’ll test here on my end and see what happens.
You might have found a bug.
To share the workflow put the JSON code inside a code block.
Like this:
solomon
7
I’ve simplified the workflow and was able to obtain 50 out 50 items form a random CSV I created here:
Can you try your CSV with this workflow and see what happens, please?
Looks like the workflow stopped early (the ‘done’ branch of the loop is unexecuted in your screenshot).
n8n stops executing when a node outputs no data. So the trick is to find the node it stopped at and turn on ‘always output data’ in its settings.
Does your CSV have empty lines in it by any chance?
No empty lines; this file is DB table records exported from SQL lite with setting:
As u can see, each new line is flagged with Unix new line character to be sure to read the file well.
Surprisingly, at the end, all the records are inserted.
system
Closed
10
This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.