UNLOAD Statements
UNLOAD statements are used to unload a built-in or user-defined module.
Run a UNLOAD statement
Java
UNLOAD statements can be executed with the executeSql()
method of the TableEnvironment
. The executeSql()
method returns ‘OK’ for a successful LOAD operation; otherwise it will throw an exception.
The following examples show how to run a UNLOAD statement in TableEnvironment
.
Scala
UNLOAD statements can be executed with the executeSql()
method of the TableEnvironment
. The executeSql()
method returns ‘OK’ for a successful LOAD operation; otherwise it will throw an exception.
The following examples show how to run a UNLOAD statement in TableEnvironment
.
Python
UNLOAD statements can be executed with the executeSql()
method of the TableEnvironment
. The executeSql()
method returns ‘OK’ for a successful LOAD operation; otherwise it will throw an exception.
The following examples show how to run a UNLOAD statement in TableEnvironment
.
SQL CLI
UNLOAD statements can be executed in SQL CLI.
The following examples show how to run a UNLOAD statement in SQL CLI.
Java
StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();
StreamTableEnvironment tEnv = StreamTableEnvironment.create(env);
// unload a core module
tEnv.executeSql("UNLOAD MODULE core");
tEnv.executeSql("SHOW MODULES").print();
// Empty set
Scala
val env = StreamExecutionEnvironment.getExecutionEnvironment()
val tEnv = StreamTableEnvironment.create(env)
// unload a core module
tEnv.executeSql("UNLOAD MODULE core")
tEnv.executeSql("SHOW MODULES").print()
// Empty set
Python
table_env = StreamTableEnvironment.create(...)
# unload a core module
table_env.execute_sql("UNLOAD MODULE core")
table_env.execute_sql("SHOW MODULES").print()
# Empty set
SQL CLI
Flink SQL> UNLOAD MODULE core;
[INFO] Unload module succeeded!
Flink SQL> SHOW MODULES;
Empty set
UNLOAD MODULE
The following grammar gives an overview of the available syntax:
UNLOAD MODULE module_name