Version

    Common attributes of File Operation components

    For the overview of URL formats supported by File Operations, see Supported URL formats for file operations.

    Attribute Req Description Possible values

    Input mapping

    [1]

    Defines the mapping of input records to component attributes.

    Output mapping

    [1]

    Defines the mapping of results to a standard output port.

    Error mapping

    [1]

    Defines the mapping of errors to an error output port.

    Redirect error output

    no

    If enabled, errors will be sent to the output port instead of the error port.

    false (default) | true

    1

     If the mapping is omitted, a default mapping based on identical names will be used.

    Input mapping

    The operation will be executed for each input record. If the input edge is not connected, the operation will be performed exactly once.

    Attributes of the components may be overridden by values read from an input port, as specified by the Input mapping.

    Output mapping

    It is essential to understand the meaning of records on the left-hand side of the Output mapping and Error mapping editor. There may be one or two records displayed.

    The first record is only displayed if the component has an input edge connected, because it is the real input record which has been read from the edge. This record has Port 0 displayed in the Type column.

    The other record on the left-hand side named Result is displayed always and is the result record generated by the component.

    Error handling

    By default, a component will cause the graph to fail if it fails to perform the operation. This can be prevented by connecting the error port. If the error port is connected, the failures will be sent to the error port and the component will continue. The standard output port may also be used for error handling, if the Redirect error output option is enabled.

    If the component fails, it will not execute subsequent operations unless the Stop processing on fail option is disabled. The information about skipped operations will be sent to the error output port.

    Preserve file timestamps

    CopyFiles and MoveFiles components can preserve last modified timestamps of files and directories. This feature depends on the source file system’s ability to provide a last modified date, and on the target file system’s ability to set it.

    The following table shows general support of preserving timestamps:

    File system Provides last modified Sets last modified

    Local

    yes

    yes

    Sandbox

    yes

    yes

    SMB

    yes

    Files: yes; Dirs: no

    SMB2

    yes

    yes

    FTP

    Server-dependent

    no

    SFTP

    yes

    yes

    Amazon S3

    Files: yes; Dirs: no

    no

    Azure Blob

    yes

    no

    Hadoop

    yes

    Files: yes; Dirs: no

    Depending on the source and target file systems, the operation can be performed by a system call that can preserve timestamps natively. A Move operation can be performed as a Rename call, which preserves the timestamps of the moved file or directory without modification. In such cases the timestamps are preserved automatically, even if Preserve file timestamps attribute is set to No special handling.

    See File Operations next.