Download as pdf or txt
Download as pdf or txt
You are on page 1of 37

Welcome to Talend Help Center

Access
2022-03-17

1. Access
1. Access components
1. tAccessBulkExec
1. tAccessBulkExec Standard properties
2. tAccessClose
1. tAccessClose Standard properties
3. tAccessCommit
1. tAccessCommit Standard properties
4. tAccessConnection
1. tAccessConnection Standard properties
5. tAccessInput
1. tAccessInput Standard properties
6. tAccessOutput
1. tAccessOutput Standard properties
7. tAccessOutputBulk
1. tAccessOutputBulk Standard properties
8. tAccessOutputBulkExec
1. tAccessOutputBulkExec Standard properties
9. tAccessRollback
1. tAccessRollback Standard properties
10. tAccessRow
1. tAccessRow Standard properties
2. Access scenario
1. Inserting data in parent/child tables

Access

Access components
tAccessBulkExec

Offers gains in performance when carrying out Insert operations in an Access database.

The tAccessOutputBulk and tAccessBulkExec components are generally used together to output data to a delimited file and then to
perform various actions on the file in an Access database, in a two step process. These two steps are fused together in the
tAccessOutputBulkExec component, detailed in a separate section. The advantage of using a two step process is that it makes it
possible to carry out transformations on the data before loading it in the database.

This component executes an Insert action on the data provided.

For more technologies supported by Talend, see Talend components.

tAccessBulkExec Standard properties

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

The Standard tAccessBulkExec component belongs to the Databases family.

The component in this framework is available in all Talend products.

Note: This component is a specific version of a dynamic database connector. The properties related to database settings vary
depending on your database type selection. For more information about dynamic database connectors, see Dynamic database
components.

Basic settings

Database
Select a type of database from the list and click Apply.

Property type Either Built-in or Repository .

Built-in: No property data is stored centrally.


Repository: Select the repository file in which the
properties are stored. The fields that follow are
completed automatically using the data retrieved.

File Name Browse to the delimited file to be loaded into your database.

Create directory if does not exist


Select this check box to have the directories specified in the
File Name field created if the directories do not exist.

Append
Select this check box to append the data to the file.
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. When you create a Spark Job, avoid the reserved
word line when naming the fields.

Built-in: The schema is created and stored locally for


this component only. Related topic: see Talend Studio
User Guide .
Repository: The schema already exists and is stored in
the Repository, hence can be reused. 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

Include header Select this check box to include the column header.

Use text enclosure


Select this check box to enclose the text with characters. You
can specify the character used to enclose the text in the Field
enclosure field.

Encoding Select the encoding from the list or select Custom and define
it manually. This field is compulsory for DB data handling.

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

Usage
Usage rule This component is to be used along with tAccessOutputBulk
component. Used together, they can offer gains in
performance while feeding an Access database.

Dynamic settings Click the [+] button to add a row in the table and fill the Code
field with a context variable to choose your database
connection dynamically from multiple connections planned
in your Job. This feature is useful when you need to access
database tables having the same data structure but in
different databases, especially when you are working in an
environment where you cannot change your Job settings, for
example, when your Job has to be deployed and executed
independent of Talend Studio.

The Dynamic settings table is available only when the Use an


existing connection check box is selected in the Basic settings
view. Once a dynamic parameter is defined, the Component
List box in the Basic settings view becomes unusable.

For examples on using dynamic parameters, see Reading data


from databases through context-based dynamic connections
and Reading data from different MySQL databases using
dynamically loaded connection parameters. For more
information on Dynamic settings and context variables, see
Talend Studio User Guide.

Limitation If you are using an ODBC driver, make sure that your JVM and
ODBC versions match up: both 64-bit or 32-bit.

tAccessClose

Closes an active connection to the Access database so as to release occupied resources.

For more technologies supported by Talend, see Talend components.

Inserting data in parent/child tables

tAccessClose Standard properties

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

The Standard tAccessClose component belongs to the Databases family.

The component in this framework is available in all Talend products.

Note: This component is a specific version of a dynamic database connector. The properties related to database settings vary
depending on your database type selection. For more information about dynamic database connectors, see Dynamic database
components.

Basic settings
Database
Select a type of database from the list and click Apply.

Component list Select the tAccessConnection component in the list if more


than one connection is planned for the current Job.

Advanced settings

tStat Catcher Statistics Select this check box to gather the Job processing metadata
at the Job level as well as at each component level.

Usage

Usage rule This component is to be used along with other Access


