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.Plugin, io.kestra.core.models.PluginVersioning, io.kestra.core.models.triggers.PollingTriggerInterface, io.kestra.core.models.triggers.TriggerInterface, io.kestra.core.models.triggers.TriggerOutput<io.kestra.plugin.jdbc.AbstractJdbcBaseQuery.Output>, io.kestra.core.models.triggers.WorkerTriggerInterface, io.kestra.core.models.WorkerJobLifecycle, io.kestra.plugin.jdbc.JdbcConnectionInterface, io.kestra.plugin.jdbc.JdbcQueryInterface, io.kestra.plugin.jdbc.JdbcStatementInterface, MySqlConnectionInterface

@Plugin(examples=@Example(title="Wait for a SQL query to return results, and then iterate through rows.",full=true,code="id: jdbc_trigger\nnamespace: company.team\n\ntasks:\n - id: each\n type: io.kestra.plugin.core.flow.ForEach\n values: \"{{ trigger.rows }}\"\n tasks:\n - id: return\n type: io.kestra.plugin.core.debug.Return\n format: \"{{ json(taskrun.value) }}\"\n\ntriggers:\n - id: watch\n type: io.kestra.plugin.jdbc.mysql.Trigger\n interval: \"PT5M\"\n url: jdbc:mysql://127.0.0.1:3306/\n username: mysql_user\n password: mysql_password\n sql: \"SELECT * FROM my_table\"\n fetchType: FETCH\n")) public class Trigger extends io.kestra.plugin.jdbc.AbstractJdbcTrigger implements MySqlConnectionInterface
  • 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, fetchType, parameters

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

    conditions, id, type, version
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

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

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

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

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

    getConditions, getDescription, getId, getLabels, getLogLevel, getStopAfter, getType, getVersion, getWorkerGroup, isDisabled, isLogToFile, 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, connectionProperties, getPassword, getUrl, getUsername, validateUrl

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

    zoneId

    Methods inherited from interface io.kestra.plugin.jdbc.mysql.MySqlConnectionInterface

    createMysqlProperties, getScheme

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

    nextEvaluationDate, nextEvaluationDate

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

    kill, stop
  • Field Details

    • workingDirectory

      protected transient Path workingDirectory
  • Constructor Details

    • Trigger

      public Trigger()
  • Method Details

    • runQuery

      protected io.kestra.plugin.jdbc.AbstractJdbcBaseQuery.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
      Specified by:
      registerDriver in interface io.kestra.plugin.jdbc.JdbcConnectionInterface
      Throws:
      SQLException