Contact Us 1-800-596-4880

Database Connector Reference 1.15

Anypoint Connector for Database (Database Connector) enables you to connect to relational databases through the JDBC API.

Configurations


Config

Default configuration

Parameters

Name Type Description Default Value Required

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Connection

The connection types to provide to this configuration.

x

Expiration Policy

Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Connection Types

Data Source Reference Connection

ConnectionProvider implementation which creates DB connections from a referenced DataSource

Parameters
Name Type Description Default Value Required

Pooling Profile

Column Types

Array of Column Type

Cache Query Template Size

Number

50

Data Source Ref

Any

x

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy

Derby Connection

Creates connections to a Derby database

Parameters
Name Type Description Default Value Required

Pooling Profile

Column Types

Array of Column Type

Cache Query Template Size

Number

50

Transaction Isolation

Enumeration, one of:

  • NONE

  • READ_COMMITTED

  • READ_UNCOMMITTED

  • REPEATABLE_READ

  • SERIALIZABLE

  • NOT_CONFIGURED

The transaction isolation level to set on the driver when connecting the database.

NOT_CONFIGURED

Use XA Transactions

Boolean

Indicates whether or not the created datasource has to support XA transactions. Default is false.

false

Database

String

Name of the database

Subsub Protocol

String

Specifies where Derby should look for the database. The available options are: 'directory', 'memory', 'classpath' and 'jar'.

directory

Create

Boolean

Indicates if the database should be created if it does not exist.

false

Connection Properties

Object

Specifies a list of custom key-value connectionProperties for the config.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy

Generic Connection

ConnectionProvider that creates connections for any kind of database using a JDBC URL and the required JDBC Driver Class

Parameters
Name Type Description Default Value Required

Pooling Profile

Column Types

Array of Column Type

Cache Query Template Size

Number

50

Transaction Isolation

Enumeration, one of:

  • NONE

  • READ_COMMITTED

  • READ_UNCOMMITTED

  • REPEATABLE_READ

  • SERIALIZABLE

  • NOT_CONFIGURED

NOT_CONFIGURED

Use XA Transactions

Boolean

false

URL

String

x

Driver Class Name

String

x

User

String

Password

String

Password to authenticate against the proxy server.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy

Microsoft SQL Server Connection

DbConnectionProvider implementation for Microsoft SQL Server Databases

Parameters
Name Type Description Default Value Required

Pooling Profile

Column Types

Array of Column Type

Cache Query Template Size

Number

50

Transaction Isolation

Enumeration, one of:

  • NONE

  • READ_COMMITTED

  • READ_UNCOMMITTED

  • REPEATABLE_READ

  • SERIALIZABLE

  • NOT_CONFIGURED

The transaction isolation level to set on the driver when connecting the database.

NOT_CONFIGURED

Use XA Transactions

Boolean

Indicates whether or not the created datasource has to support XA transactions. Default is false.

false

Host

String

Configures the host of the database.

x

Instance Name

String

Configures the name of the SQL server instance where the database is.

Port

Number

Configures the port of the database.

User

String

The user to use for authentication against the database.

Password

String

The password to use for authentication against the database.

Database Name

String

Name of the default database to work with.

Connection Properties

Object

Specifies a list of custom key-value connectionProperties for the config.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy

MySQL Connection

Creates connections to a MySQL database.

Parameters
Name Type Description Default Value Required

Pooling Profile

Column Types

Array of Column Type

Cache Query Template Size

Number

50

Transaction Isolation

Enumeration, one of:

  • NONE

  • READ_COMMITTED

  • READ_UNCOMMITTED

  • REPEATABLE_READ

  • SERIALIZABLE

  • NOT_CONFIGURED

The transaction isolation level to set on the driver when connecting the database.

NOT_CONFIGURED

Use XA Transactions

Boolean

Indicates whether or not the created datasource has to support XA transactions. Default is false.

false

Host

String

Configures the host of the database.

x

Port

Number

Configures the port of the database.

x

User

String

The user to use for authentication against the database.

Password

String

The password to use for authentication against the database.

Database

String

The name of the database.

Connection Properties

Object

Specifies a list of custom key-value connectionProperties for the config.

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy

Oracle Connection

Creates connections to a Oracle database

Parameters
Name Type Description Default Value Required

Pooling Profile

Column Types

Array of Column Type

Cache Query Template Size

Number

50

Transaction Isolation

Enumeration, one of:

  • NONE

  • READ_COMMITTED

  • READ_UNCOMMITTED

  • REPEATABLE_READ

  • SERIALIZABLE

  • NOT_CONFIGURED

The transaction isolation level to set on the driver when connecting the database.

NOT_CONFIGURED

Use XA Transactions

Boolean

Indicates whether or not the created datasource has to support XA transactions. Default is false.

false

Host

String

Configures the host of the database.

x

Port

Number

Configures the port of the database.

1521

User

String

The user to use for authentication against the database.

Password

String

The password to use for authentication against the database.

Instance

String

The name of the database instance.

Service Name

String

The name of the database service name.

TLS Context

TLS

The TLS factory used to create TLS secured connections

Reconnection

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy

Associated Sources

Operations

Bulk Delete

<db:bulk-delete>

Allows executing one delete statement various times using different parameter bindings. This happens using one single Database statement, which has performance advantages compared to executing one single delete operation various times.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Input Parameters

Array of Object

A List of Maps in which every list item represents a row to be inserted, and the map contains the parameter names as keys and the value the parameter is bound to.

#[payload]

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

SQL Query Text

String

The text of the SQL query to execute

x

Parameter Types

Array of Parameter Type

Allows to optionally specify the type of one or more of the parameters in the query. If provided, you’re not even required to reference all of the parameters, but you cannot reference a parameter not present in the input values

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Array of Number

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:RETRY_EXHAUSTED

  • DB:BAD_SQL_SYNTAX

Bulk Insert

<db:bulk-insert>

Allows executing one insert statement various times using different parameter bindings. This happens using one single Database statement, which has performance advantages compared to executing one single update operation various times.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Input Parameters

Array of Object

A List of Maps in which every list item represents a row to be inserted, and the map contains the parameter names as keys and the value the parameter is bound to.

#[payload]

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

SQL Query Text

String

The text of the SQL query to execute

x

Parameter Types

Array of Parameter Type

Allows to optionally specify the type of one or more of the parameters in the query. If provided, you’re not even required to reference all of the parameters, but you cannot reference a parameter not present in the input values

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Array of Number

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:RETRY_EXHAUSTED

  • DB:BAD_SQL_SYNTAX

Bulk Update

<db:bulk-update>

Allows executing one update statement various times using different parameter bindings. This happens using one single Database statement, which has performance advantages compared to executing one single update operation various times.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Input Parameters

Array of Object

A List of Maps in which every list item represents a row to be inserted, and the map contains the parameter names as keys and the value the parameter is bound to.

#[payload]

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

SQL Query Text

String

The text of the SQL query to execute

x

Parameter Types

Array of Parameter Type

Allows to optionally specify the type of one or more of the parameters in the query. If provided, you’re not even required to reference all of the parameters, but you cannot reference a parameter not present in the input values

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Array of Number

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:RETRY_EXHAUSTED

  • DB:BAD_SQL_SYNTAX

Delete

<db:delete>

Deletes data in a database.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

SQL Query Text

String

The text of the SQL query to execute

x

Parameter Types

Array of Parameter Type

Allows to optionally specify the type of one or more of the parameters in the query. If provided, you’re not even required to reference all of the parameters, but you cannot reference a parameter not present in the input values

Input Parameters

Object

A Map which keys are the name of an input parameter to be set on the JDBC prepared statement. Each parameter should be referenced in the sql text using a semicolon prefix (E.g: where ID = :myParamName)). The map’s values will contain the actual assignation for each parameter.

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Number

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:RETRY_EXHAUSTED

  • DB:BAD_SQL_SYNTAX

Execute DDL

<db:execute-ddl>

Enables execution of DDL queries against a database.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

SQL Query Text

String

The text of the SQL query to execute

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Number

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:RETRY_EXHAUSTED

  • DB:BAD_SQL_SYNTAX

Execute Script

<db:execute-script>

