Interface StatementSet
-
- All Superinterfaces:
Compilable,Executable,Explainable<StatementSet>
- All Known Implementing Classes:
StatementSetImpl
@PublicEvolving public interface StatementSet extends Explainable<StatementSet>, Compilable, Executable
AStatementSetaccepts pipelines defined by DML statements orTableobjects. The planner can optimize all added statements together and then submit them as one job.The added statements will be cleared when calling the
execute()method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StatementSetadd(TablePipeline tablePipeline)Adds aTablePipeline.StatementSetaddInsert(String targetPath, Table table)Shorthand forstatementSet.add(table.insertInto(targetPath)).StatementSetaddInsert(String targetPath, Table table, boolean overwrite)Shorthand forstatementSet.add(table.insertInto(targetPath, overwrite)).StatementSetaddInsert(TableDescriptor targetDescriptor, Table table)Shorthand forstatementSet.add(table.insertInto(targetDescriptor)).StatementSetaddInsert(TableDescriptor targetDescriptor, Table table, boolean overwrite)Shorthand forstatementSet.add(table.insertInto(targetDescriptor, overwrite)).StatementSetaddInsertSql(String statement)Adds anINSERT INTOSQL statement.CompiledPlancompilePlan()Compiles this object into aCompiledPlanthat can be executed as one job.TableResultexecute()Executes this object.-
Methods inherited from interface org.apache.flink.table.api.Explainable
explain, explain, printExplain
-
-
-
-
Method Detail
-
add
StatementSet add(TablePipeline tablePipeline)
Adds aTablePipeline.
-
addInsertSql
StatementSet addInsertSql(String statement)
Adds anINSERT INTOSQL statement.
-
addInsert
StatementSet addInsert(String targetPath, Table table)
Shorthand forstatementSet.add(table.insertInto(targetPath)).- See Also:
add(TablePipeline),Table.insertInto(String)
-
addInsert
StatementSet addInsert(String targetPath, Table table, boolean overwrite)
Shorthand forstatementSet.add(table.insertInto(targetPath, overwrite)).
-
addInsert
StatementSet addInsert(TableDescriptor targetDescriptor, Table table)
Shorthand forstatementSet.add(table.insertInto(targetDescriptor)).
-
addInsert
StatementSet addInsert(TableDescriptor targetDescriptor, Table table, boolean overwrite)
Shorthand forstatementSet.add(table.insertInto(targetDescriptor, overwrite)).
-
execute
TableResult execute()
Executes this object.By default, all DML operations are executed asynchronously. Use
TableResult.await()orTableResult.getJobClient()to monitor the execution. SetTableConfigOptions.TABLE_DML_SYNCfor always synchronous execution.This method executes all statements as one job.
The added statements will be cleared after calling this method.
- Specified by:
executein interfaceExecutable
-
compilePlan
@Experimental CompiledPlan compilePlan() throws org.apache.flink.table.api.TableException
Compiles this object into aCompiledPlanthat can be executed as one job.Compiled plans can be persisted and reloaded across Flink versions. They describe static pipelines to ensure backwards compatibility and enable stateful streaming job upgrades. See
CompiledPlanand the website documentation for more information.Note: The compiled plan feature is not supported in batch mode.
This method compiles all statements into a
CompiledPlanthat can be executed as one job.- Specified by:
compilePlanin interfaceCompilable- Throws:
org.apache.flink.table.api.TableException- if any of the statements is invalid or if the plan cannot be persisted.
-
-