Write File/Folder

Operation Name

Write File/Folder

Function overview

Writes file/folder on DataSpider files system to Niftycloud Storage.

Data Model

XML type.

Properties

For information about using 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 global resource.
  • [Add]:
    Adds new global resource.
  • [Edit list]:
    Global resource settings can be edited with "Edit Resource list".
 
Local directory Required Available Specify a directory path of DataSpider filesystem.

Select a directory in the directory chooser that is launched, by pressing [Browse] button.
Local file/directory name Required Available Specify file/directory on DataSpider files system.
  • Wildcards("*" and "?") are available.
  • "/" Can not be included.
Recursive processing Optional Not available For specified local directory, select whether to process file/directory recursively.
  • [Checked]:
    If the directory is contained in specified local directory, then processes file/directory recursively.
  • [Not Checked]:(default)
    Only processes files in the specified local directory.
 
Bucket name Required Available Specify Bucket.
  • If specifying Bucket which large number of files exist in [Bucket name], it may takes time to update list of [Folder path].
    To avoid this, refer to "Notes" section for more information.
Create bucket when it doesn't exist Optional Not available Choose whether to create when the specified Bucket does not exist.
  • [Checked]:
    If specified Bucket does not exist, then creates Bucket.
  • [Not Checked]:(default)
    If there is no specified Bucket, then does not create Bucket and raises an error.
 
Folder path Required Available Enter Niftycloud Storage folder path.
Create folder when it doesn't exist Optional Not available Choose whether to create when the specified folder does not exist.
  • [Checked]:(default)
    Creates a folder when the specified folder does not exist.
  • [Not Checked]:
    Does not create folder and set error when specified folder does not exist.
 
Overwrite Optional Not available Choose whether to overwrite when file with the same name exists on the specified folder.
  • [Checked]:(default)
    Overwrites when file with the same name exists in the specified folder.
  • [Not Checked]:
    Raises an error without overwriting when file with the same name exists in the specified folder.
 
Access rights Required Not available Select the access permission of the specified file.
  • [Private]:(default)
    Sets access permissions of the written file to "private".
  • [public-read]:
    Sets access permissions of the written file to "public-read".
    Setting is public on the Internet.
  • [authenticated-read]:
    Sets access permissions of the written file to "authenticated-read".
    Setting is public on the Internet for authenticated user.
 
With information of file access rights Optional Not available Choose whether to include file access right information in the results.
  • [Checked]:
    Includes file access right information in the results.
  • [Not Checked]: (default)
    Does not include file access right information in the results.
 
Data processing method
Item name Required / Optional Use of Variables Description Remarks
Mass data processing Required Not available Select a data processing method.
  • [Use script settings]: (default)
    Apply mass data processing settings of script property to adapter.
  • [Disable]:
    Mass data processing is not performed.
  • [Enable]:
    Mass data processing is performed.
 
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 errorcode="" name="" status="" >
    <file errorcode="" etag="" localpath="" name="" public="" remotepath="" size="" status="" type="" updated="" />
  </bucket>