Executes a SQL script in one single Database statement. The script is executed as provided by the user, without any parameter binding.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

SQL Query Text

String

The text of the SQL query to execute

Script Path

String

The location of a file to load. The file can point to a resource on the classpath or on a disk.

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Array of Number

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:RETRY_EXHAUSTED

  • DB:BAD_SQL_SYNTAX

Insert

<db:insert>

Inserts data into a Database

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

SQL Query Text

String

The text of the SQL query to execute

x

Parameter Types

Array of Parameter Type

Allows to optionally specify the type of one or more of the parameters in the query. If provided, you’re not even required to reference all of the parameters, but you cannot reference a parameter not present in the input values

Input Parameters

Object

A Map which keys are the name of an input parameter to be set on the JDBC prepared statement. Each parameter should be referenced in the sql text using a semicolon prefix (E.g: where ID = :myParamName)). The map’s values will contain the actual assignation for each parameter.

Auto Generate Keys

Boolean

Indicates when to make auto-generated keys available for retrieval.

false

Auto Generated Keys Column Indexes

Array of Number

List of column indexes that indicates which auto-generated keys to make available for retrieval.

Auto Generated Keys Column Names

Array of String

List of column names that indicates which auto-generated keys should be made available for retrieval.

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Statement Result

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:RETRY_EXHAUSTED

  • DB:BAD_SQL_SYNTAX

Query Single

<db:query-single>

Selects single result from a database. If the indicated SQL query returns more than one record, only the first one is returned. Streaming is not used for this operation, which means that you must be careful because all selected fields will be loaded to memory.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

SQL Query Text

String

The text of the SQL query to execute

x

Parameter Types

Array of Parameter Type

Allows to optionally specify the type of one or more of the parameters in the query. If provided, you’re not even required to reference all of the parameters, but you cannot reference a parameter not present in the input values

Input Parameters

Object

A Map which keys are the name of an input parameter to be set on the JDBC prepared statement. Each parameter should be referenced in the sql text using a semicolon prefix (E.g: where ID = :myParamName)). The map’s values will contain the actual assignation for each parameter.

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Object

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:RETRY_EXHAUSTED

  • DB:BAD_SQL_SYNTAX

Select

<db:select>

Selects data from a database. Streaming is automatically applied to avoid preemptive consumption of such results, which may lead to performance and memory issues.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

SQL Query Text

String

The text of the SQL query to execute

x

Parameter Types

Array of Parameter Type

Allows to optionally specify the type of one or more of the parameters in the query. If provided, you’re not even required to reference all of the parameters, but you cannot reference a parameter not present in the input values

Input Parameters

Object

A Map which keys are the name of an input parameter to be set on the JDBC prepared statement. Each parameter should be referenced in the sql text using a semicolon prefix (E.g: where ID = :myParamName)). The map’s values will contain the actual assignation for each parameter.

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Array of Object

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:BAD_SQL_SYNTAX

Stored Procedure

<db:stored-procedure>

Invokes a Stored Procedure on the database. When the stored procedure returns one or more ResultSet instances, streaming is automatically applied to avoid preemptive consumption of such results, which may lead to performance and memory issues.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

Streaming Strategy

Configures how Mule processes streams. Repeatable streams are the default behavior.

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

SQL Query Text

String

The text of the SQL query to execute

x

Parameter Types

Array of Parameter Type

Allows to optionally specify the type of one or more of the parameters in the query. If provided, you’re not even required to reference all of the parameters, but you cannot reference a parameter not present in the input values

Input Parameters

Object

A Map which keys are the name of an input parameter to be set on the JDBC prepared statement. Each parameter should be referenced in the sql text using a semicolon prefix (E.g: where ID = :myParamName)). The map’s values will contain the actual assignation for each parameter.

Input - Output Parameters

Object

A Map which keys are the name of a parameter to be set on the JDBC prepared statement which is both input and output. Each parameter should be referenced in the sql text using a semicolon prefix (E.g: where ID = :myParamName)). The map’s values will contain the actual assignation for each parameter.

Output Parameters

Array of Output Parameter

A list of output parameters to be set on the JDBC prepared statement. Each parameter should be referenced in the sql text using a semicolon prefix (E.g: call multiply(:value, :result))

