Copy File/Folder

Operation Name

Copy File/Folder

Function Overview

Copy the file/folder on Amazon S3 to the Bucket folder specified by Amazon S3.

Data Model

XML Type.

Properties

For details on use of variables, refer to "Variables".
Basic Settings
Item name Required/Optional Use of Variables Description Remarks
Name Required Not Available Enter the name on the script canvas.  
Required settings
Item name Required/Optional Use of Variables Description Remarks
Destination Required Not Available Select a global resource.
For details about how to configure global resource, refer to "Global Resource Properties".
  • [Add]:
    Adds a new global resource.
  • [Edit list]:
    You can edit the global resource settings by "Edit resource list".
 
Copy source bucket name Required Available Select or enter a copy source bucket.
  • When you specify a Bucket with large number of files, it may take time to update the list of [Copy source folder path].
    For more details on how to avoid it, refer to "Notes".
Copy source folder path Required Available Select or enter Amazon S3 folder path of copy source.
Copy source file/folder name Required Available Select or enter a copy source file/folder.
  • Wild card ("*" and "?") is available.
  • "/" Can not be included.
  • The folder is copied recursively when it is specified.
Copy destination bucket name Required Available Select or enter a copy destination bucket.
  • When you specify a bucket with large number of files, it may take time to update the list of [Copy destination folder path].
    For more details on how to avoid it, refer to "Notes".
Create copy destination bucket when it doesn't exist Optional Not Available Select whether to create a bucket when the specified copy destination bucket doesn't exist.
  • [Checked]:
    If the specified copy destination bucket doesn't exist, then creates a bucket.
  • [Not Checked]:(default)
    If there is no specified copy destination bucket, then doesn't create bucket and sets an error.
 
Copy destination folder path Required Available Select or enter Amazon S3 folder path of copy destination.
Create copy destination folder when it doesn't exist Optional Not Available Select whether to create folder when the specified copy destination folder doesn't exist.
  • [Checked]:(default)
    If the specified copy destination folder doesn't exist, then creates folder.
  • [Not checked]:
    If there is no specified copy destination folder, then doesn't create folder and sets an error.
 
Copy destination file/folder name Optional Available Select or enter a copy destination file/folder.
  • "/" Can not be included.
  • When omitted, it is copied with the name of copy source file/folder.
  • When wild card is used in [Copy source file/folder name], it is copied with the name of copy source file/folder.
Overwrite a copy destination file when it exists Optional Not Available Select whether to overwrite the file when a file with the same name exists on the specified copy destination folder.
  • [Checked]:(default)
    Overwrites when file with the same name exists in the specified copy destination folder.
  • [Not checked]:
    Sets an error without overwriting when file with the same name exists in the specified copy destination folder.
 
Include permissions in result Optional Not Available Select whether to include information of copy destination file/folder access rights in the result.
  • [Checked]:
    Include information of access rights in the result.
  • [Not checked]:(default)
    Does not include information of access rights in the result.
 
Data processing method
Item name Required/Optional Use of Variables Description Remarks
Data processing method Required Not Available Select the data processing method.
  • [Apply script settings]:(default)
    Apply mass data processing settings of script property to adapter.
  • [Do not perform mass data processing]:
    Mass data processing is not performed.
  • [Perform mass data processing]:
    Mass data processing is performed.
  • This setting is related to the output processing method of the result data. Therefore, it does not affect the files/folders to be copied.
Comment
Item name Required/Optional Use of Variables Description Remarks
Comment Optional Not Available You can write a short description of this adapter.
The description will be reflected in the specifications.
 

Schema

Input Schema

None

Output Schema

<?xml version="1.0"?>
<server>
  <bucket source_name="" destination_name="" status="" >
    <file etag="" name="" public="" source_remotepath="" destination_remotepath="" size="" status="" storageclass="" type="" source_updated="" destination_updated="" />
  </bucket>
</server>
Element name Attribute name Description Remarks
server -    
bucket - Bucket that has been get appears.  
source_name Outputs the copy source bucket name that has been get.  
destination_name Outputs the copy destination bucket name that has been get.  
status Outputs the bucket status of copy source and copy destination that has been get.
  • Exist:The copy source and copy destination bucket are present.
  • ErrorSourceBucketNotFound:The bucket specified in [Copy source bucket name] does not exist in Amazon S3. The specified bucket name may be incorrect.
  • ErrorDestinationBucketNotFound: The bucket specified in [Copy destination bucket name] does not exist in Amazon S3. The specified bucket name may be incorrect.
  • Error:Due to the error, unable to get the bucket of copy source and copy destination.
 
file - It appears for each copied file/folder.  
etag Outputs ETag of the copied file/folder.
  • The value is blank when the file/folder is not copied correctly.
name Outputs the name of the copied file/folder.
  • The value is blank when the status is "ErrorSourceFolderNotFound".
  • The value is blank when the status is "ErrorDestinationFolderNotFound".
public Outputs the access right of copied file/folder.
  • true:Public
  • false:Private
  • The value is blank when the file/folder is not copied correctly.
  • When "READ" permissions is given to "AllUsers Group", it is "Public".
  • The value is blank when [Include permissions in result] is [Not checked].