</server>
Element Name Attribute Name Description Remarks
server -    
bucket - Appears in each Bucket which is gotten.  
errorcode When an error occur in Niftycloud Storage during getting a bucket, APT error code is output which is defined at Niftycloud Storage.
  • When an error does not occur in Niftycloud Storage, there is a blank.
  • For more details about API error code defined in Niftycloud Storage, refer to (http://cloud.nifty.com/api/storage/errorcode.htm).
name Outputs name of the bucket acquired.  
status Outputs the status of the retrieved bucket.
  • Exist: Status that the Bucket exists.
  • ErrorBucketNotFound: The status that specified Bucket does not exist in Niftycloud Storage. The specified [Bucket name] may be incorrect.
  • Error: The status that because error has occurred, Bucket could not be obtained.
 
file - Appears in each written file/folder.  
errorcode When an error occur in Niftycloud Storage during deleting a file/folder, APT error code is output which is defined at Niftycloud Storage.
  • When an error does not occur in Niftycloud Storage, there is a blank.
  • For more details about API error code defined in Niftycloud Storage, refer to (http://cloud.nifty.com/api/storage/errorcode.htm).
etag Outputs ETag of each written file/folder.
  • If file/folder is not written correctly, the value is blank.
localpath Outputs local path of written file/folder.
  • If status is "ErrorRemoteFolderNotFound" then the value is blank.
name Outputs name of written file/folder.
  • If status is "ErrorLocalFolderNotFound" then the value is blank.
  • If status is "ErrorRemoteFolderNotFound" then the value is blank.
public Outputs access right of written files/folder.
  • true: Public
  • false: Private
  • If file/folder is not written correctly, the value is blank.
  • Should the "READ" authority be granted to "AllUsers Group", the access authority becomes "Public".
  • If [With information of file access rights] is [Not Checked] then the value is blank.
remotepath Outputs file path of Niftycloud Storage written file/folder.
  • If status is "ErrorLocalFolderNotFound" then the value is blank.
size Outputs size of written file / folder. The unit is byte.
  • Output when file/folder is written correctly.
  • In case of folder, "0" is output.
status Outputs status of written file/folder.
  • Exist:Status that file/folder exists.
  • ErrorLocalFileNotFound: Status that the specified [Local directory] does not exist, or the specified file/directory does not exist.
  • ErrorUnsupportedFileSize: The status that could not write due to size of the specified [Local file/directory name] exceeds 5G-byte, the state could not write.
  • ErrorRemoteFolderNotFound: The status that the specified [Folder path] is not on the Niftycloud Storage, or file is specified.
  • ErrorRemoteFileExist: The status that [Overwrite] is [Not checked], and on Niftycloud Storage, files with the same name exist in specified [Folder path].
  • Error: The status that because an error occurred file/folder could not be written.
 
type Outputs classification of written file/folder.
  • File: File
  • Folder: Folder
 
updated Outputs the latest update date of written file/folder.
  • If file/folder is not written correctly, the value is blank.
  • Output by the format of [xmlfw.daterenderingformat] inside system property.If it has not been set, the default format will be "yyyy-MM-dd'T'HH: mm: ss.SSSZZ "is printed on.
    Example :2007-10-16T13: 15:22.738 +0900
  • Time zone is the time zone of DataSpiderServer.

Loading schema in Mapper

Schema is loaded automatically.
See "Edit Schema" for details with regards to defining a schema.

Mass data processing

Mass data processing is supported.

Transaction

Transaction is not supported.

PSP Usage

PSP is not supported.

Available component variables

Component variable name Description Remarks
count Returns the number which is the total number of the written folder number and file number.
  • The value defaults to null.
  • The sum of "folder_count" and "file_count".
folder_count Returns the number of written folder.
  • The value defaults to null.
file_count Returns the number of written file.
  • The value defaults to null.
message_category Stores the category to which corresponding message code belongs to of occured error.
  • The value defaults to null.
message_code Stores its corresponding message code of the occured error.
  • The value defaults to null.
message_level Stores the severity of the corresponding message code of the occured error.
  • The value defaults to null.
error_type Stores the type of the occured error.
  • The value defaults to null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The message may vary depending on the DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version.
error_trace Stores the stack trace of the occured error.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version or the client application used.

Specification Limits

Main exceptions

Exception name Causes Solution
ResourceNotFoundException
Resource definition could not be found.Name: []
[Destination] is not specified. Please specify [Destination].
ResourceNotFoundException
Resource definition could not be found.Name: [<name of global resource>]
Resource definition selected in [Destination] is not found. Please check the global resource specified in [Destination].
InvalidPropertyConfigurationException
<Property Name> is not specified.
[<Property Name>] is not specified. Please specify [<Property Name>].
InvalidPropertyConfigurationException
Local file/directory name includes "/" .
[Local file/directory name] includes "/". Please specify the file/folder name which does not include "/" in [Local file/directory name].
com.nifty.cloud.ncs.service.StorageException
The Access Key Id you provided does not exist in our records.
[AccessKey] of global resource specified in [Destination] is wrong. Confirm the settings of global resource specified in [Destination].
com.nifty.cloud.ncs.service.StorageException
The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. For more information, see REST Authentication and SOAP Authentication for details.
[SecretAccessKey] of global resource specified in [Destination] is wrong. Confirm the settings of global resource specified in [Destination].
com.nifty.cloud.ncs.NiftyCloudClientException
Failed to execute HTTP request: Connect to ncss.nifty.com/ncss.nifty.com/xxx.xxx.xxx.xxx timed out
Connection with Niftycloud Storage could not be confirmed during [Timeout] of global resource specified in [Destination] . Confirm the settings of global resource specified in [Destination].
com.nifty.cloud.ncs.NiftyCloudClientException
Failed to execute HTTP request: peer not authenticated
Certification with Niftycloud Storage could not be confirmed during [Timeout] of global resource specified in [Destination] . Confirm the settings of global resource specified in [Destination].

Notes