Options - 6.3

Talend ESB Mediation Developer Guide

EnrichVersion
6.3
EnrichProdName
Talend Data Fabric
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Open Studio for ESB
Talend Real-Time Big Data Platform
task
Design and Development
EnrichPlatform
Talend ESB

Option

Type

Default

Description

batch

boolean

false

Camel 2.7.5, 2.8.4 and 2.9: Execute SQL batch update statements. See notes below on how the treatment of the inbound message body changes if this is set to true.

dataSourceRef

String

null

Deprecated and will be removed in Camel 3.0: Reference to a DataSource to look up in the registry. Use dataSource=#theName instead.

dataSource

String

null

Starting with Camel 2.11, Reference to a DataSource to look up in the registry.

placeholder

String

#

Specifies a character that will be replaced to ? in SQL query. Note that it is a simple String.replaceAll() operation and no SQL parsing is involved (quoted strings will also change). This replacement happens only if the endpoint is created using the SqlComponent. If you manually create the endpoint use the expected ? sign instead.

template.<xxx>

 

null

Sets additional options on the Spring JdbcTemplate that is used behind the scenes to execute the queries. For instance, template.maxRows=10. For detailed documentation, see the JdbcTemplate javadoc documentation.

allowNamed-Parameters

boolean

true

Camel 2.11: Whether to allow using named parameters in the queries.

processing-Strategy

Camel 2.11: SQL consumer only: Allows for plugging in a custom org.apache. camel.component. sql.SqlProcessingStrategy to execute queries when the consumer has processed the rows/batch.

prepareStatement-Strategy

Camel 2.11: Allows to plugin to use a custom org.apache. camel.component. sql. SqlPrepareStatementStrategy to control preparation of the query and prepared statement.

consumer.delay

long

500

Camel 2.11: SQL consumer only: Delay in milliseconds between each poll.

consumer.initial-Delay

long

1000

Camel 2.11: SQL consumer only: Milliseconds before polling starts.

consumer. useFixedDelay

boolean

false

Camel 2.11: SQL consumer only: Set to true to use fixed delay between polls, otherwise fixed rate is used. See ScheduledExecutorService in the Java doc for details.

maxMessagesPerPoll

int

0

Camel 2.11: (SQL consumer only) An integer value to define the maximum number of messages to gather per poll. By default, no maximum is set.

consumer. useIterator

boolean

true

Camel 2.11: (SQL consumer only): If true each row returned when polling will be processed individually. If false the entire java.util.List of data is set as the IN body.

consumer.route-EmptyResultSet

boolean

false

Camel 2.11: SQL consumer only: Whether to route a single empty Exchange if there was no data to poll.

consumer.onConsume

String

null

Camel 2.11: SQL consumer only: After processing each row then this query can be executed, if the Exchange was processed successfully, for example to mark the row as processed. The query can have parameter.

consumer.onConsume-Failed

String

null

Camel 2.11: (SQL consumer only) After processing each row this query can be executed, if the Exchange failed, for example to mark the row as failed. The query can take parameters.

consumer.onConsume-BatchComplete

String

null

Camel 2.11: (SQL consumer only) After processing the entire batch, this query can be executed to bulk update rows etc. The query cannot have parameters.

consumer.expected-UpdateCount

int

-1

Camel 2.11: (SQL consumer only) If using consumer.onConsume then this option can be used to set an expected number of rows being updated. Typically you may set this to 1 to expect one row to be updated.

consumer.break-BatchOnConsumeFail

boolean

false

Camel 2.11: (SQL consumer only) If using consumer. onConsume and it fails, then this option controls whether to break out of the batch or continue processing the next row from the batch.

alwaysPopulate-Statement

boolean

false

Camel 2.11: (SQL producer only) If enabled then the populateStatement method from org.apache.camel. component.sql. SqlPrepareStatementStrategy is always invoked, also if there are no expected parameters to be prepared. If set to false then the populateStatement is only invoked if there are one or more expected parameters to be set; for example this avoids reading the message body/headers for SQL queries with no parameters.

separator

char

,

Camel 2.11.1: The separator to use when parameter values is taken from message body (if the body is a String type), to be inserted at # placeholders. Notice if you use named parameters, then a Map type is used instead.

outputType

String

SelectList

Camel 2.12.0: Make the output of consumer or producer to SelectList as List of Map, or SelectOne as single Java object in the following way:

a) If the query has only single column, then that JDBC Column object is returned. (such as SELECT COUNT( * ) FROM PROJECT will return a Long object.

b) If the query has more than one column, then it will return a Map of that result.

c) If the outputClass is set, then it will convert the query result into an Java bean object by calling all the setters that match the column names. It will assume your class has a default constructor to create instance with.

d) If the query resulted in more than one rows, it throws an non-unique result exception.

outputClass

String

null

Camel 2.12.0: Specify the full package and class name to use as conversion when outputType=SelectOne.

parametersCount

int

0

Camel 2.11.2/2.12.0: If set greater than zero, then Camel will use this count value of parameters to replace instead of querying via JDBC metadata API. This is useful if the JDBC vendor could not return correct parameters count, then user may override instead.

noop

boolean

false

Camel 2.12.0: If set, will ignore the results of the SQL query and use the existing IN message as the OUT message for the continuation of processing