Package org.apache.flink.table.api
Interface StatementSet
- All Superinterfaces:
org.apache.flink.table.api.Compilable,Executable,Explainable<StatementSet>
@PublicEvolving
public interface StatementSet
extends Explainable<StatementSet>, org.apache.flink.table.api.Compilable, Executable
A
StatementSet accepts pipelines defined by DML statements or Table objects. 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
Modifier and TypeMethodDescriptionadd(TablePipeline tablePipeline) Adds aTablePipeline.Shorthand forstatementSet.add(table.insertInto(targetPath)).Shorthand forstatementSet.add(table.insertInto(targetPath, overwrite)).addInsert(TableDescriptor targetDescriptor, Table table) Shorthand forstatementSet.add(table.insertInto(targetDescriptor)).addInsert(TableDescriptor targetDescriptor, Table table, boolean overwrite) Shorthand forstatementSet.add(table.insertInto(targetDescriptor, overwrite)).addInsertSql(String statement) Adds anINSERT INTOSQL statement.org.apache.flink.table.api.CompiledPlanexecute()Executes this object.Methods inherited from interface org.apache.flink.table.api.Explainable
explain, explain, printExplain
-
Method Details
-
add
Adds aTablePipeline. -
addInsertSql
Adds anINSERT INTOSQL statement. -
addInsert
Shorthand forstatementSet.add(table.insertInto(targetPath)).- See Also:
-
addInsert
Shorthand forstatementSet.add(table.insertInto(targetPath, overwrite)). -
addInsert
Shorthand forstatementSet.add(table.insertInto(targetDescriptor)). -
addInsert
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 org.apache.flink.table.api.CompiledPlan compilePlan() throws org.apache.flink.table.api.TableExceptionThis method compiles all statements into a
CompiledPlanthat can be executed as one job.- Specified by:
compilePlanin interfaceorg.apache.flink.table.api.Compilable- Throws:
org.apache.flink.table.api.TableException
-