August 16, 2023

tOleDbOutput – Docs for ESB 6.x

tOleDbOutput

Executes the action defined on the table and/or on the data contained in the table,
based on the flow incoming from the preceding component in the Job.

This component writes, updates, makes changes or suppresses entries in a
database.

tOleDbOutput Standard properties

These properties are used to configure tOleDbOutput running in the Standard Job framework.

The Standard
tOleDbOutput component belongs to the Databases family.

The component in this framework is generally available.

Basic settings

Database

Enter the connection string used to open the database. For details, please see http://msdn.microsoft.com/en-us/library/system.data.oledb.oledbconnection.connectionstring.aspx.

Table

Specify the name of the table to be written. Note that only one table can be written at
a time.

Action on data

Select one of the following actions that you want to perform on the data from the
drop-down list.

  • Insert: insert
    data.

  • Update: update
    data.

  • Insert or update:
    insert a new record. If the record with the given
    reference already exists, an update would be
    made.

  • Update or insert:
    update the record with the given reference. If the
    record does not exist, a new record would be
    inserted.

  • Delete: delete
    data.

Warning:

It is necessary to specify at least one
column as a primary key on which the Update or Delete operation is based. You can do that
by clicking Edit schema and
selecting the check box(es) next to the column(s) you want
to set as primary key(s). For an advanced use, click the
Advanced settings view
where you can simultaneously define primary keys for the
Update or Delete operation. To do that,
select the Use field
options
check box and then in the Key in update or Key in delete column, select the
check box(es) next to the column name(s) you want to use as
a base for the Update or Delete operation.

Note:

The dynamic schema feature can be used in the
following modes: Insert,
Update, Insert or update, Update or insert, Delete.

Clear data in table

Select this check box to delete data in the defined table before any operation.

Schema and Edit
schema

A schema is a row description. It defines the number of fields (columns) to
be processed and passed on to the next component. The schema is either Built-In or stored remotely in the Repository.

 

Built-In: You create and store the
schema locally for this component only. Related topic: see
Talend Studio

User Guide.

 

Repository: You have already created
the schema and stored it in the Repository. You can reuse it in various projects and
Job designs. Related topic: see
Talend Studio

User Guide.

 

Click Edit schema to make changes to the schema.
If the current schema is of the Repository type, three
options are available:

  • View schema: choose this option to view the
    schema only.

  • Change to built-in property: choose this
    option to change the schema to Built-in for
    local changes.

  • Update repository connection: choose this
    option to change the schema stored in the repository and decide whether to propagate
    the changes to all the Jobs upon completion. If you just want to propagate the
    changes to the current Job, you can select No
    upon completion and choose this schema metadata again in the [Repository Content] window.

Advanced settings

Additional columns

This option allows you to call SQL functions to perform actions on columns, provided
that these are not insert, update or delete actions, or actions that
require pre-processing.

  • Name: Type in the name of
    the schema column to be altered or inserted.

  • SQL expression: Type in the SQL statement to be
    executed in order to alter or insert the data in the
    corresponding column.

  • Position: Select Before, After or Replace, depending on the action to be
    performed on the reference column.

  • Reference column: Type in a reference column used to
    locate or replace the new column, or the column to be
    modified.

This option is not available if you have just created the DB table
(even if you delete it beforehand).

Use field options

Select this check box to customize a request, especially if multiple actions are being
carried out on the data.

Field options

Select the check box(es) in the table if you want to use the
corresponding schema column(s) as a base for your operation.

  • Key in update: define the primary key to use in an
    update operation.

  • Key in delete: define the
    primary key to use in a delete operation.

  • Updatable: define the
    column(s) to update.

  • Insertable: define the
    column(s) to insert.

This field appears only when the Use field
options
check box is selected.

Enable debug mode

Select this check box to display each step involved in the process
of writing data in the database.

tStatCatcher Statistics

Select this check box to collect log data at the component
level.

Global Variables

Global Variables

NB_LINE: the number of rows processed. This is an After
variable and it returns an integer.

NB_LINE_UPDATED: the number of rows updated. This is an
After variable and it returns an integer.

NB_LINE_INSERTED: the number of rows inserted. This is an
After variable and it returns an integer.

NB_LINE_DELETED: the number of rows deleted. This is an
After variable and it returns an integer.

NB_LINE_REJECTED: the number of rows rejected. This is an
After variable and it returns an integer.

QUERY: the query statement processed. This is an After
variable and it returns a string.

ERROR_MESSAGE: the error message generated by the
component when an error occurs. This is an After variable and it returns a string. This
variable functions only if the Die on error check box is
cleared, if the component has this check box.

A Flow variable functions during the execution of a component while an After variable
functions after the execution of the component.

To fill up a field or expression with a variable, press Ctrl +
Space
to access the variable list and choose the variable to use from it.

For further information about variables, see
Talend Studio

User Guide.

Usage

Usage rule

This component is normally an end component of a Job and always needs an input
link.

Related scenario

For similar scenarios, see tMysqlOutput.


Document get from Talend https://help.talend.com
Thank you for watching.
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x