Class Query

java.lang.Object
io.kestra.core.models.tasks.Task
io.kestra.plugin.jdbc.AbstractJdbcBaseQuery
io.kestra.plugin.jdbc.AbstractJdbcQuery
io.kestra.plugin.jdbc.oracle.Query
All Implemented Interfaces:
io.kestra.core.models.Plugin, io.kestra.core.models.tasks.RunnableTask<io.kestra.plugin.jdbc.AbstractJdbcBaseQuery.Output>, io.kestra.core.models.tasks.TaskInterface, io.kestra.core.models.WorkerJobLifecycle, io.kestra.plugin.jdbc.AutoCommitInterface, io.kestra.plugin.jdbc.JdbcConnectionInterface, io.kestra.plugin.jdbc.JdbcQueryInterface, io.kestra.plugin.jdbc.JdbcStatementInterface

@Plugin(examples=@Example(full=true,title="Execute a query and fetch results on another task to update another table.",code="id: oracle_query\nnamespace: company.team\n\ntasks:\n - id: select\n type: io.kestra.plugin.jdbc.oracle.Query\n url: jdbc:oracle:thin:@localhost:49161:XE\n username: oracle_user\n password: oracle_password\n sql: select * from source\n fetchType: FETCH\n\n - id: generate_update\n type: io.kestra.plugin.jdbc.oracle.Query\n url: jdbc:oracle:thin:@localhost:49161:XE\n username: oracle_user\n password: oracle_password\n sql: \"{% for row in outputs.select.rows %} INSERT INTO destination (year_month, store_code, update_date) values ({{ row.year_month }}, {{ row.store_code }}, TO_DATE(\'{{ row.date }}\', \'MONTH DD, YYYY\') ); {% endfor %}\"\n")) public class Query extends io.kestra.plugin.jdbc.AbstractJdbcQuery implements io.kestra.core.models.tasks.RunnableTask<io.kestra.plugin.jdbc.AbstractJdbcBaseQuery.Output>, io.kestra.plugin.jdbc.AutoCommitInterface
  • Nested Class Summary

    Nested classes/interfaces inherited from class io.kestra.plugin.jdbc.AbstractJdbcQuery

    io.kestra.plugin.jdbc.AbstractJdbcQuery.AbstractJdbcQueryBuilder<C extends io.kestra.plugin.jdbc.AbstractJdbcQuery,B extends io.kestra.plugin.jdbc.AbstractJdbcQuery.AbstractJdbcQueryBuilder<C,B>>

    Nested classes/interfaces inherited from class io.kestra.plugin.jdbc.AbstractJdbcBaseQuery

    io.kestra.plugin.jdbc.AbstractJdbcBaseQuery.AbstractJdbcBaseQueryBuilder<C extends io.kestra.plugin.jdbc.AbstractJdbcBaseQuery,B extends io.kestra.plugin.jdbc.AbstractJdbcBaseQuery.AbstractJdbcBaseQueryBuilder<C,B>>, io.kestra.plugin.jdbc.AbstractJdbcBaseQuery.Output

    Nested classes/interfaces inherited from class io.kestra.core.models.tasks.Task

    io.kestra.core.models.tasks.Task.TaskBuilder<C extends io.kestra.core.models.tasks.Task,B extends io.kestra.core.models.tasks.Task.TaskBuilder<C,B>>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final Boolean
     

    Fields inherited from class io.kestra.plugin.jdbc.AbstractJdbcBaseQuery

    additionalVars, fetchSize, fetchType, sql

    Fields inherited from class io.kestra.core.models.tasks.Task

    disabled, id, retry, timeout, type
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected io.kestra.plugin.jdbc.AbstractCellConverter
     
    void
     

    Methods inherited from class io.kestra.plugin.jdbc.AbstractJdbcQuery

    canEqual, equals, hashCode, run, toString

    Methods inherited from class io.kestra.plugin.jdbc.AbstractJdbcBaseQuery

    createStatement, fetch, fetchResult, fetchResults, fetchToFile, getFetchSize, getFetchType, getPassword, getSql, getTimeZoneId, getUrl, getUsername, isFetch, isFetchOne, isStore, mapResultSetToMap, tags

    Methods inherited from class io.kestra.core.models.tasks.Task

    findById, findById, getDescription, getDisabled, getId, getLogLevel, getRetry, getRunIf, getTimeout, getType, getWorkerGroup, isAllowFailure, isAllowWarning, isFlowable, isLogToFile, isSendToWorkerTask

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface io.kestra.plugin.jdbc.AutoCommitInterface

    getAutoCommit

    Methods inherited from interface io.kestra.plugin.jdbc.JdbcConnectionInterface

    connection, connectionProperties, connectionProperties

    Methods inherited from interface io.kestra.plugin.jdbc.JdbcStatementInterface

    zoneId

    Methods inherited from interface io.kestra.core.models.tasks.RunnableTask

    run

    Methods inherited from interface io.kestra.core.models.WorkerJobLifecycle

    kill, stop
  • Field Details

    • autoCommit

      protected final Boolean autoCommit
  • Constructor Details

    • Query

      public Query()
  • Method Details

    • getCellConverter

      protected io.kestra.plugin.jdbc.AbstractCellConverter getCellConverter(ZoneId zoneId)
      Specified by:
      getCellConverter in class io.kestra.plugin.jdbc.AbstractJdbcBaseQuery
    • registerDriver

      public void registerDriver() throws SQLException
      Specified by:
      registerDriver in interface io.kestra.plugin.jdbc.JdbcConnectionInterface
      Throws:
      SQLException