Batch
Certified
Bulk insert rows into Microsoft SQL Server using prepared statements
Batch
Certified
Bulk insert rows into Microsoft SQL Server using prepared statements
yaml
type: io.kestra.plugin.jdbc.sqlserver.BatchExamples
yaml
id: sqlserver_batch_query
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.jdbc.sqlserver.Query
url: jdbc:sqlserver://dev:41433;trustServerCertificate=true
username: "{{ secret('SQL_USERNAME') }}"
password: "{{ secret('SQL_PASSWORD') }}"
sql: |
SELECT TOP (1500) *
FROM xref;
fetchType: STORE
- id: update
type: io.kestra.plugin.jdbc.sqlserver.Batch
from: "{{ outputs.query.uri }}"
url: jdbc:sqlserver://prod:41433;trustServerCertificate=true
username: "{{ secret('SQL_USERNAME') }}"
password: "{{ secret('SQL_PASSWORD') }}"
sql: |
insert into xref values( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )
yaml
id: sqlserver_batch_query
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.jdbc.sqlserver.Query
url: jdbc:sqlserver://dev:41433;trustServerCertificate=true
username: sql_server_user
password: sql_server_passwd
sql: |
SELECT TOP (1500) *
FROM xref;
fetchType: STORE
- id: update
type: io.kestra.plugin.jdbc.sqlserver.Batch
from: "{{ outputs.query.uri }}"
url: jdbc:sqlserver://prod:41433;trustServerCertificate=true
username: "{{ secret('SQL_USERNAME') }}"
password: "{{ secret('SQL_PASSWORD') }}"
table: xref
Properties
from *Requiredstring
url *Requiredstring
chunk integerstring
Default
1000columns array
SubTypestring
encrypt string
Default
FALSEPossible Values
TRUEFALSESTRICTOPTIONALhostNameInCertificate string
inputHandling string
Default
AUTOPossible Values
AUTOSTREAMLOCALlocalBufferMaxBytes integerstring
Default
104857600maxRetries integerstring
Default
3password string
resumeOnRetry booleanstring
Default
trueretryBackoff string
Default
PT1SretryScope string
Default
INPUTPossible Values
NONEINPUTALLsql string
table string
timeZoneId string
trustServerCertificate booleanstring
Default
falsetrustStore string
trustStorePassword string
username string
Outputs
rowCount integer
updatedCount integer
Metrics
query counter
Unit
queriesrecords counter
Unit
recordsupdated counter
Unit
records