I see problems on both of your screenshots.
- The path must be the path to the file you want to export, like
/folder/file.csv
- Export data must be a collection/array - in your case the database query.
That’s all. Nothing too complicated at all, as your post makes it look.