Hi,
I made a filter that filer out value to the UniversalDataWriter.
In the file I am creating I print the field names.
In the case where the file didn’t get any value, I want the file not be created.
Who knows how to this?
if i cant disable the creation of the file, how can id delete a file if there was not data writen into it?
the UniversalDataWriter always creates the output file (even if not writing the field names), so you will need to delete the file. There’s several options to do that:
- use a JavaExecute component in a following phase, and in the Java code you would check the contents of the file (i.e. “it contains just 1 line”) and then delete it with standard Java API.
- use a SystemExecute component and execute a script (e.g. a bash script in Unix environment) that performs the same check as above and then deletes it