Queries
yaml
type: "io.kestra.plugin.jdbc.sqlite.queries"
Examples
yaml
id: sqlite_query_using_file
namespace: company.team
tasks:
- id: update
type: io.kestra.plugin.jdbc.sqlite.Queries
url: jdbc:sqlite:myfile.db
sqliteFile: {{ outputs.get.outputFiles['myfile.sqlite'] }}
sql: select * from pgsql_types
fetchType: FETCH
- id: use_fetched_data
type: io.kestra.plugin.jdbc.sqlite.Queries
url: jdbc:sqlite:myfile.db
sqliteFile: {{ outputs.get.outputFiles['myfile.sqlite'] }}
sql: |
{% for row in outputs.update.rows %}
INSERT INTO pl_store_distribute (year_month,store_code, update_date)
VALUES ({{row.play_time}}, {{row.concert_id}}, TO_TIMESTAMP('{{row.timestamp_type}}', 'YYYY-MM-DDTHH:MI:SS.US') );
{% endfor %}"
Properties
url *Requiredstring
fetchSize integerstring
Default
10000
fetchType string
Default
NONE
Possible Values
STORE
FETCH
FETCH_ONE
NONE
outputDbFile booleanstring
Default
false
parameters object
password string
sql string
sqliteFile string
timeZoneId string
transaction booleanstring
Default
true
username string
Definitions
io.kestra.plugin.jdbc.AbstractJdbcBaseQuery-Output
row object
rows array
SubType object
size integer
uri string
Format
uri