| title | UNLOAD Statements | |
|---|---|---|
| weight | 13 | |
| type | docs | |
| aliases |
|
UNLOAD statements are used to unload a built-in or user-defined module.
{{< tabs "unload statement" >}} {{< tab "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.
{{< /tab >}} {{< tab "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.
{{< /tab >}}
{{< tab "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.
{{< /tab >}} {{< tab "SQL CLI" >}}
UNLOAD statements can be executed in [SQL CLI]({{< ref "docs/dev/table/sqlClient" >}}).
The following examples show how to run a UNLOAD statement in SQL CLI.
{{< /tab >}} {{< /tabs >}}
{{< tabs "unload modules" >}} {{< tab "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{{< /tab >}} {{< tab "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{{< /tab >}} {{< tab "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{{< /tab >}} {{< tab "SQL CLI" >}}
Flink SQL> UNLOAD MODULE core;
[INFO] Unload module succeeded!
Flink SQL> SHOW MODULES;
Empty set{{< /tab >}} {{< /tabs >}}
{{< top >}}
The following grammar gives an overview of the available syntax:
UNLOAD MODULE module_name