Read XML Data

Operation Name

Read XML File

Function Overview

Reads XML format file from 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.
 
HDFS file path Required Available Enter the path of HDFS file.
  • The following characters are not available.
    • space < > " ^ [ ] { } % | ` : ;
  • Multibyte characters are not available.
Data processing method
Item name Required/Optional Use of variables Description Remarks
Data processing method Required Not available Select a data processing method.
  • [Use script settings]: (default)
    Applies 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

Depends on the data to read.

Loading Schema in Mapper

Schema needs to be reloaded manually.
Please specify the schema of the data to read.
Refer to " Edit Schema "

Mass Data Processing

Mass data processing is supported.

PSP Usage

PSP is not supported.

Available Component Variables

Variable name Description Remarks
filePath Stores the file path of reading 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

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 the [<Property name>].
FileIsDirectoryException Path input in [HDFS file path] is directory. Input file path in [HDFS file path].
java.io.FileNotFoundException File specified in [HDFS file path] does not exist. Please check [HDFS file path].
org.xml.sax.SAXParseException File specified in [HDFS file path] is invalid as an XML document. Please check the content of the file specified in [HDFS file path].