Auto Generate Keys

Boolean

Indicates when to make auto-generated keys available for retrieval.

false

Auto Generated Keys Column Indexes

Array of Number

List of column indexes that indicates which auto-generated keys to make available for retrieval.

Auto Generated Keys Column Names

Array of String

List of column names that indicates which auto-generated keys should be made available for retrieval.

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Object

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:RETRY_EXHAUSTED

  • DB:BAD_SQL_SYNTAX

Update

<db:update>

Updates data in a database.

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Transactional Action

Enumeration, one of:

  • ALWAYS_JOIN

  • JOIN_IF_POSSIBLE

  • NOT_SUPPORTED

The type of joining action that operations can take regarding transactions.

JOIN_IF_POSSIBLE

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

SQL Query Text

String

The text of the SQL query to execute

x

Parameter Types

Array of Parameter Type

Allows to optionally specify the type of one or more of the parameters in the query. If provided, you’re not even required to reference all of the parameters, but you cannot reference a parameter not present in the input values

Input Parameters

Object

A Map which keys are the name of an input parameter to be set on the JDBC prepared statement. Each parameter should be referenced in the sql text using a semicolon prefix (E.g: where ID = :myParamName)). The map’s values will contain the actual assignation for each parameter.

Auto Generate Keys

Boolean

Indicates when to make auto-generated keys available for retrieval.

false

Auto Generated Keys Column Indexes

Array of Number

List of column indexes that indicates which auto-generated keys to make available for retrieval.

Auto Generated Keys Column Names

Array of String

List of column names that indicates which auto-generated keys should be made available for retrieval.

Target Variable

String

Name of the variable that storesoperation’s output will be placed

Target Value

String

An expression to evaluate against the operation’s output and store the expression outcome in the target variable

#[payload]

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Statement Result

For Configurations

Throws

  • DB:QUERY_EXECUTION

  • DB:CONNECTIVITY

  • DB:RETRY_EXHAUSTED

  • DB:BAD_SQL_SYNTAX

Sources

On Table Row

<db:listener>

Selects from a table at a regular interval and generates one message per each obtained row. Optionally, watermark and ID columns can be provided. If a watermark column is provided, the values taken from that column will be used to filter the contents of the next poll, so that only rows with a greater watermark value are returned. If an ID column is provided, this component will automatically make sure that the same row is not picked twice by concurrent polls

Parameters

Name Type Description Default Value Required

Configuration

String

Name of the configuration to use.

x

Table

String

The name of the table to select from

x

Watermark Column

String

The name of the column to use for watermark. Values taken from this column will be used to filter the contents of the next poll, so that only rows with a greater watermark value are processed.

Id Column

String

The name of the column to consider as row ID. If provided, this component will make sure that the same row is not processed twice by concurrent polls.

Transactional Action

Enumeration, one of:

  • ALWAYS_BEGIN

  • NONE

The type of beginning action that sources can take regarding transactions.

NONE

Transaction Type

Enumeration, one of:

  • LOCAL

  • XA

The type of transaction to create. Availability depends on Mule version.

LOCAL

Primary Node Only

Boolean

Determines whether to execute this source on only the primary node when running Mule instances in a cluster. When deployed in a clustered environment with multiple workers, this must be enabled to prevent duplicate record processing.

Scheduling Strategy

scheduling-strategy

Configures the scheduler that triggers the polling.

x

Redelivery Policy

Defines a policy for processing the redelivery of the same message.

Query Timeout

Number

Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. No timeout is used by default.

0

Query Timeout Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

A TimeUnit which qualifies the #queryTimeout

SECONDS

Use Column Numbers

Boolean

When true, uses column numbers (1, 2, 3..) instead of column names as keys in the result metadata. This is useful when the query returns duplicate column names, which would otherwise cause a metadata error.

false

Fetch Size

Number

Indicates how many rows to fetch from the database when rows are read from a resultSet. This property is required when streaming is true; in that case a default value (10) is used.

Max Rows

Number

Sets the limit for the maximum number of rows that any ResultSet object generated by this message processor can contain for the given number. If the limit is exceeded, the excess rows are silently dropped.

