Class Trigger

java.lang.Object
io.kestra.core.models.triggers.AbstractTrigger
io.kestra.plugin.jdbc.AbstractJdbcTrigger
io.kestra.plugin.jdbc.mysql.Trigger
All Implemented Interfaces:
io.kestra.core.models.triggers.PollingTriggerInterface, io.kestra.core.models.triggers.TriggerOutput<io.kestra.plugin.jdbc.AbstractJdbcQuery.Output>, io.kestra.plugin.jdbc.JdbcConnectionInterface, io.kestra.plugin.jdbc.JdbcQueryInterface, io.kestra.plugin.jdbc.JdbcStatementInterface

@Plugin(examples=@Example(title="Wait for a SQL query to return results, and then iterate through rows.",full=true,code={"id: jdbc-trigger","namespace: io.kestra.tests","","tasks:"," - id: each"," type: io.kestra.core.tasks.flows.EachSequential"," tasks:"," - id: return"," type: io.kestra.core.tasks.debugs.Return"," format: \"{{ json(taskrun.value) }}\""," value: \"{{ trigger.rows }}\"","","triggers:"," - id: watch"," type: io.kestra.plugin.jdbc.mysql.Trigger"," interval: \"PT5M\""," url: jdbc:mysql://127.0.0.1:3306/"," username: mysql_user"," password: mysql_passwd"," sql: \"SELECT * FROM my_table\""," fetch: true"})) public class Trigger extends io.kestra.plugin.jdbc.AbstractJdbcTrigger
  • Nested Class Summary

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

    io.kestra.plugin.jdbc.AbstractJdbcTrigger.AbstractJdbcTriggerBuilder<C extends io.kestra.plugin.jdbc.AbstractJdbcTrigger,B extends io.kestra.plugin.jdbc.AbstractJdbcTrigger.AbstractJdbcTriggerBuilder<C,B>>

    Nested classes/interfaces inherited from class io.kestra.core.models.triggers.AbstractTrigger

    io.kestra.core.models.triggers.AbstractTrigger.AbstractTriggerBuilder<C extends io.kestra.core.models.triggers.AbstractTrigger,B extends io.kestra.core.models.triggers.AbstractTrigger.AbstractTriggerBuilder<C,B>>
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Path
     

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

    additionalVars, fetchSize

    Fields inherited from class io.kestra.core.models.triggers.AbstractTrigger

    conditions, id, type
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    protected io.kestra.plugin.jdbc.AbstractJdbcQuery.Output
    runQuery(io.kestra.core.runners.RunContext runContext)
     

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

    canEqual, equals, evaluate, getFetchSize, getInterval, getPassword, getSql, getTimeZoneId, getUrl, getUsername, hashCode, isFetch, isFetchOne, isStore, toString

    Methods inherited from class io.kestra.core.models.triggers.AbstractTrigger

    getConditions, getDescription, getId, getLabels, getLogLevel, getStopAfter, getType, getWorkerGroup, isDisabled, setMinLogLevel

    Methods inherited from class java.lang.Object

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

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

    connection, connectionProperties

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

    zoneId

    Methods inherited from interface io.kestra.core.models.triggers.PollingTriggerInterface

    nextEvaluationDate, nextEvaluationDate
  • Field Details

    • workingDirectory

      protected transient Path workingDirectory
  • Constructor Details

    • Trigger

      public Trigger()
  • Method Details

    • runQuery

      protected io.kestra.plugin.jdbc.AbstractJdbcQuery.Output runQuery(io.kestra.core.runners.RunContext runContext) throws Exception
      Specified by:
      runQuery in class io.kestra.plugin.jdbc.AbstractJdbcTrigger
      Throws:
      Exception
    • registerDriver

      public void registerDriver() throws SQLException
      Throws:
      SQLException