Query
Query
yaml
type: "io.kestra.plugin.jdbc.mysql.Query"Examples
yaml
id: mysql_query
namespace: company.team
tasks:
- id: query
type: io.kestra.plugin.jdbc.mysql.Query
url: jdbc:mysql://127.0.0.1:3306/
username: mysql_user
password: mysql_password
sql: select * from mysql_types
fetchType: FETCH_ONE
yaml
id: mysql_query
namespace: company.team
tasks:
- id: http_download
type: io.kestra.plugin.core.http.Download
uri: https://huggingface.co/datasets/kestra/datasets/raw/main/csv/products.csv
- id: query
type: io.kestra.plugin.jdbc.mysql.Query
url: jdbc:mysql://127.0.0.1:3306/
username: mysql_user
password: mysql_password
inputFile: "{{ outputs.http_download.uri }}"
sql: |
LOAD DATA LOCAL INFILE '{{ inputFile }}'
INTO TABLE products
FIELDS TERMINATED BY ','
ENCLOSED BY '"'
LINES TERMINATED BY '\n'
IGNORE 1 ROWS;
Properties
sql *Requiredstring
url *Requiredstring
afterSQL string
fetchSize integerstring
Default
10000fetchType string
Default
NONEPossible Values
STOREFETCHFETCH_ONENONEinputFile string
parameters object
password string
timeZoneId string
username string
Outputs
row object
rows array
SubTypeobject
size integer
uri string
Format
uriMetrics
fetch.size counter
Unit
rows