Reconnection Strategy

Retry strategy in case of connectivity errors.

Output

Type

Object

For Configurations

Types

Pooling Profile

Field Type Description Default Value Required

Max Pool Size

Number

5

Min Pool Size

Number

0

Acquire Increment

Number

1

Prepared Statement Cache Size

Number

5

Max Wait

Number

0

Max Wait Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

SECONDS

Max Idle Time

Number

0

Max Statements

Number

0

Test Connection On Checkout

Boolean

true

Additional Properties

Object

Column Type

Field Type Description Default Value Required

Id

Number

x

Type Name

String

x

Class Name

String

Reconnection

Configures a reconnection strategy for an operation.

Field Type Description Default Value Required

Fails Deployment

Boolean

When the application is deployed, a connectivity test is performed on all connectors. If set to true, deployment fails if the test doesn’t pass after exhausting the associated reconnection strategy.

Reconnection Strategy

Reconnection strategy to use.

Reconnect

Field Type Description Default Value Required

Frequency

Number

How often to attempt to reconnect, in milliseconds.

Count

Number

How many reconnection attempts the Mule app can make.

Reconnect Forever

Field Type Description Default Value Required

Frequency

Number

How often to attempt to reconnect, in milliseconds.

TLS

Configures TLS to provide secure communications for the Mule app.

Field Type Description Default Value Required

Enabled Protocols

String

Comma-separated list of protocols enabled for this context.

Enabled Cipher Suites

String

Comma-separated list of cipher suites enabled for this context.

Trust Store

Configures the TLS truststore.

Key Store

Configures the TLS keystore.

Revocation Check

Truststore

Configures the truststore for TLS.

Field Type Description Default Value Required

Path

String

Path to the truststore. Mule resolves the path relative to the current classpath and file system.

Password

String

Password used to protect the truststore.

Type

String

Type of store.

Algorithm

String

Encryption algorithm that the truststore uses.

Insecure

Boolean

If true, Mule stops performing certificate validations. Setting this to true can make connections vulnerable to attacks.

Keystore

Configures the keystore for the TLS protocol. The keystore you generate contains a private key and a public certificate.

Field Type Description Default Value Required

Path

String

Path to the keystore. Mule resolves the path relative to the current classpath and file system.

Type

String

Type of store.

Alias

String

Alias of the key to use when the keystore contains multiple private keys. By default, Mule uses the first key in the file.

Key Password

String

Password used to protect the private key.

Password

String

Password used to protect the keystore.

Algorithm

String

Encryption algorithm that the keystore uses.

Standard Revocation Check

Configures standard revocation checks for TLS certificates.

Field Type Description Default Value Required

Only End Entities

Boolean

Which elements to verify in the certificate chain:

  • true

Verify only the last element in the certificate chain.

  • false

Verify all elements in the certificate chain.

Prefer Crls

Boolean

How to check certificate validity:

  • true

Check the Certification Revocation List (CRL) for certificate validity.

  • false

Use the Online Certificate Status Protocol (OCSP) to check certificate validity.

No Fallback

Boolean

Whether to use the secondary method to check certificate validity:

  • true

Use the method that wasn’t specified in the Prefer Crls field (the secondary method) to check certificate validity.

  • false

Do not use the secondary method to check certificate validity.

Soft Fail

Boolean

What to do if the revocation server can’t be reached or is busy:

  • true

Avoid verification failure.

  • false

Allow the verification to fail.

Custom OCSP Responder

Configures a custom OCSP responder for certification revocation checks.

Field Type Description Default Value Required

Url

String

URL of the OCSP responder.

Cert Alias

String

Alias of the signing certificate for the OCSP response. If specified, the alias must be in the truststore.

CRL File

Specifies the location of the certification revocation list (CRL) file.

Field Type Description Default Value Required

Path

String

Path to the CRL file.

Expiration Policy

Configures an expiration policy strategy.

Field Type Description Default Value Required

Max Idle Time

Number

Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.

Time Unit

Enumeration, one of:

  • NANOSECONDS

  • MICROSECONDS

  • MILLISECONDS

  • SECONDS

  • MINUTES

  • HOURS

  • DAYS

