Package io.kestra.plugin.jdbc.mysql
Class Batch
java.lang.Object
io.kestra.core.models.tasks.Task
io.kestra.plugin.jdbc.AbstractJdbcBatch
io.kestra.plugin.jdbc.mysql.Batch
- All Implemented Interfaces:
io.kestra.core.models.Plugin,io.kestra.core.models.tasks.RunnableTask<io.kestra.plugin.jdbc.AbstractJdbcBatch.Output>,io.kestra.core.models.tasks.TaskInterface,io.kestra.core.models.WorkerJobLifecycle,io.kestra.plugin.jdbc.JdbcConnectionInterface,io.kestra.plugin.jdbc.JdbcStatementInterface
@Example(title="Fetch rows from a table, and bulk insert them to another one.",full=true,code="id: mysql_batch\nnamespace: company.team\n\ntasks:\n - id: query\n type: io.kestra.plugin.jdbc.mysql.Query\n url: jdbc:mysql://127.0.0.1:3306/\n username: mysql_user\n password: mysql_password\n sql: |\n SELECT *\n FROM xref\n LIMIT 1500;\n fetchType: STORE\n\n - id: update\n type: io.kestra.plugin.jdbc.mysql.Batch\n from: \"{{ outputs.query.uri }}\"\n url: jdbc:mysql://127.0.0.1:3306/\n username: mysql_user\n password: mysql_password\n sql: |\n insert into xref values( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )\n") @Example(title="Fetch rows from a table, and bulk insert them to another one, without using sql query.",full=true,code="id: mysql_batch\nnamespace: company.team\n\ntasks:\n - id: query\n type: io.kestra.plugin.jdbc.mysql.Query\n url: jdbc:mysql://127.0.0.1:3306/\n username: mysql_user\n password: mysql_password\n sql: |\n SELECT *\n FROM xref\n LIMIT 1500;\n fetchType: STORE\n\n - id: update\n type: io.kestra.plugin.jdbc.mysql.Batch\n from: \"{{ outputs.query.uri }}\"\n url: jdbc:mysql://127.0.0.1:3306/\n username: mysql_user\n password: mysql_password\n table: xref\n")
public class Batch
extends io.kestra.plugin.jdbc.AbstractJdbcBatch
implements io.kestra.core.models.tasks.RunnableTask<io.kestra.plugin.jdbc.AbstractJdbcBatch.Output>
-
Nested Class Summary
Nested classes/interfaces inherited from class io.kestra.plugin.jdbc.AbstractJdbcBatch
io.kestra.plugin.jdbc.AbstractJdbcBatch.AbstractJdbcBatchBuilder<C extends io.kestra.plugin.jdbc.AbstractJdbcBatch,B extends io.kestra.plugin.jdbc.AbstractJdbcBatch.AbstractJdbcBatchBuilder<C, B>>, io.kestra.plugin.jdbc.AbstractJdbcBatch.Output, io.kestra.plugin.jdbc.AbstractJdbcBatch.ParameterType 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 inherited from class io.kestra.core.models.tasks.Task
disabled, id, retry, timeout, type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconnectionProperties(io.kestra.core.runners.RunContext runContext) protected io.kestra.plugin.jdbc.AbstractCellConvertergetCellConverter(ZoneId zoneId) voidMethods inherited from class io.kestra.plugin.jdbc.AbstractJdbcBatch
canEqual, equals, getChunk, getColumns, getFrom, getPassword, getSql, getTable, getTimeZoneId, getUrl, getUsername, hashCode, run, toStringMethods inherited from class io.kestra.core.models.tasks.Task
findById, findById, getDescription, getDisabled, getId, getLogLevel, getRetry, getTimeout, getType, getWorkerGroup, isAllowFailure, 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
connectionMethods inherited from interface io.kestra.plugin.jdbc.JdbcStatementInterface
zoneIdMethods inherited from interface io.kestra.core.models.tasks.RunnableTask
runMethods inherited from interface io.kestra.core.models.WorkerJobLifecycle
kill, stop
-
Constructor Details
-
Batch
public Batch()
-
-
Method Details
-
getCellConverter
- Specified by:
getCellConverterin classio.kestra.plugin.jdbc.AbstractJdbcBatch
-
connectionProperties
public Properties connectionProperties(io.kestra.core.runners.RunContext runContext) throws Exception - Specified by:
connectionPropertiesin interfaceio.kestra.plugin.jdbc.JdbcConnectionInterface- Throws:
Exception
-
registerDriver
- Specified by:
registerDriverin interfaceio.kestra.plugin.jdbc.JdbcConnectionInterface- Throws:
SQLException
-