Interface StatementSet
-
- All Superinterfaces:
Compilable
,Executable
,Explainable<StatementSet>
- All Known Subinterfaces:
StreamStatementSet
- All Known Implementing Classes:
StatementSetImpl
,StreamStatementSetImpl
@PublicEvolving public interface StatementSet extends Explainable<StatementSet>, Compilable, Executable
AStatementSet
accepts pipelines defined by DML statements orTable
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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StatementSet
add(TablePipeline tablePipeline)
Adds aTablePipeline
.StatementSet
addInsert(String targetPath, Table table)
Shorthand forstatementSet.add(table.insertInto(targetPath))
.StatementSet
addInsert(String targetPath, Table table, boolean overwrite)
Shorthand forstatementSet.add(table.insertInto(targetPath, overwrite))
.StatementSet
addInsert(TableDescriptor targetDescriptor, Table table)
Shorthand forstatementSet.add(table.insertInto(targetDescriptor))
.StatementSet
addInsert(TableDescriptor targetDescriptor, Table table, boolean overwrite)
Shorthand forstatementSet.add(table.insertInto(targetDescriptor, overwrite))
.StatementSet
addInsertSql(String statement)
Adds anINSERT INTO
SQL statement.CompiledPlan
compilePlan()
Compiles this object into aCompiledPlan
that can be executed as one job.TableResult
execute()
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 INTO
SQL 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_SYNC
for always synchronous execution.This method executes all statements as one job.
The added statements will be cleared after calling this method.
- Specified by:
execute
in interfaceExecutable
-
compilePlan
@Experimental CompiledPlan compilePlan() throws TableException
Compiles this object into aCompiledPlan
that 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
CompiledPlan
and the website documentation for more information.Note: The compiled plan feature is not supported in batch mode.
This method compiles all statements into a
CompiledPlan
that can be executed as one job.- Specified by:
compilePlan
in interfaceCompilable
- Throws:
TableException
- if any of the statements is invalid or if the plan cannot be persisted.
-
-