Batch

Batch

Certified

Bulk insert rows into Microsoft SQL Server using prepared statements

yaml
type: io.kestra.plugin.jdbc.sqlserver.Batch
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
Default1000
SubTypestring
DefaultFALSE
Possible Values
TRUEFALSESTRICTOPTIONAL
DefaultAUTO
Possible Values
AUTOSTREAMLOCAL
Default104857600
Default3
Defaulttrue
DefaultPT1S
DefaultINPUT
Possible Values
NONEINPUTALL
Defaultfalse
Unitqueries
Unitrecords
Unitrecords