How to skip export if empty? #3351
-
Hi, I have a situation where I would like to know if the query results are empty then skip the export process. I am using queued jobs to process the export, with the Headers concern. There are times where the query results are zero, hence the file is exported with only headers (CSV) in my case. I know I can run the query first then queue the export, then it would be something like I am running the query twice, first in the check if I can export and second if I can export, then the I would like to skip the export if the query returns empty in my case, is there any better way to do this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Execute a count query before starting the export. |
Beta Was this translation helpful? Give feedback.
Execute a count query before starting the export.