Package io.kestra.plugin.jdbc.mysql
Class Queries
java.lang.Object
io.kestra.core.models.tasks.Task
io.kestra.plugin.jdbc.AbstractJdbcBaseQuery
io.kestra.plugin.jdbc.AbstractJdbcQueries
io.kestra.plugin.jdbc.mysql.Queries
- All Implemented Interfaces:
io.kestra.core.models.Plugin,io.kestra.core.models.PluginVersioning,io.kestra.core.models.tasks.RunnableTask<io.kestra.plugin.jdbc.AbstractJdbcQueries.MultiQueryOutput>,io.kestra.core.models.tasks.TaskInterface,io.kestra.core.models.WorkerJobLifecycle,io.kestra.plugin.jdbc.JdbcConnectionInterface,io.kestra.plugin.jdbc.JdbcQueriesInterface,io.kestra.plugin.jdbc.JdbcQueryInterface,io.kestra.plugin.jdbc.JdbcStatementInterface,MySqlConnectionInterface
@Plugin(examples=@Example(title="Send a SQL query to a MySQL Database and fetch a row as output.",full=true,code="id: send_multiple_queries\nnamespace: test.queries\ntasks:\n - id: test_queries_insert\n type: io.kestra.plugin.jdbc.mysql.Queries\n fetchType: FETCH\n url: jdbc:mysql://mysql:3306/kestra\n username: \"${{secret(\'MYSQL_USERNAME\')}}\"\n password: \"${{secret(\'MYSQL_PASSWORD\')}}\"\n sql: \"{{ read(\'populate.sql\') }}\"\n\n - id: test_queries_select\n type: io.kestra.plugin.jdbc.mysql.Queries\n fetchType: FETCH\n url: jdbc:mysql://mysql:3306/kestra\n username: root\n password: mysql_passwd\n sql: |\n SELECT firstName, lastName FROM employee;\n SELECT brand FROM laptop;\n"))
public class Queries
extends io.kestra.plugin.jdbc.AbstractJdbcQueries
implements io.kestra.core.models.tasks.RunnableTask<io.kestra.plugin.jdbc.AbstractJdbcQueries.MultiQueryOutput>, MySqlConnectionInterface
-
Nested Class Summary
Nested classes/interfaces inherited from class io.kestra.plugin.jdbc.AbstractJdbcQueries
io.kestra.plugin.jdbc.AbstractJdbcQueries.AbstractJdbcQueriesBuilder<C extends io.kestra.plugin.jdbc.AbstractJdbcQueries,B extends io.kestra.plugin.jdbc.AbstractJdbcQueries.AbstractJdbcQueriesBuilder<C, B>>, io.kestra.plugin.jdbc.AbstractJdbcQueries.MultiQueryOutput 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
FieldsFields inherited from class io.kestra.plugin.jdbc.AbstractJdbcQueries
transactionFields inherited from class io.kestra.plugin.jdbc.AbstractJdbcBaseQuery
additionalVars, fetchSize, fetchType, parameters, sqlFields inherited from class io.kestra.core.models.tasks.Task
disabled, id, retry, timeout, type, version -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconnectionProperties(io.kestra.core.runners.RunContext runContext) protected io.kestra.plugin.jdbc.AbstractCellConvertergetCellConverter(ZoneId zoneId) io.kestra.core.models.property.Property<Integer> voidio.kestra.plugin.jdbc.AbstractJdbcQueries.MultiQueryOutputrun(io.kestra.core.runners.RunContext runContext) Methods inherited from class io.kestra.plugin.jdbc.AbstractJdbcQueries
canEqual, equals, fetch, getTransaction, hashCode, toStringMethods inherited from class io.kestra.plugin.jdbc.AbstractJdbcBaseQuery
createPreparedStatement, createStatement, fetchResult, fetchResults, fetchToFile, getFetchType, getParameters, getPassword, getSql, getTimeZoneId, getUrl, getUsername, isFetch, isFetchOne, isStore, mapResultSetToMap, prepareStatement, renderFetchType, tagsMethods inherited from class io.kestra.core.models.tasks.Task
findById, findById, getDescription, getDisabled, getId, getLogLevel, getRetry, getRunIf, getTimeout, getType, getVersion, getWorkerGroup, isAllowFailure, isAllowWarning, isFlowable, isLogToFile, isSendToWorkerTaskMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.kestra.plugin.jdbc.JdbcConnectionInterface
connection, connectionProperties, getPassword, getUrl, getUsername, validateUrlMethods inherited from interface io.kestra.plugin.jdbc.JdbcStatementInterface
zoneIdMethods inherited from interface io.kestra.plugin.jdbc.mysql.MySqlConnectionInterface
createMysqlProperties, getSchemeMethods inherited from interface io.kestra.core.models.WorkerJobLifecycle
kill, stop
-
Field Details
-
inputFile
-
workingDirectory
-
-
Constructor Details
-
Queries
public Queries()
-
-
Method Details
-
getCellConverter
- Specified by:
getCellConverterin classio.kestra.plugin.jdbc.AbstractJdbcBaseQuery
-
registerDriver
- Specified by:
registerDriverin interfaceio.kestra.plugin.jdbc.JdbcConnectionInterface- Throws:
SQLException
-
connectionProperties
public Properties connectionProperties(io.kestra.core.runners.RunContext runContext) throws Exception - Specified by:
connectionPropertiesin interfaceio.kestra.plugin.jdbc.JdbcConnectionInterface- Throws:
Exception
-
getFetchSize
- Specified by:
getFetchSizein interfaceio.kestra.plugin.jdbc.JdbcQueryInterface- Overrides:
getFetchSizein classio.kestra.plugin.jdbc.AbstractJdbcBaseQuery
-
run
public io.kestra.plugin.jdbc.AbstractJdbcQueries.MultiQueryOutput run(io.kestra.core.runners.RunContext runContext) throws Exception - Specified by:
runin interfaceio.kestra.core.models.tasks.RunnableTask<io.kestra.plugin.jdbc.AbstractJdbcQueries.MultiQueryOutput>- Overrides:
runin classio.kestra.plugin.jdbc.AbstractJdbcQueries- Throws:
Exception
-