components, especially with tAccessConnection and
tAccessCommit.

Dynamic settings Click the [+] button to add a row in the table and fill the Code
field with a context variable to choose your database
connection dynamically from multiple connections planned
in your Job. This feature is useful when you need to access
database tables having the same data structure but in
different databases, especially when you are working in an
environment where you cannot change your Job settings, for
example, when your Job has to be deployed and executed
independent of Talend Studio.

Once a dynamic parameter is defined, the Component List


box in the Basic settings view becomes unusable.

For examples on using dynamic parameters, see Reading data


from databases through context-based dynamic connections
and Reading data from different MySQL databases using
dynamically loaded connection parameters. For more
information on Dynamic settings and context variables, see
Talend Studio User Guide.

Limitation If you are using an ODBC driver, you need to work with Java 7,
and make sure that your JVM and ODBC versions match up:
both 64-bit or 32-bit.

tAccessCommit

Commits in one go a global transaction instead of doing that on every row or every batch, and provides gain in performance, using a
unique connection.

tAccessCommit validates the data processed through the Job into the connected database.
For more technologies supported by Talend, see Talend components.

Inserting data in parent/child tables

tAccessCommit Standard properties

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

The Standard tAccessCommit component belongs to the Databases family.

The component in this framework is available in all Talend products.

Note: This component is a specific version of a dynamic database connector. The properties related to database settings vary
depending on your database type selection. For more information about dynamic database connectors, see Dynamic database
components.

Basic settings

Database
Select a type of database from the list and click Apply.

Component list Select the tAccessConnection component in the list if more


than one connection are planned for the current Job.

Close Connection This check box is selected by default. It allows you to close the
database connection once the commit is done. Clear this
check box to continue to use the selected connection once
the component has performed its task.

Warning:

If you want to use a Row > Main connection to link


tAccessCommit to your Job, your data will be committed
row by row. In this case, do not select the Close
connection check box or your connection will be closed
before the end of your first row commit.

Advanced settings

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

Usage

Usage rule This component is more commonly used with other tAccess*
components, especially with the tAccessConnection and
tAccessRollback components.
Dynamic settings Click the [+] button to add a row in the table and fill the Code
field with a context variable to choose your database
connection dynamically from multiple connections planned
in your Job. This feature is useful when you need to access
database tables having the same data structure but in
different databases, especially when you are working in an
environment where you cannot change your Job settings, for
example, when your Job has to be deployed and executed
independent of Talend Studio.

Once a dynamic parameter is defined, the Component List


box in the Basic settings view becomes unusable.

For examples on using dynamic parameters, see Reading data


from databases through context-based dynamic connections
and Reading data from different MySQL databases using
dynamically loaded connection parameters. For more
information on Dynamic settings and context variables, see
Talend Studio User Guide.

Limitation If you are using an ODBC driver, you need to work with Java 7,
and make sure that your JVM and ODBC versions match up:
both 64-bit or 32-bit.

tAccessConnection

Opens a connection to the specified database that can then be reused in the subsequent subJob or subJobs.

tAccessConnection opens a connection to the database for a current transaction.

For more technologies supported by Talend, see Talend components.

Inserting data in parent/child tables

tAccessConnection Standard properties

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

The Standard tAccessConnection component belongs to the Databases and the ELT families.

The component in this framework is available in all Talend products.

Note: This component is a specific version of a dynamic database connector. The properties related to database settings vary
depending on your database type selection. For more information about dynamic database connectors, see Dynamic database
components.

Basic settings

Database
Select a type of database from the list and click Apply.
Property type Either Built-in or Repository .

Built-in: No property data stored centrally.


Repository: Select the repository file in which the
properties are stored. The fields that follow are
completed automatically using the data retrieved.

Database Name of the database.

Username and Password DB user authentication data.

To enter the password, click the [...] button next to the


password field, and then in the pop-up dialog box enter the
password between double quotes and click OK to save the
settings.

Use or register a shared DB Connection Select this check box to share your database connection or
fetch a database connection shared by a parent or child Job,
and in the Shared DB Connection Name field displayed, enter
the name for the shared database connection. This allows you
to share one single database connection (except the database
schema setting) among several database connection
components from different Job levels that can be either
parent or child.

This option is incompatible with the Use dynamic Job and


Use an independent process to run subJob options of the
tRunJob component. Using a shared connection together
with a tRunJob component with either of these two options
enabled will cause your Job to fail.

Advanced settings

Additional JDBC parameters Specify additional connection properties for the DB