source_remotepath Outputs the file path available on Amazon S3 of copy source file/folder.  
destination_remotepath Outputs the file path available on Amazon S3 of copy destination file/folder.  
size Outputs the size of the copied file/folder. The unit is byte.
  • It is output when the file/folder is copied correctly.
status Outputs the status of copy source and copy destination file/folder.
  • Exist:The copy destination file/folder exists.
  • Virtual: In Amazon S3, the specified [Copy destination folder path] does not exist. But, the folder or file exist under that.
  • ErrorSourceFolderNotFound: In Amazon S3, either the specified [Copy source folder path] does not exist or it is the status when file is specified.
  • ErrorSourceFileNotFound: In Amazon S3, the file/folder specified in the specified [Copy source folder path] does not exist.
  • ErrorDestinationFolderNotFound: In Amazon S3, either the specified [Copy destination folder path] does not exist or it is the status when file is specified.
  • ErrorDestinationFileExist: [Overwrite a copy destination file when it exists] is [Not checked] and a file with same name exists in the specified [Copy destination folder path] in Amazon S3.
  • Error:Due to the error, unable to copy the file/folder.
 
storageclass Outputs the Storage Class of the copied file/folder.
  • STANDARD:Standard
  • REDUCED_REDUNDANCY:RRS(Reduced Redundancy Storage)
  • STANDARD_IA:Standard_IA
  • The value is blank when the file/folder is not copied correctly.
type Outputs the type of the copied file/folder.
  • File: File
  • Folder: Folder
 
source_updated Outputs the last modified date and time of the copy source file/folder.
  • The value is blank when the file/folder is not get correctly.
  • It is output in the format set in "xmlfw.daterenderingformat" in system properties. When it is not set, it is output in the default format of "yyyy-MM-dd'T'HH:mm:ss.SSSZZ".
    Example: 2007-10-16T13:15:22.738+0900
  • Time zone is the time zone of DataSpiderServer.
destination_updated Outputs the last modified date and time of the copy destination file/folder.
  • The value is blank when the file/folder is not copied correctly.
  • It is output in the format set in "xmlfw.daterenderingformat" in system properties. When it is not set, it is output in the default format of "yyyy-MM-dd'T'HH:mm:ss.SSSZZ".
    Example: 2007-10-16T13:15:22.738+0900
  • Time zone is the time zone of DataSpiderServer.

Loading Schema on Mapper

Schema is loaded automatically.
For details, refer to "Edit schema".

Mass Data Processing

Mass data processing is supported.

PSP usage

PSP cannot be used.

Available component variables

Component variable name Description Remarks
count Number of copied files and folders is stored.
  • The value defaults to null.
  • The total of "folder_count" and "file_count".
folder_count The number of copied folders are stored.
  • The default value is null.
  • Folders whose status attribute of file element is "Virtual" is not included in the number.
file_count The number of copied files are stored.
  • The default value is null.
message_category When an error occurs, the category of the message code corresponding to the occurred error is stored.
  • The default value is null.
message_code When an error occurs, the code of the message code corresponding to the occurred error is stored.
  • The default value is null.
message_level When an error occurs, the severity of the message code corresponding to the occurred error is stored.
  • The default value is null.
error_type When an error occurs, the type of the occurred error is stored.
  • The default value is null.
  • Error type is in the following format.
    Exaple: "java.io.FileNotFoundException"
  • Storing contents may vary depending on DataSpider Servista versions.
error_message When an error occurs, the message of the occurred error is stored.
  • The default value is null.
  • Storing contents may vary depending on DataSpider Servista versions.
error_trace When an error occurs, the trace information of the occurred error is stored.
  • The default value is null.
  • Storing contents may vary depending on DataSpider Servista versions or executing client application.

Specification limits

Main Exceptions

Exception Name Cause Measures
ResourceNotFoundException
Resource definition is not found. Name:[]
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource definition is not found. Name : [<global resource name>]
The resource definition selected in [Destination] is not found. Check the global resource specified in [Destination].
InvalidPropertyConfigurationException
<property name> is not specified.
[<property name>] is not specified Specify [<property name>].
InvalidPropertyConfigurationException
Copy source file/folder name contains "/".
[Copy source file/folder name] contains "/" In [Copy source file/folder name], specify a file/folder name which does not contain "/".
InvalidPropertyConfigurationException
Copy destination file/folder name contains "/".
[Copy destination file/folder name] contains "/". In [Copy destination file/folder name], specify a file/folder name which does not contain "/".
Status Code: 403, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: InvalidAccessKeyId, AWS Error Message: The AWS Access Key Id you provided does not exist in our records., S3 Extended Request ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX The [Access Key ID] of global resource specified in [Destination] is wrong. Please check the settings of global resource specified in [Destination].
Status Code: 403, AWS Request ID: XXXXXXXXXXXXXXXX, AWS Error Code: SignatureDoesNotMatch, AWS Error Message: The request signature we calculated does not match the signature you provided. Check your key and signing method., S3 Extended Request ID: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX The [Secret Access Key] of global resource specified in [Destination] is wrong. Please check the settings of global resource specified in [Destination].
com.amazonaws.SdkClientException
Unable to execute HTTP request: <endpoint>
The [Endpoint] of global resource specified in [Destination] is wrong. Please check the settings of global resource specified in [Destination].

Notes