Output API Function Definition (CSV)

Operation Name

Output API Function Definition (CSV)

Function Overview

Outputs specifiable API functions for data files into the target data file.

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 to show on the script canvas.  
Input Data Required Not available Select the component on the script canvas.  
Required settings
Item name Required/Optional Use of variables Description Remarks
Data file Required Available Specify the path of target data file.

Click [Browse] button to launch the file chooser and select the file.
API function Required - Specify the names and number of arguments of API functions to output to target data file.

Each query parameter can be operated by the following operations.
  • [Add]:
    Adds an API function
  • [Up]:
    Moves up the order of selected API function by one.
  • [Down]:
    Moves down the order of selected API function by one.
  • [Delete]:
    Deletes an API function.
 
API function/Name Required Available Input the name of API function.  
API function/Number of argument Required Not available Input the argument number of API function.
  • Input whole number not less than "1".
Property action
Item name Description Remarks
Preview Launch the previewer and display contents of the file specified in [Data file].
  • Disabled if the specified file does not exist, or a variable is specified in [Data file].
  • Displayed with the encode specified in [Encoding].
  • You can not edit the file contents.
  • Files with file size smaller than 1MB can be fully displayed in previewer. If the file size exceeds 1MB, 1MB size contents from the beginning of the file are displayed.
Write settings
Item name Required/Optional Use of variables Description Remarks
Encoding Required Available Select or input the writing file encode.

Use only the canonical name supported by Java SE Runtime Environment 8 when specifying the encoding directly in the field.
Refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html) for details.
  • Default value is "UTF-8".
Transaction
Item name Required/Optional Use of variables Description Remarks
Perform Transaction Required Not available Select whether to perform transaction.
  • [Checked]:
    Performs transaction.
  • [Not checked]:(default)
    Does not perform transaction.
For details, refer to "File adapter transaction".
 
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

<?xml version="1.0" encoding="UTF-8"?>
<apis>
  <api>
    <argument>API function argument</argument>
     :
    <argument>API function argument</argument>
  </api>
     :
</apis>
Element name Attribute name Description Remarks
apis -    
api - Corresponds an API function. Number of the element is equal to the number set in [API function].
argument - The value to be delivered as an API function argument. Number of the element is equal to the value specified in [API function/Number of Argument].

Output Schema

None.

Loading Schema on Mapper

Schema will be loaded automatically.
For more detail, refer to "Edit schema".

Transaction

Transaction is supported.

Transaction is valid, if [Perform Transaction] of [Transaction] is checked.

PSP Usage

PSP is not supported.

Available Component Variables

Component variable name Description Remarks
data_file_path Stores the data file path specified in [Data file].
  • Default value is null.
message_category Stores the category of message code corresponding to the occurred error.
  • Default value is null.
message_code Stores the code of message code corresponding to the occurred error.
  • Default value is null.
message_level Stores the severity of message code corresponding to the occurred error.
  • Default value is null.
error_type Stores the error type of occurred error.
  • Default value is null.
  • Error is represented in the format depicted below.
    Example:java.io.FileNotFoundException
  • The value may vary depending on the DataSpider Servista version.
error_message Stores the error message of occurred error.
  • Default value is null.
  • The value may vary depending on the DataSpider Servista version.
error_trace Stores the trace information of occurred error.
  • Default value is null.
  • The value may vary depending on the DataSpider Servista version or the client application used.

Specification Limits

Main Exceptions

Exception name Cause Solution
InputDataNotFoundException [Input data] is not specified. Specify [Input data] or draw a data flow.
InvalidPropertyConfigurationException
<Property name> is not specified.
[<Property name>] is not specified. Specify [<Property name>].
PathIsNotAbsoluteException The specified path is a relative path. Specifiy an absolute path.
FileIsDirectoryException Path entered in [Data file] is directory. Specifiy a file path in [Data file].
FileIsLockedException File specified in [Data file] is locked. Unlock the file from explorer or CLI.
InvalidSchemaException Schema of [Input data] is invalid. Check the schema of [Input data].
java.io.FileNotFoundException
Other process is in use.
File specified in [Data file] is used by other process. Check whether the file is used in other process.
java.io.UnsupportedEncodingException The encoding specified in [Encoding] is not supported. Specify an encoding supported by Java SE Runtime Environment 8.
For details, refer to "Supported Encodings"(http://docs.oracle.com/javase/8/docs/technotes/guides/intl/encoding.doc.html).