connection you are creating.

Usage

Usage rule This component is more commonly used with other tAccess*
components, especially with the tAccessCommit and
tAccessRollback components.
Limitation If you are using an ODBC driver, you need to work with Java 7,
and make sure that your JVM and ODBC versions match up:
both 64-bit or 32-bit.

When working with Java 8, this component supports only the


General collation mode of Access.

tAccessInput

Reads a database and extracts fields based on a query.

tAccessInput executes a DB query with a strictly defined statement which must correspond to the schema definition. Then it passes
on the field list to the next component via a Row > Main connection.

For more technologies supported by Talend, see Talend components.

Inserting data in parent/child tables

tAccessInput Standard properties

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

The Standard tAccessInput component belongs to the Databases family.

The component in this framework is available in all Talend products.

Note: This component is a specific version of a dynamic database connector. The properties related to database settings vary
depending on your database type selection. For more information about dynamic database connectors, see Dynamic database
components.

Basic settings

Database
Select a type of database from the list and click Apply.

Property type Either Built-in or Repository .

Built-in: No property data stored centrally.


Repository: Select the repository file in which the
properties are stored. The fields that follow are
completed automatically using the data retrieved.

Click this icon to open a database connection wizard and


store the database connection parameters you set in the
component Basic settings view.

For more information about setting up and storing database


connection parameters, see the section describing how to set
up a DB connection of Talend Studio User Guide .
Use an existing connection Select this check box and in the Component List drop-down
list, select the desired connection component to reuse the
connection details you already defined.

Note: When a Job contains the parent Job and the child
Job, if you need to share an existing connection between
the two levels, for example, to share the connection
created by the parent Job with the child Job, you have to:

1. In the parent level, register the database


connection to be shared in the Basic settings view
of the connection component which creates that
very database connection.

2. In the child level, use a dedicated connection


component to read that registered database
connection.

For an example about how to share a database


connection across Job levels, see Talend Studio User
Guide .

Database Name of the database.

Username and Password DB user authentication data.

To enter the password, click the [...] button next to the


password field, and then in the pop-up dialog box enter the
password between double quotes and click OK to save the
settings.
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. When you create a Spark Job, avoid the reserved
word line when naming the fields.

This component offers the advantage of the dynamic schema


feature. This allows you to retrieve unknown columns from
source files or to copy batches of columns from a source
without mapping each column individually. For further
information about dynamic schemas, see Talend Studio User
Guide .

This dynamic schema feature is designed for the purpose of


retrieving unknown columns of a table and is recommended
to be used for this purpose only; it is not recommended for
the use of creating tables.

Built-in: The schema is created and stored locally for


this component only. Related topic: see Talend Studio
User Guide .
Repository: The schema already exists and is stored in
the Repository, hence can be reused. 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.

Table Name
Enter the name of the table to retrieve data from.

Query type and Query Enter your DB query paying particularly attention to properly
sequence the fields in order to match the schema definition.

If using the dynamic schema feature, the SELECT query must


include the * wildcard, to retrieve all of the columns from the
table selected.

Advanced settings
Additional JDBC parameters Specify additional connection properties for the DB
connection you are creating. This option is not available if you
have selected the Use an existing connection check box in the
Basic settings.

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

Trim all the String/Char columns Select this check box to remove leading and trailing
whitespace from all the String/Char columns.

Trim column Remove leading and trailing whitespace from defined


columns.

Global Variables

Global Variables  NB_LINE: the number of rows processed. This is an After


variable and it returns an integer.

QUERY: the query statement being processed. This is a Flow


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 offers the flexibility benefit of the DB query
and covers all possible SQL queries.
Dynamic settings Click the [+] button to add a row in the table and fill the Code
field with a context variable to choose your database
connection dynamically from multiple connections planned
in your Job. This feature is useful when you need to access
database tables having the same data structure but in
different databases, especially when you are working in an
environment where you cannot change your Job settings, for
example, when your Job has to be deployed and executed
independent of Talend Studio.

The Dynamic settings table is available only when the Use an


existing connection check box is selected in the Basic settings
view. Once a dynamic parameter is defined, the Component
List box in the Basic settings view becomes unusable.

For examples on using dynamic parameters, see Reading data


from databases through context-based dynamic connections
and Reading data from different MySQL databases using
dynamically loaded connection parameters. For more
information on Dynamic settings and context variables, see
Talend Studio User Guide.

Limitation If you are using an ODBC driver, you need to work with Java 7,
and make sure that your JVM and ODBC versions match up:
both 64-bit or 32-bit.

