CSV Writer


Would it be possible to have the file name at an outport of CSV Writer? It would be useful if we have to process some results outside KNIME, or with a command line tool inside KNIME. (This is a kind of feature request.)
Thanks, gabor

(PS.: I have found a bit unintuitive that I can set in the File Reader node the tab as <tab>, while in CSV Writer this is \t. It is documented difference, just not as intuitive as I expected.)

I found a workaround for this.  If you put a "Document Data Extractor" node in there, you can add back in the "File Path" in the settings.  Then you have the original file name of the original document.


[some document table] --> Document Data Extractor --> CSV Writer



I might understand your problem differently than @jasonmvictor. As I understand it, you would like to write a table to CSV file with CSV Writer. Ouput file will exist at some location (eg. c:\Users\jdoe\file.csv) and this location you would like to export from CSV Writer. If this is correct you can do this:

  • Open CSV Writer node configuration.
  • Go to "Flow Variables"
  • Under "filename" write a variable name into rightmost input field.
  • Close configuration dialog.
  • Right click on CSV Writer node and select "Show Flow Variable Ports"
  • Attach "Variable to Table Row" node to the ouput port of CSV Writer node.
  • Open configuration dialog for "Variable to Table Row" node and select exposed filename variable into "include columns" section.
  • (remember to first run CSV Writer node if there is no exposed filename variable in left column)
  • (see attached image for better reference)