File Upload

Operation Name

File Upload

Function Overview

Upload a file to HDFS.

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 to show on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
Destination Required Not available Select a global resource.
For more details on Global Resource settings, refer to "Global Resource Property".
  • [Add]:
    Adds a new global resource.
  • [Edit list]:
    Enables to edit the global resource settings in the "Edit resource list" screen.
 
File path of uploading source Required Available Enters the file path of uploading source.
HDFS file path Required Available Enters HDFS file path.
  • The following characters are not available.
    • space < > " ^ [ ] { } % | ` : ;
  • Multibyte characters are not available.
Uploading option
Item name Required/Optional Use of variables Description Remarks
Overwrite Optional Not available Select whether to overwrite if the file specified in [HDFS file path] exists.  
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

None.

Transaction

Transaction is not supported.

PSP Usage

PSP is not supported.

Available Component Variables

Variable name Description Remarks
HDFSFilePath Stores the path of HDFS file in the uploading destination.
  • The value defaults to null.
localFilePath Stores the path of local file in the uploading source.
  • The value defaults to null.
message_category Stroes the category to which corresponding message code belongs to, when an error occurs.
  • The value defaults to null.
message_code Stores its corresponding message code of 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 DataSpider Servista version.
error_message Stores the error message for the occured error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stores stack trace of the occurred error.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version or the client application used.

Specification Limits

None.

Main Exceptions

Exception name Cause Solution
ResourceNotFoundException
Resource definition is not found. Name:[]
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource definition is not found. Name:[<Global resource name>]
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>].
java.io.FileNotFoundException File specified in [File path of uploading source] does not exist. Check [File path of uploading source].
FileExistsException File specified in [HDFS file path] already exists. Change the file name of [HDFS file path], or put check in [Overwrite] of [Uploading option].