Query
Certified
Execute a single SQL query against Microsoft SQL Server
Query
Certified
Execute a single SQL query against Microsoft SQL Server
yaml
type: io.kestra.plugin.jdbc.sqlserver.QueryExamples
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.Queries
url: jdbc:sqlserver://localhost:41433;trustServerCertificate=true
username: "{{ secret('SQL_USERNAME') }}"
password: "{{ secret('SQL_PASSWORD') }}"
sql: "{% for row in outputs.select.rows %} INSERT INTO destination (year_month, store_code, update_date) values ({{ row.year_month }}, {{ row.store_code }}, '{{ row.date }}'); {% endfor %}"
Properties
sql *Requiredstring
url *Requiredstring
afterSQL string
encrypt string
Default
FALSEPossible Values
TRUEFALSESTRICTOPTIONALfetchSize integerstring
Default
10000fetchType string
Default
NONEPossible Values
STOREFETCHFETCH_ONENONEhostNameInCertificate string
outputFiles array
SubTypestring
parameters object
password string
timeZoneId string
trustServerCertificate booleanstring
Default
falsetrustStore string
trustStorePassword string
username string
Outputs
row object
rows array
SubTypeobject
size integer
uri string
Format
uriMetrics
fetch.size counter
Unit
rows