Move File (Deprecated)

The Move File operator is used to move (rename) files in a file service. The expected input message is specified in the Input section in this topic.

This operation is recursive, meaning it will move any files under the given source path. Interpretation of a path may differ on service as a directory (ADLS, file, HDFS, WebHDFS) or as a prefix (GCS, S3, WASB).

If destination is a file, it will be overwritten; if it is a non-empty directory, it will fail.

In the given file structure:
.
|
+-- a
|   +-- file1.txt
|   +-- file2.txt
+-- b
    +-- f1.txt
    +-- f2.txt
  • Moving source a/file1.txt to destination newfile.txt would succeed because the destination does not exist.

  • Moving source a/file1.txt to destination b/f1.txt would succeed and overwrite b/f1.txt because the destination is an existing file.

  • Moving source a/file1.txt to destination b/ would fail because b/ already exists and is not empty.

  • Moving source a/ to destination b/ would fail because b/ already exists and is not empty.

  • Moving source a/ to destination b/dir/ would succeed because b/dir/ does not exist.

Configuration Parameters

Name

ID

Type

Description

Service

service

string

The file service to operate. Additional parameters may depend on the selected service.

Default: "file"

Connection

connection

object

Holds information about connection information for the services. Only use manual connections when using a connection ID is not possible.

Configuration Type

configurationType

string

connection parameter Which type of connection information will be used: Manual (user input), or retrieved by the Connection Management Service.

Default: ""

Connection ID

connectionID

string

connection parameter The ID of the connection information to retrieve from the Connection Management Service.

Default: ""

Connection Properties

connectionProperties

object

connection parameter All the connection properties for manual input.

Timeout (ms)

timeoutInMs

int

Sets the time limit to execute the operation. If 0, no timeout is used.

Default: 0

Retry Period (ms)

retryPeriodInMs

int

The time interval in milliseconds between connection trials.

Default: 0

Retry Attempts

numRetryAttempts

int

The number of times to retry a connection.

Default: 0

Simultaneous Requests

simultaneousRequests

int

The number of simultaneous requests generated on recursive calls (only available for GCS, S3, and WASB).

Default: 1

Stop Request on Error

stopRequestOnError

boolean

Controls whether simultaneous requests from recursive calls should stop at first error (only available for GCS, S3, and WASB).

Default: false

Terminate on Error

terminateOnError

boolean

A flag that indicates whether or not the graph should stop if this operator encounters an error. If set to false, an output may represent an error, in which case its attribute message.error will be true and its body will contain a string describing the error.

Default: true

Input

Input

Type

Description

in

message

A message whose body has the source file path and destination. Expected message attributes:

storage.src Mandatory. Path to source file or directory.

storage.dst Mandatory. Path to destination file or directory (should match types with source). The destination path may contain <dirname> and <basename>, referring to the given source path's dirname and basename. For example, move src:data/A/user.csv dst:<dirname>/processedFiles/<basename> would map to the destination data/A/processedFiles/user.csv.

storage.srcBucket Overrides bucket from configuration on service GCS and S3 for the source file or directory.

storage.dstBucket Overrides bucket from configuration on service GCS and S3 for the destination file or directory.

Output

Output

Type

Description

out

message

A message whose header message.error (bool) reports whether the operation was successful. The body and any other header from the input message are copied to this one.