Read Table

Operation Name

Read Table

Function Overview

Read data from a table in Microsoft Dynamics AX.

Data Model

Data model of this type of component is table model type.

Properties

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]:
    Add new global resource.
  • [Edit list]:
    Global resource settings can be edited by "Edit resource list".
 
Table Name Required Available Enter the name of a table in Microsoft Dynamics AX.
  • The name of view is also can be used.
Select statement for AX Required Available Enter a select statement and replace the table name in the select statement to %1

Example1:select * from %1 where %1.name == 'test' && %1._int <= 1000
Example2:select * from %1 where %1.name == '${value}'
  • If the double quotation (") needs to be used in the select statement, it is essential to a escape symbol backslash for each double quotation (").
    Example:select * from %1 where %1.name == \"test\"
  • When column names are specified in a select statement, all column names set in [Output/Column Name] should be input in the select statement.
  • For more information, please refer to "About select statement"
Output Required - Set the schema definition specified in [Table Name].  
Output/Column Name Required Available Enter the column name of the table in Microsoft Dynamics AX.

You can set the first column of the file specified in property action of [Read column name from file] as the column name.
 
Output/Data Type Required Not available Select a data type for the column.

You can set the second column of the file specified in property action of [Read column name from file] as the data type.
  • Displayed in the format of "Native type (Internal data type)" .
    • Native type:
      The data type of Microsoft Dynamics AX.
    • Internal data type:
      Data type used internally in DataSpider(specific data types of Java).
  • Displayed in the format of "Native type" when Native type is same as Internal data type.
Property Action
Item name Description Remarks
Read column name from file Select the file in the file Selectr and set the first column of the file as the column name.
Set the second column of the file as the data type.
  • Six characters used as delmiter are "half comma(,)", "tab", "space ( )", "semicolon (;)", "slash (/)" and "Vertical bar (|)".
  • If the second column does not match the spelling of any word in data type list, blank will be shown and "String" will be used.
  • Characters after third column will be neglected.
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 [Output] the number of columns may vary.
See "Schema of Table Model" for details regarding schema structure.

Loading schema in Mapper

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

Mass data processing

Mass data processing is NOT supported.

Usage in a PSP script

Cannot be used in a PSP script.

Available Component variables

Component variable name Description Remarks
count The number of read records by executing the select statement.
  • The value defaults to 0.
message_category When an error occurs, the category to which corresponding message code belongs to is stored.
  • The value defaults to null.
message_code When an error occurs, its corresponding message code is stored.
  • The value defaults to null.
message_level When an error occurs, the severity of the corresponding message code is stored.
  • The value defaults to null.
error_type When an error occurs, the type of the error is stored.
  • 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 The error message for the error occurred is stored.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
error_trace Stack trace of the occurred error is stored.
  • 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 Causes Solution
ResourceNotFoundException
Resource not defined.Name: []
[Destination] is not specified. Specify [Destination].
ResourceNotFoundException
Resource not defined.Name:[<name of Global Resources>]
Resource definition selected in [Destination] is not found. Please check the global resource specified in [Destination].
InvalidPropertyConfigurationException
<Global resource name >:There is no BusinessConnector connection.
Resource definition selected in [Destination] is not found. Please check the global resource specified in [Destination].
BusinessConnectorException
<Global resource name> Required connection settings cannot be null. Cannot connect to AX server.
[Destination]Resource definition is insufficient. Please check all items of resource definition selected in [Destination].
InvalidPropertyConfigurationException
Table name cannot be null.
[Table Name] is not set. Enter [Table Name]
BusinessConnectorException
The operation failed. The record [<Table Name>] does not exist.
[<Table Name>] may be incorrect. Please check the name of table in Microsoft Dynamics AX.
InvalidPropertyConfigurationException
It is not a SELECT statement.
[<Select statement for AX>] may be incorrect. Please check the input of [Select statement for AX].
BusinessConnectorException
ExcecuteStmt Error(sql=[<Select statement for AX>])[Table][<Table Name>]
Cannot execute [<Select statement for AX>]. Please check the input of [Select statement for AX].
InvalidPropertyConfigurationException
No output column setting.
[Output] is not set. Please check the setting of [Output].
BusinessConnectorException
get_Field Error(col=[<Output/Column Name>])
[<Output/Column Name>] may be incorrect. Please check the [<Output/Column Name>] in Microsoft Dynamics AX table.
Exception
Error coltype number
The column names in [<Select statement for AX>] may be incorrect. Please check the input of [Select statement for AX].

Notes

About select Statement

When do Read Table, the select statement input in [Select Statement for AX] should be used in Microsoft Dynamics AX. If "*" following "select" in the select statement is not used, spacified column names in a select statement should include all column names which are set in [Output/Column Name].

Read Table

If spacified column names in a select statement are less than the settings of [Output/Column Name], error will occur.