When working with Java 8, this component supports only the


General collation mode of Access.

tAccessOutput

Writes, updates, makes changes or suppresses entries in a database.

tAccessOutput 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.

For more technologies supported by Talend, see Talend components.

Inserting data in parent/child tables

tAccessOutput Standard properties

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

The Standard tAccessOutput component belongs to the Databases family.

The component in this framework is available in all Talend products.

Note: This component is a specific version of a dynamic database connector. The properties related to database settings vary
depending on your database type selection. For more information about dynamic database connectors, see Dynamic database
components.

Basic settings
Database
Select a type of database from the list and click Apply.

Property type Either Built-in or Repository .

Built-in: No property data stored centrally.


Repository: Select the repository file in which the
properties are stored. The fields that follow are
completed automatically using the data retrieved.

Click this icon to open a database connection wizard and


store the database connection parameters you set in the
component Basic settings view.

For more information about setting up and storing database


connection parameters, see Talend Studio User Guide .

Use an existing connection Select this check box and in the Component List drop-down
list, select the desired connection component to reuse the
connection details you already defined.

Note: When a Job contains the parent Job and the child
Job, if you need to share an existing connection between
the two levels, for example, to share the connection
created by the parent Job with the child Job, you have to:

1. In the parent level, register the database


connection to be shared in the Basic settings view
of the connection component which creates that
very database connection.

2. In the child level, use a dedicated connection


component to read that registered database
connection.

For an example about how to share a database


connection across Job levels, see Talend Studio User
Guide .

Database Name of the database

Username and Password DB user authentication data.

To enter the password, click the [...] button next to the


password field, and then in the pop-up dialog box enter the
password between double quotes and click OK to save the
settings.
Table Name of the table to be written. Note that only one table can
be written at a time

Action on table On the table defined, you can perform one of the following
operations:

Default: No operation is carried out.

Drop and create table: The table is removed and created


again.

Create table: The table does not exist and gets created.

Create table if not exists: The table is created if it does not


exist.

Drop table if exists and create: The table is removed if it


already exists and created again.

Clear table: The table content is deleted.


Action on data On the data of the table defined, you can perform:

Insert: Add new entries to the table. If duplicates are found,


Job stops.

Update: Make changes to existing entries.

Note: In cases where all the schema columns are set as


keys, this action yields an error and the Job fails.

Insert or update: Insert a new record. If the record with the


given reference already exists, an update would be made.

Note: In cases where all the schema columns are set as


keys, this action yields a warning message and the Job
continues.

Update or insert: Update the record with the given reference.


If the record does not exist, a new record would be inserted.

Note: In cases where all the schema columns are set as


keys, this action yields a warning message and the Job
continues.

Delete: Remove entries corresponding to the input flow.

Warning:

You must specify at least one column as a primary key on


which the Update and Delete operations are 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 and delete operations. To do
that: Select the Use field options check box and then in
the Key in update column, select the check boxes next to
the column name on which you want to base the update
operation. Do the same in the Key in delete column for
the deletion 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. When you create a Spark Job, avoid the reserved
word line when naming the fields.

Built-In: You create and store the schema locally for this
component only.

Repository: You have already created the schema and stored


it in the Repository. You can reuse it in various projects and
Job designs.

When the schema to be reused has default values that are


integers or functions, ensure that these default values are not
enclosed within quotation marks. If they are, you must
remove the quotation marks manually.

For more information, see the related description of retrieving


table schemas in 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.

Die on error This check box is selected by default. Clear the check box to
skip the row on error and complete the process for error-free
rows. If needed, you can retrieve the rows on error via a Row >
Rejects link.

Advanced settings
Additional JDBC parameters Specify additional connection properties for the DB
connection you are creating. This option is not available if you
have selected the Use an existing connection check box in the
Basic settings.

Note:

You can press Ctrl+Space to access a list of predefined


global variables.

Commit every Number of rows to be completed before committing batches


of rows together into the DB. This option ensures transaction
quality (but not rollback) and, above all, better performance
at executions.

Additional Columns This option is not offered if you create (with or without drop)
the DB table. This option allows you to call SQL functions to
perform actions on columns, which are not insert, nor update
or delete actions, or action that require particular
preprocessing.

Name: Type in the name of the schema column to be


altered or inserted as new column.
SQL expression: Type in the SQL statement to be
executed in order to alter or insert the relevant
column data.
Position: Select Before, Replace or After following the
action to be performed on the reference column.
Reference column: Type in a column of reference that
the tDBOutput can use to place or replace the new or
altered column.

