Package io.kestra.plugin.jdbc.mysql
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
FieldsFields inherited from class io.kestra.plugin.jdbc.AbstractJdbcTrigger
additionalVars, fetchSizeFields inherited from class io.kestra.core.models.triggers.AbstractTrigger
conditions, id, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected io.kestra.plugin.jdbc.AbstractJdbcQuery.OutputrunQuery(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, toStringMethods inherited from class io.kestra.core.models.triggers.AbstractTrigger
getConditions, getDescription, getId, getLabels, getLogLevel, getStopAfter, getType, getWorkerGroup, isDisabled, setMinLogLevelMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.kestra.plugin.jdbc.JdbcConnectionInterface
connection, connectionPropertiesMethods inherited from interface io.kestra.plugin.jdbc.JdbcStatementInterface
zoneIdMethods inherited from interface io.kestra.core.models.triggers.PollingTriggerInterface
nextEvaluationDate, nextEvaluationDate
-
Field Details
-
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:
runQueryin classio.kestra.plugin.jdbc.AbstractJdbcTrigger- Throws:
Exception
-
registerDriver
- Throws:
SQLException
-