Read Table

Operation Name

Read Table

Function Overview

Reads data stored in the table.

Data Model

Table model 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 Resources.
  • [Add]:
    Adds new global resource.
  • [Edit list]:
    Global resource settings can be edited by "Edit resource list".
 
Table name Required Available Select or enter the name of the table to read.
  • The maximum number of tables listed is determined by Global Resource settings.
  • When schema name and table name contains ".", it can be properly handled by enclosing the name of the schema and table by quotation marks.
    For example, when quotes is ", the schema name is A.B and the table name is C.D, the correct way to quote will be: "A.B"."C.D" .
Enclose table name with quotation marks Optional Not available Select whether to enclose the specified table name with quotation marks.
  • [Checked]:
    Encloses table name displayed in [Table name] in quotation marks.
  • [Not Checked]: (default)
    Does not enclose table name displayed in [Table name] in quotation marks.
If the table name contains characters such as spaces, it must be enclosed in quotation marks. For characters that require quotes, please contact the database vendor.
  • Quotation marks set with each database adapter are as follows:
    • Oracle, DB2, PostgreSQL, Amazon RDS for Oracle, Amazon RDS for PostgreSQL: """" (double quotes)
    • Access, SQL Server, Amazon RDS for SQL Server, Azure SQL Database: "[]"(square brackets)
    • MySQL, Amazon RDS for MySQL: "``" (back-quote)
  • JDBC adapter and ODBC adapter do not have this property.
  • When executing, the table name will be used directly as entered in [Table name].
    When enclosing table name entered in [Table name] with quotation marks, query will also be issued with quoted table name during execution.
    When not enclosing table name entered in [Table name] with quotation marks, the validity of this property will be check first during execution, when it is valid, the query will also be issued with quoted table name.
  • Environment variables set in [Table name] are expanded when this property is enabled.
Schema definition Required - Shows the schema definition specified in [Table name].
  • Column names defined in the [Schema definition] are used in the Mapper schema when [Target] is checked.
  • Schema definition cannot be viewed in the following cases.
    • If read permission of the specified table is not available
    • If the specified table does not exist
    • If [Table name] is specified by variable
    • If [Table name] is not entered
    • If error occurs in [Table name]
Schema definition / Target Optional Not available Select whether the columns of the table specified in the [Table name] are to be retrieved.
  • [Checked]:(default)
    Retrieves the columns
  • [Not Checked]:
    Do not retrieve the columns.
  • Column names with checks are reflected in Mapper schema.
  • Click the checkbox that heads all individual columns to have them checked all at once.
  • At least one of the columns needs to be checked.
Schema definition / Column name Required Not available Shows the column name of the table specified in [Table name].  
Schema definition / Type Required Not available Select [Column name] type.
  • Displayed in the format of "Native type (Internal data type)" .
    • Native type:
      The data type of each specific RDBMS.
    • Internal data type
      Data type used internally in DataSpider.
      Refer to Internal data type for details.
Property Action
Item name Description Remarks
Launch Table Browser Launches the Table Browser.
For the operating procedure, see Table Browser.
  • Enabled when [Destination] is selected.
  • Table name specified in the [Table name] is displayed initially.
Extraction test Issue SELECT statement to the specified table.Displays the number of nodes of the retrieved result.
  • In the following cases it can not be executed.
    • If read permission of the specified table is not available
    • If the specified table does not exist
    • If [Table name] is specified by variable
    • If [Table name] is not entered
    • If error occurs in [Table name]
Update schema definition Updates the schema definition specified in [Table name].
  • In the following cases it can not be executed.
    • If the specified table does not exist
    • If [Table name] is specified by variable
    • If [Table name] is not entered
    • If error occurs in [Table name]
Read settings
Item name Required/Optional Use of variables Description Remarks
Fetch size Optional Available Specify JDBC fetch size.
  • Range of input value is "0~2147483647".
  • Input value of this property will be specified as the paramter of setFetchSize()method in JDBC.
  • Generally fetch size means the number of rows fetched at once, it might mean something different depending on databases or JDBC drivers you use.
  • If omitted or enter other than numerical value, follows the process of when fetch size of JDBC driver is not specified.
  • Following adapters does not have this property.
    • Access adapter
    • ODBC adapter
    • SQL Server adapter
    • Amazon RDS for SQL Server adapter
    • Azure SQL database adapter
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)
    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

Depending on the settings for the [Schema definition], the number of columns may vary.
Refer to "Schema of Table Model" for details regarding schema structure.

Loading schema in Mapper

Schema is loaded automatically.
For any details, refer to the 'Editing Schema'

Mass data processing

Mass data processing is supported.

PSP Usage

PSP is supported.
For details on PSP, refer to "Parallel Stream Processing".

Available Component variables

Component variable name Description Remarks
count Stores the number of records read.
  • The value defaults to null.
  • Null when using Parallel Stream Processing.
error_code Stores an error code of occured error when SQL exception (SQLException) occurs.
  • The value defaults to null.
  • Upon successful completion, "0" is returned.
  • The error code is based on the specifications of each driver vendor.
message_category Stores the category of message code corresponding to the occured error.
  • The value defaults to null.
message_code Stores the code of message code corresponding to the occured error.
  • The value defaults to null.
message_level Stores the severity of message code corresponding to the occured error.
  • The value defaults to null.
error_type Stores the error type of 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 of occured error.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version.
error_trace Stores the trace information of occured error.
  • The value defaults to null.
  • The message may vary depending on the DataSpider Servista version or the client application used.

Specification Limits

For the specification limit for each database adapter, refer to "DB adapter Limitations".

Main exceptions

Exception name Causes Solution
ResourceNotFoundException
Resource definition could not be found.Name: []
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource definition could not be found.Name: [<name of Global Resources>]
Resource definition selected in [Destination] is not found. Confirm the global resource specified in [Destination]
InvalidPropertyConfigurationException [Table name] is not set. Specify [Table name]
InvalidPropertyConfigurationException
Columns to be retrieved are not selected.
[Target] of the [Schema definition] is not selected. Select at least one of the [Target] of [Schema definition].
java.sql.SQLException Database access error or other error occurred. Check the message of SQLException.SQLException message is based on the specifications of each driver.SQLException messages may outputs cause of the error.
For more information about the message, please contact each database vendor.

Notes

For the notes for each database adapter, refer to "DB adapter Limitations".