tStat Catcher Statistics Select this check box to collect log data at the component
level.
Select this check box to perform high-speed data processing,
Enable parallel execution
by treating multiple data flows simultaneously. Note that this
feature depends on the database or the application ability to
handle multiple inserts in parallel as well as the number of
CPU affected. In the Number of parallel executions field,
either:

Enter the number of parallel executions desired.


Press Ctrl + Space and select the appropriate context
variable from the list. For further information, see
Talend Studio User Guide .

Note that when parallel execution is enabled, it is not possible


to use global variables to retrieve return values in a subJob.

Warning:

The Action on table field is not available with the


parallelization function. Therefore, you must use a
tCreateTable component if you want to create a
table.
When parallel execution is enabled, it is not
possible to use global variables to retrieve return
values in a subJob.

Use field options Select this check box to customize a request, especially when
there is double action on data.

Debug query mode Select this check box to display each step during processing
entries in a database.

Support null in "SQL WHERE" statement Select this check box if you want to deal with the Null values
contained in a DB table.

Note:

Make sure the Nullable check box is selected for the


corresponding columns in the schema.

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.

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 offers the flexibility benefit of the DB query
and covers all of the SQL queries possible.

This component must be used as an output component. It


allows you to carry out actions on a table or on the data of a
table in a Access database. It also allows you to create a reject
flow using a Row > Rejects link to filter data in error. For an
example of tMysqlOutput in use, see Retrieving data in error
with a Reject link.
Dynamic settings Click the [+] button to add a row in the table and fill the Code
field with a context variable to choose your database
connection dynamically from multiple connections planned
in your Job. This feature is useful when you need to access
database tables having the same data structure but in
different databases, especially when you are working in an
environment where you cannot change your Job settings, for
example, when your Job has to be deployed and executed
independent of Talend Studio.

The Dynamic settings table is available only when the Use an


existing connection check box is selected in the Basic settings
view. Once a dynamic parameter is defined, the Component
List box in the Basic settings view becomes unusable.

For examples on using dynamic parameters, see Reading data


from databases through context-based dynamic connections
and Reading data from different MySQL databases using
dynamically loaded connection parameters. For more
information on Dynamic settings and context variables, see
Talend Studio User Guide.

Limitation If you are using an ODBC driver, you need to work with Java 7,
and make sure that your JVM and ODBC versions match up:
both 64-bit or 32-bit.

When working with Java 8, this component supports only the


General collation mode of Access.

tAccessOutputBulk

Prepares the file which contains the data used to feed the Access database.

The tAccessOutputBulk and tAccessBulkExec components are generally used together to output data to a delimited file and then to
perform various actions on the file in an Access database, in a two step process. These two steps are fused together in the
tAccessOutputBulkExec component, detailed in a separate section. The advantage of using a two step process is that it makes it
possible to carry out transformations on the data before loading it in the database.

tAccessOutputBulk writes a delimited file.

For more technologies supported by Talend, see Talend components.

tAccessOutputBulk Standard properties

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

The Standard tAccessOutputBulk component belongs to the Databases family.

The component in this framework is available in all Talend products.

Note: This component is a specific version of a dynamic database connector. The properties related to database settings vary
depending on your database type selection. For more information about dynamic database connectors, see Dynamic database
components.
Basic settings

Database
Select a type of database from the list and click Apply.

Property type Either Built-in or Repository .

Built-in: No property data stored centrally.


Repository: Select the repository file in which the
properties are stored. The fields that follow are
completed automatically using the data retrieved.

File Name Name and path to the file to be created and/or the variable to
be used.

For further information about how to define and use a


variable in a Job, see Talend Studio User Guide .

Create directory if does not exist Select this check box to create the as yet non-existant file
directory that specified in the File Name field.

Append Select this check box to add any new rows to the end of the
file.
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. When you create a Spark Job, avoid the reserved
word line when naming the fields.

Built-In: You create and store the schema locally for this
component only.

Repository: You have already created the schema and stored


it in the Repository. You can reuse it in various projects and
Job designs.

When the schema to be reused has default values that are


integers or functions, ensure that these default values are not
enclosed within quotation marks. If they are, you must
remove the quotation marks manually.

For more information, see the related description of retrieving


table schemas in 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

Include header Select this check box to include the column header in the file.

Use text enclosure


Select this check box to enclose the text with characters. You
can specify the character used to enclose the text in the Field
enclosure field.

