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
url *Requiredstring
fetchSize integerstring
Default
10000
fetchType string
Default
NONE
Possible Values
STORE
FETCH
FETCH_ONE
NONE
inputFile string
parameters object
password string
sql string
timeZoneId string
username string
Outputs
row object
rows array
SubType object
size integer
uri string
Format
uri