Execute Update SQL

Operation Name

Execute Update SQL

Function overview

Writes data to Dr.Sum EA table using SQL statements.

Data Model

Data model of this type of component is 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.  
Input data Optional Not available Select the component on the script canvas.
  • When SQL parameters is not used in [SQL statement], [Input data] is not specified.
Required settings
Item name Required/Optional Use of Variables Description Remarks
Destination Required Not available Select Global Resources.
Refer to " Global Resource Properties " for global resource settings .
  • [Add]:
    Adds new global resource.
  • [Edit list]:
    Global resource settings can be managed from "Edit Resource list".
 
SQL statement Required Available Enter the SQL statements to issue to the database.
  • "SQL parameters" can be used.
  • INSERT statement, UPDATE statement, DELETE statement, or SQL statements that return nothing can be specified.
  • [SQL statement] The SQL parameter is not included, java.sql.Class Statement executeUpdate () method is running, SQL parameter is included if it is, java.sql.Class PreparedStatement executeUpdate () method to execute. Please contact database vendor about executable SQL statements other than the above.
Schema definition Optional - Sets SQL parameters specified in [SQL statement].
  • It is not displayed when [SQL statement] does not use SQL parameter.
  • Column name shown in [Schema definition] is displayed in schema of Mapper.
Schema Definition / Column name Required Not available Set the SQL parameter name.
  • It is not displayed when [SQL statement] does not use SQL parameter.
Schema definition / Type Required Not available Select the SQL parameter type.
  • It is not displayed when [SQL statement] does not use SQL parameter.
  • Displayed in the format of "Native type (Internal data type)" .
    • Native type:
      Dr.Sum EA specific data type.
    • Internal data type
      Data type used internally in DataSpider.
      Refer to "here" for details .
Property Action
Item name Description Remarks
Refresh connection Refresh the connection to the newest status.  
SQL Wizard Start the SQL Wizard.
For instructions, refer to "SQL Wizard-Help ".
  • SQL statements specified in [SQL statement] can not be edited with wizard.
  • View, multi-table, link table are not shown.
Show table information Displays the structure, content and related information of tables of the database specified in [Destination].
Refer to "Table Information"for table information .
  • Enabled when [Destination] is selected.
  • View, multi-table and link table cannot be selected.
  • If a distributor is selected, the table contents are not displayed.
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

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

Output Schema

None.

Loading schema in Mapper

Schema is loaded automatically.
See "Edit Schema"for any details .

Transaction

Transaction 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 Returns the total number of written data.
  • The value defaults to null.
  • If an input data is specified, the input data count is stored.
  • If an input data is not specified, "1" is stored.
error_code When an error occurs, Dr.SumEA returns the error status in decimal value. If no error occurred, returns null.
  • The value defaults to null.
  • The message may vary depending on DataSpider Servista version.
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.

SQL parameters

In Execute Update SQL, SQL parameters can be used.
Uses SQL parameters to use pre-compiled SQL statements.Performance can be improved by using pre-compiled SQL statements when executing the same SQL statement for multiple times.

SQL parameter is described as "?{name}". "name" can be specified freely. Mapper sets the SQL parameter values.

For example, when SQL statement is described as "insert into test_table values (?{col1}, ?{col2}, ?{col3})", the 3 SQL parameters (col1, col2, col3) can be changed dynamically. If sets this SQL execution(pleistocene system) to the output destination of Mapper, the output schema of Mapper shows col1, col2, col3.Values can be set by mapping Mapper to each of col1, col2, col3.

Specification Limits

About specifications, please refer to the following page.

Main exceptions

Exception name Cause 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. Check the global resource specified in [Destination].
InvalidPropertyConfigurationException [SQL statement] is not specified. Please specify [SQL statement].

Notes

About specifications, please refer to the following page.