Encoding Select the encoding from the list or select Custom and define
it manually. This field is compulsory for DB data handling.
tStat Catcher 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.

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 to be used along with tAccessBulkExec


component. Used together they offer gains in performance
while feeding an Access database.

Component family Databases/Access

Limitation If you are using an ODBC driver, you need to work with Java 7,
and make sure that your JVM and ODBC versions match up:
both 64-bit or 32-bit.

When working with Java 8, this component supports only the


General collation mode of Access.

tAccessOutputBulkExec

Executes an Insert action on the data provided, in an Access database.

The tAccessOutputBulk and tAccessBulkExec components are generally used together to output data to a delimited file and then to
perform various actions on the file in an Access database, in a two step process. These two steps are fused together in
tAccessOutputBulkExec.

As a dedicated component, tAccessOutputBulkExec improves performance during Insert operations in an Access database.
For more technologies supported by Talend, see Talend components.

tAccessOutputBulkExec Standard properties

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

The Standard tAccessOutputBulkExec component belongs to the Databases family.

The component in this framework is available in all Talend products.

Note: This component is a specific version of a dynamic database connector. The properties related to database settings vary
depending on your database type selection. For more information about dynamic database connectors, see Dynamic database
components.

Basic settings

Database
Select a type of database from the list and click Apply.

Property type Either Built-in or Repository .

Built-in: No property data stored centrally.


Repository: Select the repository file in which the
properties are stored. The fields that follow are
completed automatically using the data retrieved.

File Name Name of the file to be processed.

Related topic: see Talend Studio User Guide .


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. When you create a Spark Job, avoid the reserved
word line when naming the fields.

Built-In: You create and store the schema locally for this
component only.

Repository: You have already created the schema and stored


it in the Repository. You can reuse it in various projects and
Job designs.

When the schema to be reused has default values that are


integers or functions, ensure that these default values are not
enclosed within quotation marks. If they are, you must
remove the quotation marks manually.

For more information, see the related description of retrieving


table schemas in 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.

Create directory if does not exist Select this check box to create the as yet non existant file
directory specified in the File Name field.

Append Select this check box to append new rows to the end of the
file.

Advanced settings

Include header Select this check box to include the column header to the file.
Use text enclosure
Select this check box to enclose the text with characters. You
can specify the character used to enclose the text in the Field
enclosure field.

Encoding Select the encoding from the list or select Custom and define
it manually. This field is compulsory for DB data handling.

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

Usage

Usage rule This component is mainly used when no particular


transformation is required on the data to be loaded in the
database.

Dynamic settings Click the [+] button to add a row in the table and fill the Code
field with a context variable to choose your database
connection dynamically from multiple connections planned
in your Job. This feature is useful when you need to access
database tables having the same data structure but in
different databases, especially when you are working in an
environment where you cannot change your Job settings, for
example, when your Job has to be deployed and executed
independent of Talend Studio.

The Dynamic settings table is available only when the Use an


existing connection check box is selected in the Basic settings
view. Once a dynamic parameter is defined, the Component
List box in the Basic settings view becomes unusable.

For examples on using dynamic parameters, see Reading data


from databases through context-based dynamic connections
and Reading data from different MySQL databases using
dynamically loaded connection parameters. For more
information on Dynamic settings and context variables, see
Talend Studio User Guide.

Limitation If you are using an ODBC driver, make sure that your JVM and
ODBC versions match up: both 64-bit or 32-bit.

tAccessRollback

Cancels the transaction commit in the connected database and avoids to commit part of a transaction involuntarily.

For more technologies supported by Talend, see Talend components.


tAccessRollback Standard properties

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

The Standard tAccessRollback component belongs to the Databases family.

The component in this framework is available in all Talend products.

Note: This component is a specific version of a dynamic database connector. The properties related to database settings vary
depending on your database type selection. For more information about dynamic database connectors, see Dynamic database
components.

Basic settings

Database
Select a type of database from the list and click Apply.

Component list Select the tAccessConnection component in the list if more


than one connection are planned for the current Job.

Close Connection Clear this check box to continue to use the selected
connection once the component has performed its task.

Advanced settings

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

Usage

Usage rule This component is more commonly used with other tAccess*
components, especially with the tAccessConnection and
tAccessCommit components.
Dynamic settings Click the [+] button to add a row in the table and fill the Code
field with a context variable to choose your database
connection dynamically from multiple connections planned
in your Job. This feature is useful when you need to access
database tables having the same data structure but in
different databases, especially when you are working in an
environment where you cannot change your Job settings, for
example, when your Job has to be deployed and executed
independent of Talend Studio.

