yaml
type: "io.kestra.plugin.jdbc.sqlserver.query"
yaml
id: sqlserver_query
namespace: company.team

tasks:
  - id: select
    type: io.kestra.plugin.jdbc.sqlserver.Query
    url: jdbc:sqlserver://localhost:41433;trustServerCertificate=true
    username: "{{ secret('SQL_USERNAME') }}"
    password: "{{ secret('SQL_PASSWORD') }}"
    sql: select * from source
    fetchType: FETCH

  - id: generate_update
    type: io.kestra.plugin.jdbc.sqlserver.Query
    url: jdbc:sqlserver://localhost:41433;trustServerCertificate=true
    username: "{{ secret('SQL_USERNAME') }}"
    password: "{{ secret('SQL_PASSWORD') }}"
    sql: "{% for row in outputs.update.rows %} INSERT INTO destination (year_month, store_code, update_date) values ({{row.year_month}}, {{row.store_code}}, '{{row.date}}'); {% endfor %}"
Properties
Default 10000
Default NONE
Possible Values
STOREFETCHFETCH_ONENONE
SubType object
Format uri