Article directory
foreword
There are relatively few functions that come with flink-sql. You can introduce hive functions.
hive-connector has a built-in hive module that provides system functions that come with hive.
1. View the current module
Flink SQL> show modules;
±------------+
| module name |
±------------+
| core |
±------------+
1 row in set
2. Load the hive module
Load command:
Flink SQL> Load module hive with ('hive-version'='3.1.2');
Flink SQL>
show modules;
±------------+
| module name |
±------------+
| core |
| hive |
±------------+
2 rows in set
3. You can use the functions that come with hive
Flink SQL> select split(‘ab_cd’,‘_’);
Summarize
Introduce the hive function by loading the hive module, thereby extending the function of flink-sql