Binary Objects to Files

This node takes all binary objects in a certain column of the input table and writes them, each as a separate file, into a directory. It will append the paths of the written files to the input table as well as the corresponding write status (created, unmodified, overwritten).

This node can access a variety of different file systems. More information about file handling in KNIME can be found in the official File Handling Guide.

Options

Write to
Select a file system in which you want to store the files. There are three default file system options to choose from:
  • Local File System: Allows you to select a location in your local system.
  • Mountpoint: Allows you to read from a mountpoint. When selected, a new drop-down menu appears to choose the mountpoint. Unconnected mountpoints are greyed out but can still be selected (note that browsing is disabled in this case). Go to the KNIME Explorer and connect to the mountpoint to enable browsing. A mountpoint is displayed in red if it was previously selected but is no longer available. You won't be able to save the dialog as long as you don't select a valid i.e. known mountpoint.
  • Relative to: Allows you to choose whether to resolve the path relative to the current mountpoint, current workflow or the current workflow's data area. When selected a new drop-down menu appears to choose which of the three options to use.
It is possible to use other file systems with this node. Therefore, you have to enable the file system connection input port of this node by clicking the ... in the bottom left corner of the node's icon and choose Add File System Connection port .
Afterwards, you can simply connect the desired connector node to this node. The file system connection will then be shown in the drop-down menu. It is greyed out if the file system is not connected in which case you have to (re)execute the connector node first. Note: The default file systems listed above can't be selected if a file system is provided via the input port.
Folder
Enter a path to a folder. The required syntax of a path depends on the chosen file system, such as "C:\path\to\folder" (Local File System on Windows) or "/path/to/folder" (Local File System on Linux/MacOS and Mountpoint). For file systems connected via input port, required path format. You can also choose a previously selected folder from the drop-down list, or select a location from the "Browse..." dialog. Note that browsing is disabled in some cases:
  • Mountpoint: Browsing is disabled if the selected mountpoint isn't connected. Go to the KNIME Explorer and connect to the mountpoint to enable browsing.
  • File systems provided via input port: Browsing is disabled if the connector node hasn't been executed since the workflow has been opened. (Re)execute the connector node to enable browsing.
The location can be exposed as or automatically set via a path flow variable.
Create missing folders
Select if the folders of the selected output location should be created if they do not already exist. If this option is unchecked, the node will fail if a folder does not exist.
If exists
Specify the behavior of the node in case the output file already exists.
  • Overwrite: Will replace any existing file.
  • Ignore: Will ignore if a file already exists and continues the copying process.
  • Fail: Will issue an error during the node's execution (to prevent unintentional overwrite).
Binary object
Options for selecting a binary object column from the input table and whether the original binary object column should be included in the output or not.
  • Column: Column containing the binary objects to write.
  • Remove binary object column: If checked, the column containing the binary objects is removed from the output table.
  • Compress binary files (gzip): If checked, the output binary files will be compressed to gzip.
File names
Select an option for the binary object file names, by default files will be generated using the "File_?.dat" pattern. There are two options to choose from.
  • Generate: The file names will be generated using the provided pattern. The pattern must contain a single "?" symbol. This symbol will, during execution, be replaced by an incrementing counter to make the filenames unique. This node does not append any file extension.
  • From column: Allows to select a column containing the file names under which the corresponding binary file will be stored.

Input Ports

Icon
Table that contains binary objects.
Icon
The file system connection.

Output Ports

Icon
Input table with an additional path column that contains the paths of the written files, as well as another String column which holds the write status (created, unmodified, overwritten). The original binary object column is removed from the output if the option to remove is checked.

Views

This node has no views

Workflows

Links

Developers

You want to see the source code for this node? Click the following button and we’ll use our super-powers to find it for you.