Skip to content

SQL Server

SQL Server (sql-server)

Execute parameterised statements against Microsoft SQL Server databases.

Database json

Minimal example

output:
sql-server:
connection:
url:
url: ""
JSON
{
"output": {
"sql-server": {
"connection": {
"url": {
"url": ""
}
}
}
}
}

Contents

Connection

Connection
FieldTypeRequiredDescription
connectionConnectionConnection details for the target database.
Allowed values: url, parts

Processing

Processing
FieldTypeRequiredDescription
batchBatchLogical batching hints shared with other outputs.

Reliability

Reliability
FieldTypeRequiredDescription
retryRetryRetry policy for failed executions.

Result

Result
FieldTypeRequiredDescription
result-fieldfield (string)Event field updated with statement scalar results.
Examples: data_field
affected-rows-fieldfield (string)Event field populated with affected row counts.
Examples: data_field

Statement

Statement
FieldTypeRequiredDescription
statementmultiline-text (string)Inline SQL statement executed when statement-file is not provided.
statement-filepath (string)Path to a SQL file executed when statement is not provided.
Examples: /path/to/file, c:\users\joe\data\file.txt
parametersParameters[]Bindings that map event fields into parameter placeholders.

Transaction

Transaction
FieldTypeRequiredDescription
transactionTransactionOptional transaction scope applied per execution (supports none and per-event).

Schema

Connection Options

OptionNameTypeDescription
urlUrlobject
partsPartsobject

Connection - Url Fields

FieldTypeRequiredDescription
urlurl (string)Database connection URL (sqlx/ODBC compatible).
Examples: https://example.com/path
max-connectionsnumber (integer)Maximum size of the async connection pool.
Examples: 42, 1.2e-10
min-connectionsnumber (integer)Minimum number of connections retained in the pool.
Examples: 42, 1.2e-10
connect-timeoutstringOptional connection timeout (humantime duration string).
idle-timeoutstringOptional idle timeout (humantime duration string).
schemastringOptional schema override applied after connect.
optionsstring[]Statements executed after connect (e.g. SET search_path TO …).
disable-tls-verificationboolean (bool)Skip TLS verification (development only).
Default: false

Connection - Parts - Tuning Fields

FieldTypeRequiredDescription
max-connectionsnumber (integer)Maximum size of the async connection pool.
Examples: 42, 1.2e-10
min-connectionsnumber (integer)Minimum number of connections retained in the pool.
Examples: 42, 1.2e-10
connect-timeoutstringOptional connection timeout (humantime duration string).
idle-timeoutstringOptional idle timeout (humantime duration string).
schemastringOptional schema override applied after connect.
optionsstring[]Statements executed after connect (e.g. SET search_path TO …).
disable-tls-verificationboolean (bool)Skip TLS verification (development only).
Default: false

Connection - Parts Fields

FieldTypeRequiredDescription
tuningTuning
hoststringHostname or IP address of the database server.
portnumber (integer)Optional TCP port (defaults to the backend default).
Examples: 42, 1.2e-10
databasestringOptional database name (mapped to the URL path segment).
usernamestringOptional username (mapped to the URL userinfo).
passwordstringOptional password (mapped to the URL userinfo).
parametersmap (string)Additional query parameters appended to the generated URL.

Batch Fields

FieldTypeRequiredDescription
fixed-sizenumber (integer)maximum number of events in an output batch.
Examples: 42, 1.2e-10
modeModeIf ‘document’ send on end of document generated by input. If ‘fixed’, use fixed_size.
Allowed values: fixed, document
timeouttime-interval (string)interval after which the batch is sent, to keep throughput going (default 100ms).
Default: 100ms
Examples: 500ms, 2h
headermultiline-text (string)put a header line before the batch.
footermultiline-text (string)put a header line after the last line of the batch.
use-document-markerboolean (bool)Enrich the job metadata with a document marker (for document handling in batch mode).
Default: false
wrap-as-jsonboolean (bool)Format the output batch as a JSON array.
Default: false

Retry Fields

FieldTypeRequiredDescription
timeouttime-interval (string)timeout (e.g. 500ms, 2s etc. - default is 30).
Examples: 500ms, 2h
retriesnumber (integer)number of retries.
Examples: 42, 1.2e-10

Parameters Fields

FieldTypeRequiredDescription
namestring
fieldstring
defaultmultiline-text (string)

Transaction Fields

FieldTypeRequiredDescription
modeModeAllowed values: none, per-event, per-batch, document
isolation-levelstring
access-modestring
deferrableboolean (bool)

Connection - Parts - Parameters Table

ParameterValue
namevalue

Value format: templated-text.

Batch - Mode Options

ValueNameDescription
fixedfixedFixed
documentdocumentDocument

Transaction - Mode Options

ValueNameDescription
nonenoneNone
per-eventper-eventPer Event
per-batchper-batchPer Batch
documentdocumentDocument