Once a dynamic parameter is defined, the Component List


box in the Basic settings view becomes unusable.

For examples on using dynamic parameters, see Reading data


from databases through context-based dynamic connections
and Reading data from different MySQL databases using
dynamically loaded connection parameters. For more
information on Dynamic settings and context variables, see
Talend Studio User Guide.

Limitation If you are using an ODBC driver, you need to work with Java 7,
and make sure that your JVM and ODBC versions match up:
both 64-bit or 32-bit.

tAccessRow

Executes the SQL query stated onto the specified database.

Depending on the nature of the query and the database, tAccessRow acts on the actual DB structure or on the data (although
without handling data). The SQLBuilder tool helps you write easily your SQL statements. tAccessRow is the specific component for
this database query. The row suffix means the component implements a flow in the Job design although it does not provide output.

For more technologies supported by Talend, see Talend components.

tAccessRow Standard properties

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

The Standard tAccessRow component belongs to the Databases family.

The component in this framework is available in all Talend products.

Note: This component is a specific version of a dynamic database connector. The properties related to database settings vary
depending on your database type selection. For more information about dynamic database connectors, see Dynamic database
components.

Basic settings

Database
Select a type of database from the list and click Apply.
Property type Either Built-in or Repository .

Built-in: No property data stored centrally.


Repository: Select the repository file in which the
properties are stored. The fields that follow are
completed automatically using the data retrieved.

Use an existing connection Select this check box and in the Component List drop-down
list, select the desired connection component to reuse the
connection details you already defined.

Note: When a Job contains the parent Job and the child
Job, if you need to share an existing connection between
the two levels, for example, to share the connection
created by the parent Job with the child Job, you have to:

1. In the parent level, register the database


connection to be shared in the Basic settings view
of the connection component which creates that
very database connection.

2. In the child level, use a dedicated connection


component to read that registered database
connection.

For an example about how to share a database


connection across Job levels, see Talend Studio User
Guide .

Database Name of the database

Username and Password DB user authentication data.

To enter the password, click the [...] button next to the


password field, and then in the pop-up dialog box enter the
password between double quotes and click OK to save the
settings.
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. When you create a Spark Job, avoid the reserved
word line when naming the fields.

Built-in: The schema is created and stored locally for


this component only. Related topic: see Talend Studio
User Guide .
Repository: The schema already exists and is stored in
the Repository, hence can be reused. 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.

Table Name Name of the source table where changes made to data should
be captured.

Query type The query can be Built-in for a particular Job, or for
commonly used query, it can be stored in the Repository to
ease the query reuse.

Built-in: Fill in manually the query statement or build


it graphically using SQLBuilder.
Repository: Select the relevant query stored in the
Repository. The Query field gets accordingly filled in.

Query Enter your DB query paying particularly attention to properly


sequence the fields in order to match the schema definition.

Die on error This check box is selected by default. Clear the check box to
skip the row on error and complete the process for error-free
rows. If needed, you can retrieve the rows on error via a Row >
Rejects link.
Advanced settings

Additional JDBC Parameters


Specify additional connection properties for the DB
connection you are creating. This option is not available if you
have selected the Use an existing connection check box in the
Basic settings view.

Note: You can press Ctrl+Space to access a list of


predefined global variables.

Propagate QUERY's recordset Select this check box to insert the result of the query into a
COLUMN of the current flow. Select this column from the use
column list.

Use PreparedStatement Select this check box if you want to query the database using
a PreparedStatement. In the Set PreparedStatement
Parameter table, define the parameters represented by "?" in
the SQL instruction of the Query field in the Basic Settings
tab.

Parameter Index: Enter the parameter position in the SQL


instruction.

Parameter Type: Enter the parameter type.

Parameter Value: Enter the parameter value.

Note: This option is very useful if you need to execute the


same query several times. Performance levels are
increased.

Commit every Number of rows to be completed before committing batches


of rows together into the DB. This option ensures transaction
quality (but not rollback) and above all better performance on
executions.

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

Global Variables
Global Variables  QUERY: the query statement being processed. This is a Flow
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 offers the flexibility of the DB query and
covers all possible SQL queries.

Dynamic settings Click the [+] button to add a row in the table and fill the Code
field with a context variable to choose your database
connection dynamically from multiple connections planned
in your Job. This feature is useful when you need to access
database tables having the same data structure but in
different databases, especially when you are working in an
environment where you cannot change your Job settings, for
example, when your Job has to be deployed and executed
independent of Talend Studio.

