Teradata Connector Reference - Mule 4
Release Notes: Teradata Connector Release Notes
Configurations
Default Configuration
Use these parameters to configure the default configuration.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Name | String | The name for this configuration. Connectors reference the configuration with this name. | x | |
Connection | The connection types to provide to this configuration. | x | ||
Expiration Policy | Expiration Policy | Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration. This does not mean that the platform expires the instance at the exact moment that it becomes eligible. Mule purges the instances as appropriate. |
Connection Types
Data Source Reference Connection
Configure the connection provider implementation that creates database connections from a referenced data source.
When you use a provider's custom type in a Data Source Reference Connection, define the type inside the Column Types form of the Advanced section in the Database config.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Pooling Profile | Pooling Profile | Provides a way to configure database connection pooling | ||
Column Types | Array of Column Type | Specifies non-standard column types | ||
Reconnection | 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. |
Teradata Connection
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Pooling Profile | Pooling Profile | Provides a way to configure database connection pooling | ||
Column Types | Array of Column Type | Specifies non-standard column types | ||
Transaction Isolation a | Enumeration, one of: | 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 must support XA transactions | false | |
URL | String | JDBC URL to use to connect to the database | x | |
User | String | Database username | ||
Password | String | Database password | ||
Reconnection | 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. |
Operations
To specify an SQL function in an SQL query in an operation, specify the SQL function in the {fn function()}
format. For example, the SQL function CURRENT_TIMESTAMP
is specified as {fn CURRENT_TIMESTAMP()}
.
- Bulk Delete
- Bulk Insert
- Bulk Update
- Delete
- Execute DDL
- Execute Script
- Insert
- Select
- Query Single
- Stored Procedure
- Update
Associated Sources
Bulk Delete
<db:bulk-delete>
This operation allows delete operations to execute at various times using different parameter bindings and a single database statement. This improves performance compared to executing a single delete operation at various times.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration | String | The name of the configuration to use | x | |
Input Parameters | Array of Object | Specifies a list of maps, which contain the parameter names as keys and the value the parameter is bound to, and in which every list item represents a row to insert. | #[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. By default, no timeout is used. | 0 | |
Query Timeout Unit | Enumeration, one of: NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS | A time unit that qualifies the #queryTimeout . Values specified in nanoseconds, microseconds, or milliseconds are rounded to seconds. | SECONDS | |
Fetch Size a | 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 which case a default value of 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 | This parameter allows you to optionally specify the type of one or more of the parameters in the query. If a value is provided, you're not required to reference all of the parameters; but you cannot reference a parameter that is not present in the input values. | ||
Target Variable | String | The name of a variable to store the operation's output | ||
Target Value | String | An expression to evaluate against the operation's output and store the expression outcome in the target variable | #[payload] | |
Reconnection Strategy | Reconnect Reconnect Forever | A retry strategy in case of connectivity errors |
Output
Type | Array of Number |
---|
For Configurations
Throws
- DB:CONNECTIVITY
- DB:QUERY_EXECUTION
- DB:RETRY_EXHAUSTED
- DB:BAD_SQL_SYNTAX
Bulk Insert
<db:bulk-insert>
This operation allows inserts to execute at various times using different parameter bindings and a single database statement. This improves performance compared to executing a single insert operation at various times.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration | String | The 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 that qualifies the #queryTimeout . Values specified in nanoseconds, microseconds, or milliseconds are rounded to seconds. | SECONDS | |
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 you to optionally specify the type of one or more of the parameters in the query. If provided, you're not required to reference all of the parameters, but you cannot reference a parameter not present in the input values | ||
Target Variable | String | The name of a variable to store the operation's output. | ||
Target Value | String | An expression to evaluate against the operation's output and store the expression outcome in the target variable | #[payload] | |
Reconnection Strategy | Reconnect Reconnect Forever | A retry strategy in case of connectivity errors. |
Output
Type | Array of Number |
---|
For Configurations
Throws
- DB:CONNECTIVITY
- DB:QUERY_EXECUTION
- DB:RETRY_EXHAUSTED
- DB:BAD_SQL_SYNTAX
[[bulkUpdate]]
Bulk Update
<db:bulk-update>
This operation allows updates to execute at various times using different parameter bindings and a single database statement. This improves performance compared to executing one single update operation at various times.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration | String | The name of the configuration to use | x | |
Input Parameters | Array of Object | Specifies a list of maps, which contain the parameter names as keys and the value the parameter is bound to, and in which every list item represents a row to insert. | #[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. By default, no timeout is used. | 0 | ||
Query Timeout Unit | Enumeration, one of: NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS | A time unit that qualifies the #queryTimeout . Values specified in nanoseconds, microseconds, or milliseconds are rounded to seconds. | SECONDS | |
Fetch Size | Number | Indicates how many rows to fetch from the database when rows are read from a ResultSet. | 10 | |
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 you to optionally specify the type of one or more of the parameters in the query. If provided, you're not required to reference all of the parameters; but you cannot reference a parameter that is not present in the input values. | ||
Target Variable | String | The name of a variable to store the operation's output | ||
Target Value | String | An expression to evaluate against the operation's output and store the expression outcome in the target variable | #[payload] | |
Reconnection Strategy | Reconnect Reconnect Forever | A retry strategy in case of connectivity errors |
Output
Type | Array of Number |
---|
For Configurations
Throws
- DB:CONNECTIVITY
- DB:QUERY_EXECUTION
- DB:RETRY_EXHAUSTED
- DB:BAD_SQL_SYNTAX
Delete
<db:delete>
This operation deletes data in a database.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration | String | The 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. By default, no timeout is used. | 0 | |
Query Timeout Unit | Enumeration, one of: NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS | A time unit that qualifies the #queryTimeout . Values specified in nanoseconds, microseconds, or milliseconds are rounded to seconds. | SECONDS | |
Fetch Size | Number | Indicates how many rows to fetch from the database when rows are read from a ResultSet. | 10 | |
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 you to optionally specify the type of one or more of the parameters in the query. If a value is provided, you're not required to reference all of the parameters; but you cannot reference a parameter that is not present in the input values. | ||
Input Parameters | Object | A map in which keys are the name of an input parameter to set on the JDBC prepared statement. Each parameter should be referenced in the SQL text using a colon prefix (for example, where id = :myParamName ). The map's values contain the actual assignation for each parameter. | ||
Target Variable | String | The name of a variable to store the operation's output | ||
Target Value | String | An expression to evaluate against the operation's output and store the expression outcome in the target variable | #[payload] | |
Reconnection Strategy | Reconnect Reconnect Forever | A retry strategy in case of connectivity errors |
Output
Type | Number |
---|
For Configurations
Throws
-
DB:CONNECTIVITY
-
DB:QUERY_EXECUTION
-
DB:RETRY_EXHAUSTED
-
DB:BAD_SQL_SYNTAX
Execute DDL
<db:execute-ddl>
This operation allows execution of DDL queries against a database.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration | String | The 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. By default, no timeout is used. | 0 | |
Query Timeout Unit | Enumeration, one of: NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS | A time unit that qualifies the #queryTimeout . Values specified in nanoseconds, microseconds, or milliseconds are rounded to seconds. | SECONDS | |
Fetch Size | Number | Indicates how many rows to fetch from the database when rows are read from a ResultSet. | 10 | |
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 | The name of a variable to store the operation's output | ||
Target Value | String | An expression to evaluate against the operation's output and store the expression outcome in the target variable | #[payload] | |
Reconnection Strategy | Reconnect Reconnect Forever | A retry strategy in case of connectivity errors |
Output
Type | Number |
---|
For Configurations
Throws
- DB:CONNECTIVITY
- DB:QUERY_EXECUTION
- DB:RETRY_EXHAUSTED
- DB:BAD_SQL_SYNTAX
[[executeScript]]
Execute Script
<db:execute-script>
This operation executes an SQL script in a 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 | The 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 for transactions. | JOIN_IF_POSSIBLE | |
SQL Query Text | String | The text of the SQL query to execute | ||
Script Path | String | Specifies 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. By default, no timeout is used. | 0 | |
Query Timeout Unit | Enumeration, one of: NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS | A time unit that qualifies the #queryTimeout . Values specified in nanoseconds, microseconds, or milliseconds are rounded to seconds. | SECONDS | |
Fetch Size | Number | Indicates how many rows to fetch from the database when rows are read from a ResultSet. | 10 | |
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 | The name of a variable to store the operation's output | ||
Target Value | String | An expression to evaluate against the operation's output and store the expression outcome in the target variable | #[payload] | |
Reconnection Strategy | Reconnect Reconnect Forever | A retry strategy in case of connectivity errors |
Output
Type | Array of Number |
---|
For Configurations
Throws
-
DB:CONNECTIVITY
-
DB:QUERY_EXECUTION
-
DB:RETRY_EXHAUSTED
-
DB:BAD_SQL_SYNTAX
Insert
<db:insert>
This operation inserts data into a database.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration | String | The name of the configuration to use | x | |
Transactional Action a | 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. By default, no timeout is used. | 0 | |
Query Timeout Unit | Enumeration, one of: NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS | A time unit that qualifies the #queryTimeout . Values specified in nanoseconds, microseconds, or milliseconds are rounded to seconds. | SECONDS | |
Fetch Size | Number | Indicates how many rows to fetch from the database when rows are read from a ResultSet. | 10 | |
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 you to optionally specify the type of one or more of the parameters in the query. If provided, you're not required to reference all of the parameters; but you cannot reference a parameter that is not present in the input values. | ||
Input Parameters | Object | A map in 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 colon prefix (E.g: where id = :myParamName). The map's values 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 to make available for retrieval | ||
Target Variable | String | The name of a variable to store the operation's output | ||
Target Value | String | An expression to evaluate against the operation's output and store the expression outcome in the target variable | #[payload] | |
Reconnection Strategy | Reconnect Reconnect Forever | A retry strategy in case of connectivity errors |
Output
Type | Statement Result |
---|
For Configurations
Throws
- DB:CONNECTIVITY
- DB:QUERY_EXECUTION
- DB:RETRY_EXHAUSTED
- DB:BAD_SQL_SYNTAX
Select
<db:select>
This operation queries data from a database. To prevent loading all the results at once, which can lead to performance and memory issues, results are automatically streamed. This means that pages of fetchSize rows are loaded when needed. If this operation is performed inside a transaction (that is, within a Try scope component) and that transaction is closed before consuming the data, accessing the results that haven't been loaded will fail.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration | String | The 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 | Repeatable In Memory Iterable Repeatable File Store Iterable non-repeatable-iterable | Configure to use repeatable streams | ||
Query Timeout a | Number | Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. By default, no timeout is used. | 0 | |
Query Timeout Unit a | Enumeration, one of: NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS | A time unit that qualifies the #queryTimeout . Values specified in nanoseconds, microseconds, or milliseconds are rounded to seconds. | SECONDS | |
Fetch Size a | Number | Indicates how many rows to fetch from the database when rows are read from a ResultSet. | 10 | |
Max Rows a | 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 a | String | The text of the SQL query to execute | x | |
Parameter Types a | Array of Parameter Type | Allows you to optionally specify the type of one or more of the parameters in the query. If provided, you're not required to reference all of the parameters; but you cannot reference a parameter that is not present in the input values. | ||
Input Parameters a | Object | A map in 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 colon prefix (for example: where id = :myParamName). The map's values will contain the actual assignation for each parameter. | ||
Target Variable | String | The name of a variable to store the operation's output. | ||
Target Value | String | An expression to evaluate against the operation's output and store the expression outcome in the target variable | #[payload] | |
Reconnection Strategy | Reconnect Reconnect Forever | A retry strategy in case of connectivity errors. |
Type | Array of Object |
---|
For Configurations
Working with Pooling Profiles
When working with pooling profiles and the Select operation, the connection remains open until one of the following occurs:
- The flow execution ends
- The content of the streams are consumed completely
- The connection is the transaction key.
Because LOBs are treated as streams, the connection remains open until the flow execution ends, or until the content is consumed before the flow completes, in which case the best approach is taken to close the related connection.
This behavior occurs because the result set the operation generates can have a stream or be part of an ongoing transaction.
Throws
- DB:BAD_SQL_SYNTAX
- DB:CONNECTIVITY
- DB:QUERY_EXECUTION
Query Single
<db:query-single>
This operation selects a single data record from a database. If you provide an SQL query that returns more than one row, then only the first record is processed and returned. This operation does not use streaming, which means that immediately after performing the Query Single operation, the complete content of the selected record is loaded into memory.
Parameters
Name | Type | Description | Default Value | Required |
---|---|---|---|---|
Configuration | String | The name of the configuration to use | x | |
Transactional Action | Enumeration, one of: ALWAYS_JOIN JOIN_IF_POSSIBLE NOT_SUPPORTED | The type of join action that operations can take regarding transactions | JOIN_IF_POSSIBLE | |
Streaming Strategy | Repeatable In Memory Iterable Repeatable File Store Iterable non-repeatable-iterable | Configure to use repeatable streams | ||
Query Timeout a | Number | Indicates the minimum amount of time before the JDBC driver attempts to cancel a running statement. By default, no timeout is used. | 0 | |
Query Timeout Unit a | Enumeration, one of: NANOSECONDS MICROSECONDS MILLISECONDS SECONDS MINUTES HOURS DAYS | A time unit that qualifies the #queryTimeout . Values specified in nanoseconds, microseconds, or milliseconds are rounded to seconds. | SECONDS | |
Fetch Size | Number | Indicates how many rows to fetch from the database when rows are read from a ResultSet. | 10 | |
Max Rows | Number | The maximum number of rows that any ResultSet object generated by this message processor can contain. 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 | Enables you to optionally specify the type of one or more of the parameters in the query. If provided, you're not required to reference all of the parameters; but you cannot reference a parameter that is not present in the input values. | ||
Input Parameters | Object | A map in 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 colon prefix (for example: where id = :myParamName). The map's values will contain the actual assignation for each parameter. | ||
Target Variable | String | Name of the variable in which to store the operation's output | ||
Target Value | String | Expression that evaluates the operation's output. The expression outcome is stored in the target variable. | #[payload] | |
Reconnection Strategy | Reconnect Reconnect Forever | A retry strategy in case of connectivity errors. |
Output
Type | Object |
---|