MySQL
MySQL (mysql)
Execute parameterised statements against MySQL databases.
Database json
Minimal example
output: mysql: connection: url: url: ""JSON
{ "output": { "mysql": { "connection": { "url": { "url": "" } } } }}Contents
Connection
Connection
| Field | Type | Required | Description |
|---|---|---|---|
connection | Connection | ✅ | Connection details for the target database. Allowed values: url, parts |
Processing
Processing
| Field | Type | Required | Description |
|---|---|---|---|
batch | Batch | Logical batching hints shared with other outputs. |
Reliability
Reliability
| Field | Type | Required | Description |
|---|---|---|---|
retry | Retry | Retry policy for failed executions. |
Result
Result
| Field | Type | Required | Description |
|---|---|---|---|
affected-rows-field | field (string) | Event field populated with affected row counts. Examples: data_field |
Statement
Statement
| Field | Type | Required | Description |
|---|---|---|---|
statement | multiline-text (string) | Inline SQL statement executed when statement-file is not provided. | |
statement-file | path (string) | Path to a SQL file executed when statement is not provided.Examples: /path/to/file, c:\users\joe\data\file.txt | |
parameters | Parameters[] | Bindings that map event fields into parameter placeholders. |
Schema
- Connection Options
- Connection - Url Fields
- Connection - Parts - Tuning Fields
- Connection - Parts Fields
- Batch Fields
- Retry Fields
- Parameters Fields
- Connection - Parts - Parameters Table
- Batch - Mode Options
Connection Options
| Option | Name | Type | Description |
|---|---|---|---|
url | Url | object | |
parts | Parts | object |
Connection - Url Fields
| Field | Type | Required | Description |
|---|---|---|---|
url | url (string) | ✅ | Database connection URL (sqlx/ODBC compatible). Examples: https://example.com/path |
max-connections | number (integer) | Maximum size of the async connection pool. Examples: 42, 1.2e-10 | |
min-connections | number (integer) | Minimum number of connections retained in the pool. Examples: 42, 1.2e-10 | |
connect-timeout | string | Optional connection timeout (humantime duration string). | |
idle-timeout | string | Optional idle timeout (humantime duration string). | |
schema | string | Optional schema override applied after connect. | |
options | string[] | Statements executed after connect (e.g. SET search_path TO …). | |
disable-tls-verification ✓ | boolean (bool) | Skip TLS verification (development only). Default: false |
Connection - Parts - Tuning Fields
| Field | Type | Required | Description |
|---|---|---|---|
max-connections | number (integer) | Maximum size of the async connection pool. Examples: 42, 1.2e-10 | |
min-connections | number (integer) | Minimum number of connections retained in the pool. Examples: 42, 1.2e-10 | |
connect-timeout | string | Optional connection timeout (humantime duration string). | |
idle-timeout | string | Optional idle timeout (humantime duration string). | |
schema | string | Optional schema override applied after connect. | |
options | string[] | Statements executed after connect (e.g. SET search_path TO …). | |
disable-tls-verification ✓ | boolean (bool) | Skip TLS verification (development only). Default: false |
Connection - Parts Fields
| Field | Type | Required | Description |
|---|---|---|---|
tuning | Tuning | ✅ | |
host | string | ✅ | Hostname or IP address of the database server. |
port | number (integer) | Optional TCP port (defaults to the backend default). Examples: 42, 1.2e-10 | |
database | string | Optional database name (mapped to the URL path segment). | |
username | string | Optional username (mapped to the URL userinfo). | |
password | string | Optional password (mapped to the URL userinfo). | |
parameters | map (string) | Additional query parameters appended to the generated URL. |
Batch Fields
| Field | Type | Required | Description |
|---|---|---|---|
fixed-size ✓ | number (integer) | maximum number of events in an output batch. Examples: 42, 1.2e-10 | |
mode | Mode | ✅ | If ‘document’ send on end of document generated by input. If ‘fixed’, use fixed_size.Allowed values: fixed, document |
timeout | time-interval (string) | ✅ | interval after which the batch is sent, to keep throughput going (default 100ms). Default: 100msExamples: 500ms, 2h |
header | multiline-text (string) | put a header line before the batch. | |
footer | multiline-text (string) | put a header line after the last line of the batch. | |
use-document-marker ✓ | boolean (bool) | Enrich the job metadata with a document marker (for document handling in batch mode). Default: false | |
wrap-as-json ✓ | boolean (bool) | Format the output batch as a JSON array. Default: false |
Retry Fields
| Field | Type | Required | Description |
|---|---|---|---|
timeout | time-interval (string) | ✅ | timeout (e.g. 500ms, 2s etc. - default is 30). Examples: 500ms, 2h |
retries | number (integer) | number of retries. Examples: 42, 1.2e-10 |
Parameters Fields
| Field | Type | Required | Description |
|---|---|---|---|
name | string | ✅ | |
field | string | ✅ | |
default | multiline-text (string) |
Connection - Parts - Parameters Table
| Parameter | Value |
|---|---|
name | value |
Value format: templated-text.
Batch - Mode Options
| Value | Name | Description |
|---|---|---|
fixed | fixed | Fixed |
document | document | Document |