The Dynamic settings table is available only when the Use an


existing connection check box is selected in the Basic settings
view. Once a dynamic parameter is defined, the Component
List box in the Basic settings view becomes unusable.

For examples on using dynamic parameters, see Reading data


from databases through context-based dynamic connections
and Reading data from different MySQL databases using
dynamically loaded connection parameters. For more
information on Dynamic settings and context variables, see
Talend Studio User Guide.
Limitation If you are using an ODBC driver, you need to work with Java 7,
and make sure that your JVM and ODBC versions match up:
both 64-bit or 32-bit.

When working with Java 8, this component supports only the


General collation mode of Access.

Access scenario
Inserting data in parent/child tables

The following Job is dedicated to advanced database users, who want to carry out multiple table insertions using a parent table
Table1 to generate two child tables: Name and Birthday .

For more technologies supported by Talend, see Talend components.

In Access 2007, create an Access database named Database1 .

Once the Access database is created, create a table named Table1 with two column headings: Name and Birthday .

Back into the Integration perspective of Talend Studio , the Job requires twelve components including tAccessConnection,
tAccessCommit, tAccessInput, tAccessOutput and tAccessClose.

Drop the following components from the Palette to the design workspace: tFileList, tFileInputDelimited, tMap, tAccessOutput
(two), tAccessInput (two), tAccessCommit, tAccessClose and tLogRow (x2).

Connect the tFileList component to the input file component using an Iterate link. Thus, the name of the file to be processed
will be dynamically filled in from the tFileList directory using a global variable.

Connect the tFileInputDelimited component to the tMap component and dispatch the flow between the two output Access
components. Use a Row link for each of these connections representing the main data flow.

Set the tFileList component properties, such as the directory where files will be fetched from.
Add a tAccessConnection component and connect it to the starter component of this Job. In this example, the tFileList
component uses an OnComponentOk link to define the execution order.

In the tAccessConnection Component view, set the connection details manually or fetch them from the Repository if you
centrally store them as a Metadata DB connection entry. For more information about Metadata, see Talend Studio User Guide
.

In the tFileInputDelimited component's Basic settings view, press Ctrl+Space bar to access the variable list. Set the File Name
field to the global variable: tFileList_1.CURRENT_FILEPATH . For more information about using variables, see Talend Studio
User Guide .

Set the rest of the fields as usual, defining the row and field separators according to your file structure.

Then set the schema manually through the Edit schema dialog box or select the schema from the Repository . Make sure the
data type is correctly set, in accordance with the nature of the data processed.

In the tMap Output area, add two output tables, one called Name for the Name table, the second called Birthday , for the
Birthday table. For more information about the tMap component, see Talend Studio User Guide .

Drag the Name column from the Input area, and drop it to the Name table.

Drag the Birthday column from the Input area, and drop it to the Birthday table.

Then connect the output row links to distribute the flow correctly to the relevant DB output components.

In each of the tAccessOutput components' Basic settings view, select the Use an existing connection check box to retrieve the
tAccessConnection details.
Set the Table name making sure it corresponds to the correct table, in this example either Name or Birthday .

Select Default from the Action on table drop-down list. This is because the tables already exist and no operation is needed for
the tables.

Select Insert as Action on data for both output components.

Click on Sync columns to retrieve the schema set in the tMap.

Then connect the first tAccessOutput component to the first tAccessInput component using an OnComponentOk link.

In each of the tAccessInput components' Basic settings view, select the Use an existing connection check box to retrieve the
distributed data flow. Then set the schema manually through Edit schema dialog box.

Then set the Table Name accordingly. In tAccessInput_1, this will be Name .

Click on the Guess Query.

Connect each tAccessInput component to tLogRow component with a Row > Main link. In each of the tLogRow components'
basic settings view, select Table in the Mode field.

Add the tAccessCommit component below the tFileList component in the design workspace and connect them together
using an OnComponentOk link in order to terminate the Job with the transaction commit.

In the basic settings view of tAccessCommit component and from the Component list, select the connection to be used,
tAccessConnection_1 in this scenario.

Save your Job and press F6 to execute it.

The parent table Table1 is reused to generate the Name table and Birthday table.

tAccessInput tFileList
tAccessConnectiontMap
tAccessCommit tFileInputDelimited
tAccessOutput tLogRow
tAccessClose

You might also like