Time unit for the Max Idle Time field.

Redelivery Policy

Configures the redelivery policy for executing requests that generate errors. You can add a redelivery policy to any source in a flow.

Field Type Description Default Value Required

Max Redelivery Count

Number

Maximum number of times that a redelivered request can be processed unsuccessfully before returning a REDELIVERY_EXHAUSTED error.

Use Secure Hash

Boolean

If true, Mule uses a secure hash algorithm to identify a redelivered message.

Message Digest Algorithm

String

Secure hashing algorithm to use if the Use Secure Hash field is true. If the payload of the message is a Java object, Mule ignores this value and returns the value that the payload’s hashCode() returned.

Id Expression

String

One or more expressions that determine when a message was redelivered. You can set this property only if the Use Secure Hash field is false.

Object Store

Object Store

Configures the object store that stores the redelivery counter for each message.

Parameter Type

Field Type Description Default Value Required

Key

String

The name of the input parameter.

x

Type Classifier

x

Type Classifier

Field Type Description Default Value Required

Type

Enumeration, one of:

  • BIT

  • TINYINT

  • SMALLINT

  • INTEGER

  • BIGINT

  • FLOAT

  • REAL

  • DOUBLE

  • NUMERIC

  • DECIMAL

  • CHAR

  • VARCHAR

  • LONGVARCHAR

  • DATE

  • TIME

  • TIMESTAMP

  • BINARY

  • VARBINARY

  • LONGVARBINARY

  • NULL

  • OTHER

  • JAVA_OBJECT

  • DISTINCT

  • STRUCT

  • ARRAY

  • BLOB

  • CLOB

  • REF

  • DATALINK

  • BOOLEAN

  • ROWID

  • NCHAR

  • NVARCHAR

  • LONGNVARCHAR

  • NCLOB

  • SQLXML

  • REF_CURSOR

  • UNKNOWN

Custom Type

String

Statement Result

Field Type Description Default Value Required

Affected Rows

Number

Generated Keys

Object

Repeatable In Memory Iterable

Field Type Description Default Value Required

Initial Buffer Size

Number

The amount of instances that is initially be allowed to be kept in memory to consume the stream and provide random access to it. If the stream contains more data than can fit into this buffer, then the buffer expands according to the bufferSizeIncrement attribute, with an upper limit of maxInMemorySize. Default value is 100 instances.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full. Default value is 100 instances.

Max Buffer Size

Number

Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a STREAM_MAXIMUM_SIZE_EXCEEDED error. A value of less than or equal to 0 means no limit.

Repeatable File Store Iterable

Field Type Description Default Value Required

In Memory Objects

Number

The maximum amount of instances to keep in memory. If more than that is required, content on the disk is buffered.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the In Memory Size field.

Repeatable In Memory Stream

Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX buffer size. Always run performance tests to find the optimal buffer size for your specific use case.

Field Type Description Default Value Required

Initial Buffer Size

Number

Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by Buffer Size Increment, with an upper limit of Max In Memory Size value.

Buffer Size Increment

Number

This is by how much the buffer size expands if it exceeds its initial size. Setting a value of zero or lower means that the buffer should not expand, meaning that a STREAM_MAXIMUM_SIZE_EXCEEDED error is raised when the buffer gets full.

Max Buffer Size

Number

Maximum size of the buffer. If the buffer size exceeds this value, Mule raises a STREAM_MAXIMUM_SIZE_EXCEEDED error. A value of less than or equal to 0 means no limit.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the Initial Buffer Size, Buffer Size Increment, and Buffer Unit fields.

Repeatable File Store Stream

Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream content in memory. If the stream content is larger than the configured buffer size, Mule backs up the buffer’s content to disk and then clears the memory.

Field Type Description Default Value Required

In Memory Size

Number

Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:

  • Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory.

  • Configure a smaller buffer size to decrease memory load at the expense of response time.

Buffer Unit

Enumeration, one of:

  • BYTE

  • KB

  • MB

  • GB

Unit for the In Memory Size field.

Output Parameter

Field Type Description Default Value Required

Key

String

The name of the input parameter.

x

Type Classifier

x

View on GitHub